/*
 * OWNER: overlays.css
 * Layered / transient UI: theater, popup, hovercard, help link,
 * growls, loading bar.
 * Core controls stay in actions.css / interface.css; menus → menus.css.
 * Includes viewport @media for popup chrome (peeled from responsive.css).
 * Form fields inside popups stay with forms; action sheets → actions.css.
 */

/* THEATER */

#theater {
  background: rgba(0,0,0,.2);
  height: 100%;
  left: 0;
  overflow: visible;
  position: fixed;
  top: 0;
  width: 100%;
}

#theater #theater_outer {
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: rgba(0,0,0,.1) 0px 0px 5px;
  margin: 20px auto;
  padding: 10px;
  width: 620px;
}

/* POPUP */

#popup,
#overlay {
  height: 0px;
  left: 0px;
  position: fixed;
  overflow: visible;
  top: 0px;
  width: 100%;
}

#popup,
#theater {
  z-index: 2000;
}

#popup_overlay {
  /* background: rgba(0,0,0,.45); */
  background: rgba(0,0,0,0.45);
  background: -webkit-radial-gradient(50% 50%,ellipse closest-corner,rgba(0,0,0,0.35) 1%,rgba(0,0,0,0.6) 100%);
  background: -moz-radial-gradient(50% 50%,ellipse closest-corner,rgba(0,0,0,0.35) 1%,rgba(0,0,0,0.6) 100%);
  background: -ms-radial-gradient(50% 50%,ellipse closest-corner,rgba(0,0,0,0.35) 1%,rgba(0,0,0,0.6) 100%);
  background: radial-gradient(50% 50%,ellipse closest-corner,rgba(0,0,0,0.35) 1%,rgba(0,0,0,0.6) 100%);
  filter: alpha(opacity=80);
  left: 0px;
  position: fixed;
  overflow: visible;
  top: 0px;
  width: 100%;
  height: 100%;
}

#popup_overlay.create-form #popup div#popup_inner {
  border: 1px solid rgba(0,0,0,.3);
}

#popup_overlay.contact-form {
	background: rgba(0,0,0,.4);
}

.popup-error,
.popup-danger {
 background: rgba(0,0,0,.2);
 height: 100%; 
}

#popup_overlay.contact-form #popup_outer {
	bottom: 100px;
	margin: 0;
	position: absolute;
	right: 20px;
	width: 360px;
}

.popup-color #popup_outer {
  padding: 10px;
  width: 500px;
}

#popup_overlay.sm-popup #popup_outer {
  width: 380px;
}

#popup_overlay.xsm-popup #popup_outer {
  width: 330px !important;
}

#popup.popup-error div.title {
  padding: 10px;
}

.popup-color .popup_section .title {
  border: 0;
  background: #333;
  border-bottom: 1px solid rgba(0,0,0,.1);
  color: #fff;
}

.popup_section div.title img.title_icon,
.ui_page_header img.title_icon {
  border: 0;
  border-radius: 5px;
  float: left;
  margin-right: 10px;
}

.ui_page_header img.title_icon { width: 30px; }

.popup_section img.title_icon {
  margin-top: -3px;
  width: 22px;
}

#overlay {
  background: rgba(255, 255, 255, .8);
  height: 100%;
  position: fixed;
  overflow-x: auto;
  overflow-y: scroll;
  z-index: 1000;
}

/* warning */

#popup.popup-warning #popup_inner div.title,
#popup .popup-warning #popup_inner div.title {
  border-top-color: #f1990a !important;
}

#popup.popup-warning #popup_inner .ui_button.primary-btn,
#popup .popup-warning #popup_inner .ui_button.primary-btn {
  background: #f1990a;
  border-color: #f1990a;
}

/* success */

#popup.popup-success #popup_inner div.title,
#popup .popup-success #popup_inner div.title {
  border-top-color: #54c053 !important;
}

#popup.popup-success #popup_inner .ui_button.primary-btn,
#popup .popup-success #popup_inner .ui_button.primary-btn {
  background: #54c053;
  border-color: #54c053;
}

#popup.popup-success #popup_inner .ui_button.primary-btn:hover,
#popup .popup-success #popup_inner .ui_button.primary-btn:hover {
  background: #44a043;
  border-color: #44a043;
}

/* danger / error */

#popup.popup-danger #popup_inner div.title,
#popup .popup-danger #popup_inner div.title,
#popup.popup-error #popup_inner div.title,
#popup .popup-error #popup_inner div.title {
  border-top-color: red !important;
  color: red;
}

