/*- SITE-SEARCH-FORM (SEARCH) */
/* <style> */
    site-search-form {
        display: block;
    	margin: auto 0;
    }
    site-search-form > a {
        color: #FFF;
        height: 64px;
        width: 64px;
        margin: auto 8px;
        padding: 0;
    }
    
    site-search-form form {
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -ms-flex-direction: row-reverse;
        -webkit-flex-direction: row-reverse;
        flex-direction: row-reverse;
        
        background: #009DDC;
        border-radius: 2px;
        height: 64px;
        padding-left: 0.5px;
    }
    site-search-form iron-collapse,
    site-search-form button[type="submit"] { 
        display: flex;
    }
    site-search-form input[type="checkbox"][collapse-trigger]:not(:checked) ~ label button[type="submit"] {
        pointer-events: none;
    }
    site-search-form input[type='search'] {
        width: 100%;
        padding: 7px 12px;
        font-size: 15px;
        line-height: 1.42857143;
        color: #55595c;
        background-color: #fff;
        background-image: none;
        border: .0625em solid #ccc;
        border-radius: 2px 0 0 2px;
    }
    site-search-form button[type="submit"] {
        background: #009DDC;
        border: none;
        border-radius: 0 1px 1px 0;
        box-sizing: border-box;
        color: #FFF;
        cursor: pointer;
        height: 64px;
        outline: none;
        padding: 4px;
        width: 64px;
    }
    /* Small */
    @media screen and (max-width: 1119px) {
        site-search-form button[type="submit"]:not(:focus) {
            border-radius: 1px;
        }
    }
/* </style> */

/* RESPONSIVE-NAVBAR (CONTENTS) */
/* HOME-LINK (LOGO) */
home-link {
  display: flex;
  height: 100%;
}
home-link a,
home-link picture {
  display: block;
  height: 100%;
  width: 100%;
}
/* IE11 doesn't like src sets and picture element defining which one is shown
so I've commented out that in the HTML for now and just set it here */
home-link picture {
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: center center;
}
@media screen and (max-width: 1200px) {
  home-link {
    width: 72px;
  }
  home-link picture {
    background-image: url('https://static.auburnalabama.org/media/citylogos/citylogo_invert-192x192.png');
  }
}
@media screen and (min-width: 1201px) {
  home-link {
    width: 221px;
  }
  /* IE11 doesn't like src sets and picture element defining which one is shown */
  home-link picture {
    background-image: url('https://static.auburnalabama.org/media/citylogos/Horizontal-Wordmark-96-white.png');
  }
}
/* BUTTON-ICON-LABEL */
ul.horizontal label {
  align-items: center;
  cursor: pointer;
  color: #FFF;
  display: flex;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.75;
  line-height: 52px;
  letter-spacing: -1px;
  max-height: 100%;
  padding: 1rem 0.67rem;
  position: relative;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;
}
ul.horizontal label coa-icon {
  color: #E1CD00;
  display: block;
	height: 42px;
	margin: auto 0;
  max-height: 100%;
	width: 42px;
}

/* Element Style */
responsive-header {
  box-sizing: border-box;
  align-items: center;
  background: #1596D1;
  background: var(--coa-blue);
  display: flex;
  flex-direction: row;
  height: 80px;
  justify-content: space-between;
  padding: 0 1rem;
  position: relative;
  width: 100%;
  z-index: 7;
}
/* General Style */
responsive-header input[type="radio"] {
  position: absolute;
  top: -9999px;
  left: -9999px;
  opacity: 0;
}
responsive-header ul {
  list-style: none;
  margin-top: 0;
  padding: 0;
}
responsive-header label,
responsive-header a {
  display: block;
}
responsive-header ul.horizontal label:hover,
responsive-header a:hover {
  background: rgba(0, 0, 0, 0.12);
}

/* Main Nav Style */
responsive-header nav,
responsive-header nav form {
  display: inline-block; 
  height: 100%;
}
@media screen and (min-width: 1400px) {
    responsive-header nav {
        padding-right: 157px;/*221-64*/
    }
}

responsive-header ul.horizontal {
  display: inline-flex;
  flex-direction: row;
  height: 100%;
  justify-content: space-between;
  margin: 0 1rem;
}

