/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

body {
  background: none;
}

/* Panel styles */

.panel {
  /* hide the extra margin space that the panel resizer now wants to show */
  overflow: hidden;
}

/* Notifications displayed over tabs */

.panel .messages {
  margin: 0;
}

.panel .messages .alert {
  margin: 0;
}

/* Sign-in request view */

.sign-in-request {
  text-align: center;
  vertical-align: middle;
  margin: 2em 0;
}

.sign-in-request > h1 {
  font-size: 1.7em;
  margin-bottom: .2em;
}

.sign-in-request > h2,
.sign-in-request > a {
  font-size: 1.2em;
}

.sign-in-request > a {
  cursor: pointer;
  color: #0295df;
}

.sign-in-request > a:hover:active {
  text-decoration: underline;
}

.sign-in-request-button {
  font-size: 1rem;
  margin: 1rem;
  width: 80%;
  padding: .5rem 1rem;
  border-radius: 3px;
}

/* Tabs and tab selection buttons */

.tab-view-container {
  background-image: url("../shared/img/beta-ribbon.svg#beta-ribbon");
  background-size: 36px 36px;
  background-repeat: no-repeat;
}

.tab-view {
  display: flex;
  flex-direction: row;
  padding: 10px 0;
  border-bottom: 1px solid #ccc;
  color: #000;
  border-top-right-radius: 2px;
  border-top-left-radius: 2px;
  list-style: none;
}

.tab-view > li {
  flex: 1;
  text-align: center;
  color: #ccc;
  -moz-border-end: 1px solid #ccc;
  padding: 0 10px;
  height: 16px;
  cursor: pointer;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  background-position: center;
}

.tab-view > li:last-child {
  -moz-border-end-style: none;
}

.tab-view > li[data-tab-name="call"],
.tab-view > li[data-tab-name="rooms"] {
  background-image: url("../shared/img/icons-16x16.svg#precall");
}

.tab-view > li[data-tab-name="call"]:hover,
.tab-view > li[data-tab-name="rooms"]:hover {
  background-image: url("../shared/img/icons-16x16.svg#precall-hover");
}

.tab-view > li[data-tab-name="call"].selected,
.tab-view > li[data-tab-name="rooms"].selected {
  background-image: url("../shared/img/icons-16x16.svg#precall-active");
}

.tab-view > li[data-tab-name="contacts"] {
  background-image: url("../shared/img/icons-16x16.svg#contacts");
}

.tab-view > li[data-tab-name="contacts"]:hover {
  background-image: url("../shared/img/icons-16x16.svg#contacts-hover");
}

.tab-view > li[data-tab-name="contacts"].selected {
  background-image: url("../shared/img/icons-16x16.svg#contacts-active");
}

.tab {
  display: none;
}

.tab.selected {
  display: block;
}

/* Content area and input fields */

.content-area {
  padding: .5rem 1rem;
}

.content-area header {
  font-weight: 700;
}

#fte-getstarted {
  padding-top: .5rem;
  padding-bottom: .5rem;
}

#fte-title {
  text-align: center;
  margin-bottom: .5rem;
}

#fte-button {
  width: 50%;
  display: block;
  margin-left: auto;
  margin-right: auto;
  font-size: 1rem;
  padding: .5rem 1rem;
}

#fte-getstarted + #powered-by-wrapper {
  position: absolute;
  bottom: 0;
}

/* Need to remove when these rules when the Beta tag is removed */
#share-link-header {
  -moz-padding-start: 20px;
}
#fte-getstarted + .generate-url > #share-link-header,
.tab-view + .tab .content-area > .generate-url > #share-link-header {
  /* The header shouldn't be indented if the tabs are present. */
  -moz-padding-start: 0;
}

.content-area label {
  display: block;
  width: 100%;
  margin-top: 10px;
  font-size: 10px;
  color: #777;
}

.content-area input {
  display: block;
  width: 100%;
  outline: none;
  border-radius: 2px;
  margin: 5px 0;
  border: 1px solid #ccc;
  height: 24px;
  padding: 0 10px;
}

.content-area input:invalid {
  box-shadow: none;
}