#popup.popup-danger #popup_inner .ui_button.primary-btn,
#popup .popup-danger #popup_inner .ui_button.primary-btn {
    background: #f8525b;
    border-color: #f8525b;	
}

#popup.popup-error #popup_inner .ui_button.primary-btn,
#popup .popup-error #popup_inner .ui_button.primary-btn {
  background: #ff2d38;
  border-color: #ff2d38;
}

#popup.popup-danger #popup_inner .ui_button.primary-btn:hover,
#popup .popup-danger #popup_inner .ui_button.primary-btn:hover,
#popup.popup-error #popup_inner .ui_button.primary-btn:hover,
#popup .popup-error #popup_inner .ui_button.primary-btn:hover {
  background: #e8424b;
  border-color: #e8424b;
}

/* info */

#popup.popup-info #popup_inner div.title,
#popup .popup-info #popup_inner div.title {
  border-top-color: #4576c9;
}

#popup.popup-info #popup_inner .ui_button.primary-btn,
#popup .popup-info #popup_inner .ui_button.primary-btn {
  background-color: #5ea8ff;
}

#popup.popup-info #popup_inner .ui_button.primary-btn:hover,
#popup .popup-info #popup_inner .ui_button.primary-btn:hover {
  background-color: #78bdff;
}

#popup.popup-info #popup_inner .ui_button.primary-btn:active,
#popup .popup-info #popup_inner .ui_button.primary-btn:active {
  background-color: #4e94e1;
}

#popup.popup-danger,
#popup .popup-danger {
  background: rgba(255,255,255,.8);
  height: 100%;
}

/* video */

#popup.video {
  background: rgba(0,0,0,.65);
  height: 100%;
}

  #popup.video #popup_outer {
    margin: 30px auto;
  }
  
  #popup.video #popup_outer div.title {
    background: black;
    border: 0;
    color: #fff;
  }
  
  #popup.video #popup_outer div.title .title_text,
  #popup.video #popup_outer div.title .title_text a {
    color: #fff;
  }
  
  #popup.video #popup_outer div.content {
    max-height: 450px;
  }
  
#popup .content .bbl,
#popup .content .btl {
  border-color: #e0e0e0;
}

/* FORM POPUP */

#popup #popup_overlay.popup-form div.content { 
  max-height: 380px;
  padding: 15px 25px;
}

#popup #popup_overlay.popup-form.xsm-popup div.content,
#popup #popup_overlay.popup-form.sm-popup div.content {
	padding: 10px;
}

#popup_overlay.popup-form .footer .ui_main_action_set { float: left; }
#popup_overlay.popup-form:not(.create-form) .footer .ui_main_action_set {
  float: right;
}

#popup .ui_aux_action_set a.button_link {
  padding: 7px 2px;
}

#popup_overlay.popup-form.create-form .popup_section .footer .ui_aux_action_set {
  float: right; 
}

.popup_section .footer .ui_aux_action_set,
.ui_composer_actions .ui_aux_action_set {
  float: left;
}

.noscroll {
    overflow: hidden !important;
}

#overlay #overlay_outer {
    overflow: scroll;
    z-index: 1500;
    cursor: -webkit-zoom-out;
    cursor: -moz-zoom-out;
    cursor: zoom-out;
}

#overlay_inner {
    background: white;
    box-shadow: 0 3px 12px rgba(35, 35, 35, .5);
    margin: 10px auto 30px;
    padding: 10px 25px;
    position: static;
    width: 620px;
}

#overlay_inner .overlay_header {
    background: #fff;
    border-bottom: 1px solid #ccc;
    margin: -10px -25px 20px -25px;
    padding: 20px 25px 15px;
}

#overlay_inner .photo a {
    cursor: pointer;
}

#popup_outer {
  background: rgba(0,0,0,.4);
  border-radius: 5px;
  box-shadow: rgba(0,0,0,.2) 0px 1px 15px;
  margin: 69px auto;
  padding: 5px;
  width: 480px;
  z-index: 2000;
}

#body #popup_page { margin: 0 auto; padding: 40px 0; }
#body #popup_page #popup_outer { background-color: rgba(0,0,0,.1); margin: 0 auto; padding: 10px; }

#popup.popup-danger div#popup_outer { width: 320px; }

#popup_outer.loading {
  margin: 66px auto;
  width: 320px;
}

#popup_inner {
  background: white;
  color: #222;
  overflow: visible;
}

#popup_inner div.loading {
  font-size: 27px;
  padding: 28px;
}

#popup_inner div.loading-sm {
  font-size: 20px;
  padding: 20px;
}