responsive-header ul.horizontal label {
  align-items: center;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  height: 100%;
  padding: 1rem;
}
responsive-header label.fit {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: -1;
}
responsive-header input:checked + label.fit {
  display: none;
}
/* Mega Menu Style */
mega-menu {
  background: #FFF;
  box-sizing: border-box;
  display: block;
  /*height: calc(100vh - 80px);*/
  left: 0;
  position: absolute;
  padding: 12px;
  right: 0;
  top: 100%;
  box-shadow: 0 10px 10px rgba(0,0,0,.22);
}
mega-menu ul {
  display: block;
  -moz-column-width: 300px;
  -webkit-column-width: 300px;
  column-width: 300px;
  /*max-height: 100%;*/
  margin: 0;
  /*padding: 1rem 3rem 0.5rem 1rem;*/
}
mega-menu > ul > li {
    margin-bottom: 12px;
  -webkit-column-break-inside: avoid;
	-moz-column-break-inside: avoid;
	-webkit-break-inside: avoid;
	page-break-inside: avoid;
	break-inside: avoid-region;
	break-inside: avoid;
	-webkit-column-break-inside: avoid; /* Chrome, Safari */
    page-break-inside: avoid;           /* Theoretically FF 20+ */
    break-inside: avoid-column;         /* IE 11 */
    /*display:table;*/                      /* Actually FF 20+, makes IE 11 look weird... weirdly */
}
mega-menu label.close {
  background: #CCC;
  cursor: pointer;
  padding: 0.5em 0.75em;
  position: absolute;
  font-weight: 700;
  right: 0.25rem;
  top: 0.25rem;
}
responsive-header input + mega-menu {
  display: none;
}
responsive-header input:checked + mega-menu {
  display: block;
}
/* MEGA-MENU contents */
mega-menu label:not(.close) {
  color: #00496B;
  display: block;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: -1px;
  line-height: 1.21;
  text-transform: uppercase;
}
mega-menu a {
  display: block;
  color: #000;
  font-size: 16px;
  font-weight: 500;
  margin: 2px 0;
  padding: 4px 2px;
  text-decoration: none;
}
/* TODO - Implement */
responsive-header nav ul.horizontal li {
    position: relative;
}
responsive-header nav ul.horizontal li::after {
    display: none;
	border-left: 17px solid transparent;
	border-right: 17px solid transparent;
	border-bottom: 17px solid #FFF;
	bottom: -1px;
	content: '';
	height: 0;
	left: calc(50% - 8px);
    position: absolute;
	width: 0;
}
input#Government:checked ~ ul.horizontal li:nth-of-type(1)::after {
	display: block;
}
input#Services:checked ~ ul.horizontal li:nth-of-type(2)::after {
	display: block;
}
input#Community:checked ~ ul.horizontal li:nth-of-type(3)::after {
	display: block;
}
input#HowDoI:checked ~ ul.horizontal li:nth-of-type(4)::after {
	display: block;
}

#hamburger {
    display: none;
}

/* Responsive (small screen) */
@media screen and (max-width: 1024px) {
    responsive-header nav {
        margin-right: 0;
        order: 3;
    }
    #hamburger {
        display: block;
        width: 60px;
        height: 45px;
        position: relative;
        margin: 17.5px auto;
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
        -webkit-transition: .5s ease-in-out;
        -moz-transition: .5s ease-in-out;
        -o-transition: .5s ease-in-out;
        transition: .5s ease-in-out;
        cursor: pointer;
    }
    
    #hamburger span {
        display: block;
        position: absolute;
        height: 9px;
        width: 100%;
        background: #FFF;
        border-radius: 9px;
        opacity: 1;
        left: 0;
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
        -webkit-transition: .25s ease-in-out;
        -moz-transition: .25s ease-in-out;
        -o-transition: .25s ease-in-out;
        transition: .25s ease-in-out;
    }
    #hamburger span:nth-child(1) {
      top: 0px;
    }
    
    #hamburger span:nth-child(2),#hamburger span:nth-child(3) {
      top: 18px;
    }
    
    #hamburger span:nth-child(4) {
      top: 36px;
    }
    
    responsive-header input:checked ~ #hamburger span:nth-child(1) {
      top: 18px;
      width: 0%;
      left: 50%;
    }
    
    responsive-header input:checked ~ #hamburger span:nth-child(2) {
      -webkit-transform: rotate(45deg);
      -moz-transform: rotate(45deg);
      -o-transform: rotate(45deg);
      transform: rotate(45deg);
    }
    
    responsive-header input:checked ~ #hamburger span:nth-child(3) {
      -webkit-transform: rotate(-45deg);
      -moz-transform: rotate(-45deg);
      -o-transform: rotate(-45deg);
      transform: rotate(-45deg);
    }
    
    responsive-header input:checked ~ #hamburger span:nth-child(4) {
      top: 18px;
      width: 0%;
      left: 50%;
    }
    site-search-form {
        margin: auto 1em auto auto;
    }
  /* responsive-header style */
  responsive-header nav input:not(:checked) + ul {
    display: none;
  }
  responsive-header input:checked + ul {
    display: block;
  }
  responsive-header nav form > input:checked ~ ul {
    margin-top: 80px;
  }
  /* turns top bar into a close button */
  responsive-header input:checked ~ .fit {
    z-index: 1;
  }
  /* top-tier style when opened */
  responsive-header ul.horizontal {
    position: absolute;
    left: 0;
    right: 0;
	background: rgba(21, 150, 209, 0.97);
    display: block;
    height: auto;
    margin: 0;
  }
  /* mega-menu style */
  mega-menu {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  mega-menu ul {
    -ms-column-count: 1;
	-moz-column-count: 1;
	-webkit-column-count: 1;
	column-count: 1;
  }
  mega-menu label {
    cursor: pointer;
    padding: 6px 1px;
  }
  mega-menu label:hover {
      background: rgba(0, 0, 0, 0.12);
  }
}