.content-area input:not(.pristine):invalid {
  border-color: #d74345;
  box-shadow: 0 0 4px #c43c3e;
}

/* Rooms */
.rooms {
  min-height: 100px;
  padding: 0 1rem;
}

.rooms > h1 {
  font-weight: bold;
  color: #999;
  padding: .5rem 0;
}

.new-room-view > .context {
  margin: .5rem 0 0;
  background-color: #DEEFF7;
  border-radius: 3px 3px 0 0;
  padding: .5rem;
}

.new-room-view > .context > .context-enabled {
  margin-bottom: .5rem;
  display: block;
}

.new-room-view > .context > .context-enabled > input {
  -moz-margin-start: 0;
}

.new-room-view > .context > .checkbox-wrapper {
  margin-bottom: .5em;
}

.new-room-view > .context > .checkbox-wrapper > .checkbox {
  border-color: #0096dd;
  background-color: #fff;
}

.new-room-view > .context > .checkbox-wrapper > .checkbox.checked {
  background-image: url("../shared/img/check.svg#check-blue");
}

.new-room-view > .context > .checkbox-wrapper > label {
  color: #3c3c3c;
  font-weight: 700;
}

.new-room-view > .btn {
  display: block;
  font-size: 1rem;
  margin: 0 auto .5rem;
  width: 100%;
  padding: .5rem 1rem;
  border-radius: 0 0 3px 3px;
}

/* Remove when bug 1142671 is backed out. */
.new-room-view > .context.hide + .new-room-button {
  border-radius: 3px;
  margin-top: 0.5rem;
}

.room-list {
  max-height: 335px; /* XXX better computation needed */
  min-height: 7px;
  overflow: auto;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  margin-left: -1rem;
  margin-right: -1rem;
}

.room-list:empty {
  border-bottom-width: 0;
}

.room-list > .room-entry {
  padding: .5rem 1rem;
  /* Always show the default pointer, even over the text part of the entry. */
  cursor: default;
}

.room-list > .room-entry > h2 {
  display: inline-block;
  font-size: .85rem;
  color: #777;
  /* See .room-entry-context-item for the margin/size reductions. */
  width: calc(100% - 1rem - 16px);
}

.room-list > .room-entry.room-active > h2 {
  font-weight: bold;
  color: #000;
}

.room-list > .room-entry > h2 > .room-notification {
  display: none;
  background: #00a0ec;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  -moz-margin-end: .3rem;
}

.room-list > .room-entry.room-active > h2 > .room-notification {
  display: inline-block;
}

.room-list > .room-entry:hover {
  background: #f1f1f1;
}

.room-list > .room-entry:not(:last-child) {
  border-bottom: 1px solid #ccc;
}

.room-list > .room-entry > p {
  margin: 0;
  padding: .2rem 0;
}

.room-list > .room-entry > p > a {
  color: #777;
  opacity: .5;
  transition: opacity .1s ease-in-out 0s;
  text-decoration: none;
}

.room-list > .room-entry > p > a:hover {
  opacity: 1;
  text-decoration: underline;
}

@keyframes drop-and-fade-in {
  0%   {opacity: 0; top: -15px;}
  25%  {opacity: 0; top: -15px;}
  100% {opacity: 1; top: 0px;}
}

.room-list > .room-entry > h2 > button {
  display: inline-block;
  position: relative;
  width: 24px;
  height: 24px;
  border: none;
  margin: .1em; /* relative to _this_ line's font, not the document's */
  -moz-margin-start: .5em;
  background-color: transparent;  /* override browser default for button tags */
  top: -15px;
}

.room-list > .room-entry:hover > h2 > button {
  animation: drop-and-fade-in 0.250s;
  animation-fill-mode: forwards;
}