.popup_section div.title {
  background: #fff;
  border: 0;
  border-bottom: 1px solid #ddd;
  border-top: 2px solid #e14646;
  font-size: 16px;
  font-weight: bold;
  padding: 6px 10px;
  text-transform: none;
}

.create-form .popup_section div.title {
	font-weight: normal;
}

.popup-form .popup_section div.title .title_link {
  color: #999;
}

.ui_section.popup_section div.title .title_link,
.ui_section.popup_section div.title .title_actions,
.ui_section.popup_section div.title .title_text { 
  line-height: 30px;
}

.popup_section div.title .title_link .count {
  font-size: 16px;
	font-weight: normal;
}

.popup_section div.title .title_link,
.popup_section div.title .title_actions {
  float: right;
}

.popup_section .content {
  background: #f8f8f8;
  max-height: 330px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px;
}

.popup_section div.content .ui_stream_title { 
  background: #f8f8f8; 
}

/* ANNOUNCEMENT POPUP */

#popup_overlay.popup-announce {
  background: rgba(255,255,255, .7);
}

#popup_overlay.popup-announce #popup_outer {
  width: 60%;
}

.popup-announce .popup_section div.title {
  background: none;
  border: 0;
  font-size: 1.7em;
  font-weight: bold;
  padding: 40px 25px 10px;
}

.popup-announce .popup_section .close_btn {
  position: absolute;
  right: 10px;
  top: 10px;
}

.popup-announce .popup_section .close_btn .ui_button.icon-btn.x-btn {
  background-color: #999;
  border-radius: 100%;
  border-width: 0;
  color: #fff;
  font-size: 24px;
  height: 34px !important;
  width: 34px !important;
}

.popup-announce .popup_section .close_btn .ui_button.icon-btn.x-btn:hover {
  background: #000;
}

  .popup-announce .popup_section div.title .title_actions {
    position: absolute;
    right: 10px;
    top: 10px;
  }
  
  .popup-announce .popup_section div.title .title_actions a.ui_button {
    border-radius: 100%;
  }

.popup-announce .popup_section .title_text {
  float: none !important;
  text-align: center;
}

.popup-announce .popup_section div.content {
  background: none;
  padding: 25px 25px;
}

/* HOVERCARD */

.hovercard_positioner {
    position: absolute;
}

.hovercard_wrapper {
    bottom: 0;
    padding-bottom: 8px;
    position: absolute;
    width: 380px;
    z-index: 1800;
}

.hovercard_wrapper .inline_ad {
    display: none;
}

.hovercard_wrapper.top {
    bottom: auto;
    padding: 8px 0 0 0;
}

body.noscroll .hovercard_wrapper {
    z-index: 3000;
}

.hovercard_wrapper .hovercard_inner {
    background: white;
    border: 1px solid #aaa;
    border-bottom: 1px solid #666;
    box-shadow: 0 3px 12px rgba(35, 35, 35, .5);
}

.hovercard_wrapper i.caret {
  border: 0;
  display: block;
  height: 9px;
  margin: 0;
  position: absolute;
  vertical-align: top;
  width: 16px;
}

.hovercard_wrapper.bottom i.caret {
    background: url('/foundation_static/images/hovercard_carat.png');
    bottom: 0px;
}

.hovercard_wrapper.top i.caret {
    background: url('/foundation_static/images/hovercard_top_carat.png');
    top: 0px;
}

.hovercard_wrapper.left i.caret { left: 25px; }
.hovercard_wrapper.right i.caret { right: 25px; }

.hovercard_wrapper .ui_group.xlg-group .ui_group_img {
  margin: -10px 15px -10px -10px;
  width: 118px;
}

.hovercard_wrapper .box_item .ui_button {
    background: transparent;
    border: 1px dashed #bbb;
}

.hovercard_wrapper .box_item .ui_button:hover {
    background: #eee;
    border: 1px solid #666;
}

.hovercard img.fl_l,
.hovercard img.profilepic {
  border: 0;
  margin: -10px 10px -10px -10px;
  width: 118px;
}

/* ALT */

#popup.form {
  background: rgba(255,255,255,.8);
}

#popup .no_edit div.content {
  background: white;
}

/* HELP LINK */

.ui_help_link {
    background: url('/foundation_static/images/help.png') no-repeat 0 0;
    display: inline-block;
    height: 10px;
    width: 12px;
}