/** SITE FOOTER (widget-socialmedia and more) **/
widget-socialmedia .soc {
    box-sizing: border-box;
    font-size: 0.625em;
}

widget-socialmedia .soc, widget-socialmedia .soc:before, widget-socialmedia .soc:after {
    box-sizing: inherit;
}
widget-socialmedia .soc {
    padding: 0;
    list-style: none;
    margin: auto 0;
    display: inline;
}
.soc li {
  	display: block;
    margin: 0.125rem 0.3rem;
    float: left;
}
.soc a, .soc svg {
    display: block;
}
.soc a {
  position: relative;
  height: 2.4rem;
  width: 2.4rem;
}
.soc svg {
  height: 100%;
  width: 100%;
}

widget-socialmedia ul.soc a:hover {
  border-radius: 100%;
	color: #FFF;
    fill: #FFF;
  -webkit-transform: scale(1.25);
          transform: scale(1.25);
  -webkit-transition: background-color 200ms, -webkit-transform 200ms ease-out;
  transition: background-color 200ms, -webkit-transform 200ms ease-out;
  transition: background-color 200ms, transform 200ms ease-out;
  transition: background-color 200ms, transform 200ms ease-out, -webkit-transform 200ms ease-out;
}
.facebook {
    color: #3b5998;
    fill: #3b5998;
}
.facebook:hover {
    background: #3b5998;
}
.instagram {
    color: #405de6;
    fill: #405de6;
}
.instagram:hover {
    background: #405de6;
}
.twitter {
    color: #00a0d1;
    fill: #00a0d1;
}
.twitter:hover {
    background: #00a0d1;
}
.linkedin {
    color: rgb(0, 119, 181);
    fill: rgb(0, 119, 181);
}
.linkedin:hover {
    background: rgb(0, 119, 181);
}
.youtube {
    color: #c4302b;
    fill: #c4302b;
}
.youtube:hover {
    background: #c4302b;
}
.nextdoor {
    box-sizing: border-box;
    padding: 7px;
    color: #00B246;
    fill: #00B246;
}
.nextdoor:hover {
    background: #00B246;
}
/*ELEMENTS*/
widget-socialmedia {
    color: #00496B;
    display: block;
    background: rgb(0,47,47);
    background: rgba(0,47,47,.97);
	padding: 0.25rem 1rem;
	position: relative;
}
widget-socialmedia nav {
	/*--layout-justified*/
	-ms-flex-pack: justify;
	-webkit-justify-content: space-between;
	justify-content: space-between;
	/*--layout-centered*/
	-ms-flex-align: center;
	-webkit-align-items: center;
	align-items: center;
	/*--layout-horizontal*/
	display: -ms-flexbox;
	display: -webkit-flex;
	display: flex;
	-ms-flex-direction: row;
	-webkit-flex-direction: row;
	flex-direction: row;
}
widget-socialmedia div {
    font-size: 14px;
}
widget-socialmedia div a {
    padding: 6px 2px;
    text-decoration: none;
    color: #F5F5F5;
    line-height: 35px;
    margin: 0 2px;
}
@media screen and (max-width: 767px) {
    widget-socialmedia nav {
        flex-direction: column;
        justify-content: center;
    }
    widget-socialmedia div {
        margin: 0.5rem auto 0 auto;
        text-align: center;
    }
}
/* employee link in the site footer */
widget-socialmedia nav div {
	font-size: 14px;
	align-self: flex-start;
	margin-top: 0.25rem;
	padding-bottom: 14px;
}
widget-socialmedia nav div a[href="#"] {
	display: block;
	float: right;
	margin-right: 0;
	margin-left: auto;
	padding: 0;
	white-space: nowrap;
	position: absolute;
	right: 1rem;
	line-height: 1;
	bottom: 0.25rem;
	font-size: 12px;
	color: #CCC;
}
/* Safari polymer/utils/gestures.html https://github.com/Polymer/polymer/blob/a77d64e5c291132ab971b0d1d1dd237e3d1a5f85/lib/utils/gestures.html */
responsive-header nav label > span {
    pointer-events: none;
}