.room-list > .room-entry:hover > h2 > .copy-link {
  background-image: url(../shared/img/icons-16x16.svg#copy);
}

.room-list > .room-entry:hover > h2 > .delete-link {
  background-image: url(../shared/img/icons-16x16.svg#trash);
}

/* scale this up to 1.1x and then back to the original size */
@keyframes pulse {
  0%, 100% { transform: scale(1.0); }
  50%      { transform: scale(1.1); }
}

.room-list > .room-entry > h2 > .copy-link.checked {
  background: transparent url(../shared/img/icons-16x16.svg#checkmark);
  animation: pulse .150s;
  animation-timing-function: ease-in-out;
  top: 0px;
}

/* keep the various room-entry row pieces aligned with each other */
.room-list > .room-entry > h2 > button,
.room-list > .room-entry > h2 > span {
  vertical-align: middle;
}

/* Keep ".room-list > .room-entry > h2" in sync with these. */
.room-entry-context-item {
  display: inline-block;
  vertical-align: middle;
  -moz-margin-start: 1rem;
  height: 16px;
}

.room-entry-context-item > a > img {
  height: 16px;
  width: 16px;
}

/* Buttons */

.button-group {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.button-group > .button {
  flex: 1;
  margin: 0 7px;
}

.button-group > .button:first-child {
  -moz-margin-start: 0;
}

.button-group > .button:last-child {
  -moz-margin-end: 0;
}

.button {
  padding: 2px 5px;
  background-color: #fbfbfb;
  color: #333;
  border: 1px solid #c1c1c1;
  border-radius: 2px;
  min-height: 26px;
  font-size: 12px;
}

.button > .button-caption {
  vertical-align: middle;
}

.button:hover {
  background-color: #ebebeb;
}

.button:hover:active {
  background-color: #ccc;
  color: #111;
}

.button.button-accept {
  background-color: #5bc0a4;
  border-color: #5bc0a4;
  color: #fff;
}

.button.button-accept:hover {
  background-color: #47b396;
  border-color: #47b396;
  color: #fff;
}

.button.button-accept:hover:active {
  background-color: #3aa689;
  border-color: #3aa689;
  color: #fff;
}

.button-close {
  background-color: transparent;
  background-image: url(../shared/img/icons-10x10.svg#close);
  background-repeat: no-repeat;
  background-size: 8px 8px;
  border: none;
  padding: 0;
  height: 8px;
  width: 8px;
}

.button-close:hover,
.button-close:hover:active {
  background-color: transparent;
  border: none;
}

/* Spinner */

@keyframes spinnerRotate {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-size: 16px 16px;
}

.spinner.busy {
  background-image: url(../shared/img/spinner.png);
  animation-name: spinnerRotate;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@media (min-resolution: 2dppx) {
  .spinner.busy {
    background-image: url(../shared/img/spinner@2x.png);
  }
}

/* Share tab */

.generate-url-stack {
  margin: 14px 0;
  position: relative;
}

.generate-url-input {
  outline: 0;
  border: 1px solid #ccc; /* Overriding background style for a text input (see
                             below) resets its borders to a weird beveled style;
                             defining a default 1px border solves the issue. */
  border-radius: 2px;
  height: 26px;
  padding: 0 10px;
  font-size: 1em;
}

.generate-url-spinner {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  top: 4px;
  left: auto;
  right: 4px;
}

html[dir="rtl"] .generate-url-spinner {
  left: 4px;
  right: auto;
}

#fte-button,
.generate-url .button {
  background-color: #0096dd;
  border-color: #0096dd;
  color: #fff;
}

.generate-url .button:hover {
  background-color: #008acb;
  border-color: #008acb;
  color: #fff;
}

#powered-by,
.terms-service {
  color: #888;
  font-size: .9em;
}

#powered-by {
  border-top: 1px solid #ccc;
  padding-top: .5rem;
  text-align: center;
  margin-top: 0;
}

#powered-by-logo {
  display: inline-block;
  margin-left: 10px;
  margin-right: 10px;
  vertical-align: middle;
  background-image: url("../shared/img/telefonica.png");
  background-size: 72px 20px;
  width: 72px;
  height: 20px;
}

#powered-by-logo.en-GB,
#powered-by-logo.de {
  background-image: url("../shared/img/02.png");
  background-size: 21px 20px;
  width: 21px;
  height: 20px;
}

#powered-by-logo.pt-BR {
  background-image: url("../shared/img/vivo.png");
  background-size: 53px 26px;
  width: 53px;
  height: 26px;
}

#powered-by-logo[class^="es-"] {
  background-image: url("../shared/img/movistar.png");
  background-size: 92px 20px;
  width: 92px;
  height: 20px;
}