.ui_help_link:hover {
    background-position: 0 -11px;
}

  /* GROWLS */
  
  /* jQuery Growl
   * Copyright 2015 Kevin Sylvestre
   * 1.3.5
   */
  .ontop, #growls-default, #growls-tl, #growls-tr, #growls-bl, #growls-br, #growls-tc, #growls-bc, #growls-cc, #growls-cl, #growls-cr {
    z-index: 50000;
    position: fixed; }

  #growls-default {
    top: 10px;
    right: 10px; }
  #growls-tl {
    top: 10px;
    left: 10px; }
  #growls-tr {
    top: 10px;
    right: 10px; }
  #growls-bl {
    bottom: 10px;
    left: 10px; }
  #growls-br {
    bottom: 10px;
    right: 10px; }
  #growls-tc {
    top: 10px;
    right: 10px;
    left: 10px; }
  #growls-bc {
    bottom: 10px;
    right: 10px;
    left: 10px; }
  #growls-cc {
    top: 50%;
    left: 50%;
    margin-left: -125px; }
  #growls-cl {
    top: 50%;
    left: 10px; }
  #growls-cr {
    top: 50%;
    right: 10px; }
  #growls-tc .growl, #growls-bc .growl {
    margin-left: auto;
    margin-right: auto; }

  .growl {
    opacity: 0.9;
    filter: alpha(opacity=80);
    position: relative;
    border-radius: 4px;
    -webkit-transition: all 0.4s ease-in-out;
    -moz-transition: all 0.4s ease-in-out;
    transition: all 0.4s ease-in-out; }
    .growl.growl-incoming {
      opacity: 0;
      filter: alpha(opacity=0); }
    .growl.growl-outgoing {
      opacity: 0;
      filter: alpha(opacity=0); }
    .growl.growl-small {
      width: 200px;
      padding: 5px;
      margin: 5px; }
    .growl.growl-medium {
      width: 250px;
      padding: 10px;
      margin: 10px; }
    .growl.growl-large {
      width: 300px;
      padding: 15px;
      margin: 15px; }
    .growl.growl-default {
      color: #FFF;
      background: #7f8c8d; }
    .growl.growl-error {
      color: #FFF;
      background: #C0392B; }
    .growl.growl-notice {
      color: #FFF;
      background: #333; }
    .growl.growl-warning {
      color: #FFF;
      background: #F39C12; }
    .growl .growl-close {
      cursor: pointer;
      font-size: 14px;
      line-height: 18px;
      font-weight: normal;
      font-family: helvetica, verdana, sans-serif;
      position: absolute;
      top: 5px;
      right: 10px; }
    .growl .growl-pic {
      float: left;
      margin-right: 15px;
      width: 38px;
    }
    .growl .growl-title {
      font-size: 13px;
      font-weight: bold;
      line-height: 1.333; 
      margin-bottom: 5px; }
    .growl .growl-message {
      font-size: 13px;
      line-height: 1.333; }
		.growl a {
				border-bottom: 1px dashed white;
				color: white; 
				font-weight: bold; }
  
  
  /* LOADING BAR */
  
  #loadingbar {
    position: fixed;
    z-index: 2147483647;
    top: 0;
    left: -6px;
    width: 1%;
    height: 2px;
    background: #6affc7;
    -moz-border-radius: 1px;
    -webkit-border-radius: 1px;
    border-radius: 1px;
    -moz-transition: all 500ms ease-in-out;
    -ms-transition: all 500ms ease-in-out;
    -o-transition: all 500ms ease-in-out;
    -webkit-transition: all 500ms ease-in-out;
    transition: all 500ms ease-in-out;
  }

  #loadingbar.left {
    left: 100%;
    right: 0px;
    width: 100%;
  }

  #loadingbar.up {
    left: 0px;
    top: 100%;
    width: 5px;
    bottom: 0px;
    height: 100%;
  }

  #loadingbar.down {
    left: 0;
    width: 5px;
    height: 0;
  }

  #loadingbar.waiting dd, #loadingbar.waiting dt {
    -moz-animation: pulse 2s ease-out 0s infinite;
    -ms-animation: pulse 2s ease-out 0s infinite;
    -o-animation: pulse 2s ease-out 0s infinite;
    -webkit-animation: pulse 2s ease-out 0s infinite;
    animation: pulse 2s ease-out 0s infinite;
  }

  #loadingbar dt {
  opacity: .6;
  width: 180px;
  right: -80px;
  clip: rect(-6px,90px,14px,-6px);
  }

  #loadingbar dd {
    opacity: .6;
    width: 20px;
    right: 0;
    clip: rect(-6px,22px,14px,10px);
  }

  #loadingbar dd, #loadingbar dt {
    position: absolute;
    top: 0;
    height: 2px;
    -moz-box-shadow: #b91f1f 1px 0 6px 1px;
    -ms-box-shadow: #b91f1f 1px 0 6px 1px;
    -webkit-box-shadow: #B91F1F 1px 0 6px 1px;
    box-shadow: #B91F1F 1px 0 6px 1px;
    -moz-border-radius: 100%;
    -webkit-border-radius: 100%;
    border-radius: 100%;
  }

  #loadingbar.left dt {
  opacity: .6;
  width: 180px;
  left: -4px;
  clip: rect(-6px,185px,14px,25px);
  }

  #loadingbar.left dd {
    opacity: .6;
    width: 20px;
    left: 0;
    margin: 0;
    clip: rect(-6px,22px,14px,0px);
  }

  #loadingbar.left dd, #loadingbar.left dt {
    top: 0;
    height: 2px;
  }

  #loadingbar.down dt {
    opacity: .6;
    height: 180px;
    top: auto;
    bottom: -47px;
    clip: rect(-6px,20px,130px,-6px);
  }

  #loadingbar.down dd {
    opacity: .6;
    height: 20px;
    top: auto;
    bottom: 0;
    clip: rect(-6px,22px,20px,10px);
    margin: 0;
  }

  #loadingbar.down dd, #loadingbar.down dt {
    left: -5px;
    right: auto;
    width: 10px;
  }

  #loadingbar.up dt {
    opacity: .6;
    height: 180px;
    bottom: auto;
    top: -10px;
    clip: rect(13px,20px,190px,-6px);
  }

  #loadingbar.up dd {
    opacity: .6;
    height: 20px;
    bottom: auto;
    top: 0;
    clip: rect(-6px,22px,25px,10px);
    margin: 0;
  }

  #loadingbar.up dd, #loadingbar.up dt {
    left: -5px;
    right: auto;
    width: 10px;
  }

  @keyframes pulse {
    30% { opacity:0.6; }
    60% { opacity:0; }
    100% { opacity:0.6; }
  }

  @-moz-keyframes pulse 
  {
    30% { opacity:0.6; }
    60% { opacity:0; }
    100% { opacity:0.6; }
  }

  @-ms-keyframes pulse 
  {
    30% { opacity:0.6; }
    60% { opacity:0; }
    100% { opacity:0.6; }
  }

  @-webkit-keyframes pulse 
  {
    30% { opacity:0.6; }
    60% { opacity:0; }
    100% { opacity:0.6; }
  }