@media (min-resolution: 2dppx) {
  #powered-by-logo {
    background-image: url("../shared/img/telefonica@2x.png");
  }

  #powered-by-logo.en-GB,
  #powered-by-logo.de {
    background-image: url("../shared/img/02@2x.png");
  }

  #powered-by-logo.pt-BR {
    background-image: url("../shared/img/vivo@2x.png");
  }

  #powered-by-logo[class^="es-"] {
    background-image: url("../shared/img/movistar@2x.png");
  }
}

.terms-service {
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: .5rem;
}

.terms-service > a {
  color: #00caee;
}

/* DnD menu */

.dnd-status {
  border: 1px solid transparent;
  padding: 2px 4px;
  margin: 0;
  /* Undo the start border + padding so that unhovered dnd-status is aligned
     as if there was no additional spacing. */
  -moz-margin-start: calc(-1px + -4px);
  font-size: .9em;
  cursor: pointer;
  border-radius: 3px;
}

.dnd-status:hover {
  border-color: #ddd;
  background-color: #f1f1f1;
}

/* Status badges -- Available/Unavailable */

.status {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 5px;
  border-radius: 50%;
}

.status-available {
  background-color: #6cb23e;
}

.status-dnd {
  border: 1px solid #888;
}

/* Sign in/up link */

.signin-link {
  flex: 2 1 auto;
  margin: 0;
  text-align: right;
}

.signin-link a {
  font-size: .9em;
  text-decoration: none;
  color: #888;
}

.footer-signin-separator {
  border-right: 1px solid #aaa;
  height: 16px;
  margin: 0 1em;
}

/* Settings (gear) menu */

.button-settings {
  display: inline-block;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
  background-color: #a5a;
  color: #fff;
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .9em;
  cursor: pointer;
  background: transparent url(../shared/img/svg/glyph-settings-16x16.svg) no-repeat center center;
  background-size: contain;
  width: 12px;
  height: 12px;
}

.footer .button-settings {
  opacity: .6;      /* used to "grey" the icon a little */
}

.settings-menu .dropdown-menu {
  /* The panel can't have dropdown menu overflowing its iframe boudaries;
     let's anchor it from the bottom-right, while resetting the top & left values
     set by .dropdown-menu */
  top: auto;
  left: auto;
  bottom: -8px;
  right: 14px;
}

html[dir="rtl"] .settings-menu .dropdown-menu {
  /* This is specified separately rather than using -moz-margin-start etc, as
     we need to override .dropdown-menu's values which can't use the gecko
     specific extensions. */
  left: 14px;
  right: auto;
}

.settings-menu .icon {
  background-size: contain;
  width: 12px;
  height: 12px;
  -moz-margin-end: 1em;
  margin-top: 2px;
}

.settings-menu .icon-settings {
  background: transparent url(../shared/img/svg/glyph-settings-16x16.svg) no-repeat center center;
}

.settings-menu .icon-tour {
  background: transparent url("../shared/img/icons-16x16.svg#tour") no-repeat center center;
}

.settings-menu .icon-account {
  background: transparent url(../shared/img/svg/glyph-account-16x16.svg) no-repeat center center;
}

.settings-menu .icon-signin {
  background: transparent url(../shared/img/svg/glyph-signin-16x16.svg) no-repeat center center;
}

.settings-menu .icon-signout {
  background: transparent url(../shared/img/svg/glyph-signout-16x16.svg) no-repeat center center;
}

.settings-menu .icon-help {
  background: transparent url(../shared/img/svg/glyph-help-16x16.svg) no-repeat center center;
}

/* Footer */

.footer {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-content: stretch;
  align-items: center;
  font-size: 1em;
  border-top: 1px solid #D1D1D1;
  background-color: #eaeaea;
  color: #7f7f7f;
  padding: .5rem 1rem;
}

.footer .signin-details {
  align-items: center;
  display: flex;
}

.footer .user-identity {
  color: #000;
  font-weight: bold;
  margin: 0;
}