/* ==========================================================================
   RESPONSIVE — popups / overlays (from responsive.css)
   ========================================================================== */

/* Mobile phones */
@media screen and (max-width: 570px) {

#popup div#popup_outer {
        margin: 0 !important;
        padding: 15px;
    }
#popup #popup_overlay.popup-form div.content {
    max-height: 340px;
    padding: 10px;
  }
#body #popup_page { margin: 0; }
#popup_overlay.create-form .popup_section .footer .ui_action_set,
  #popup .popup-form .footer .ui_action_set {
    float: left;
  }
.popup-announce .popup_section div.title {
    font-size: 18px;
  }

}

/* Phone / tablet landscape */
@media screen and (max-width: 880px) and (orientation: landscape) {

#popup div#popup_outer.popup-loading,
  body.is_web #popup div#popup_outer.popup-loading {
    margin: 20px;
    max-width: none;
    width: auto;
  }
#popup div.content { max-height: 160px; }

}

/* iPad / tablet portrait */
@media screen and (max-width: 880px) and (min-width: 763px) {

#popup div.content { max-height: 400px; }

}

/* Single column (phones + small tablets) */
@media screen and (max-width: 762px) {

#popup_overlay.contact-form #popup_outer {
		bottom: 75px;
		margin: 0;
		position: absolute;
		right: 0px;
	}
#popup div#popup_outer,
  #popup .popup-form div#popup_outer,
  #popup.popup-danger div#popup_outer,
  #body #popup_page #popup_outer,
  #popup_overlay.sm-popup div#popup_outer,
  #popup_overlay.popup-color div#popup_outer { 
    margin: 10px; 
    max-width: none !important;
    width: auto !important; 
  }
#popup div#popup_outer.popup-loading { margin: 20px; }
#popup_overlay.popup-form .footer .ui_main_action_set {
    margin: 0;
  }

}

/* Tall viewports */
@media screen and (min-height: 1050px) {

#popup #popup_overlay.popup-form div.content {
    max-height: 600px;
  }

}

/* Widescreen / large display */
@media screen and (min-width: 1360px) {

#popup_outer { margin: 73px auto; }
#popup_overlay.popup-color:not(.contact-form) #popup_outer { margin: 71px auto; }

}
