/* 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/. */
html {
  font-size: 10px;
  font-family: menu;
}

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-color: #fbfbfb;
  background-size: 36px 36px;
  background-repeat: no-repeat;
}

.tab-view {
  position: relative;
  width: 100%;
  height: 4rem;
  line-height: 3.7rem;
  color: #4A4A4A;
  list-style: none;
  border-bottom: 2px solid #ccc;
}

.tab-view > li {
  display: inline-block;
  vertical-align: middle;
  line-height: 1.2rem;
  text-align: center;
  padding: 0;
  cursor: pointer;
}

.tab-view > .slide-bar {
  position: absolute;
  bottom: -2px;
  left: 0;
  height: .2em;
  width: 50%;
  background: #00A9DC;
  border: none;
  transition: margin .3s ease-in-out;
}

.tab-view li:nth-child(1).selected ~ .slide-bar {
  margin-left: 0;
}

.tab-view li:nth-child(2).selected ~ .slide-bar {
  margin-left: 50%;
}

html[dir="rtl"] .tab-view li:nth-child(1).selected ~ .slide-bar {
  margin-left: 50%;
}

html[dir="rtl"] .tab-view li:nth-child(2).selected ~ .slide-bar {
  margin-left: 0;
}

.tab-view > li > div {
  font-size: 1.2rem;
  pointer-events: none;
  display: inline;
}

.tab-view > li:before {
  content: "";
  pointer-events: none;
  display: inline-block;
  -moz-margin-end: .5rem;
  vertical-align: middle;
  height: 1.4rem;
  width: 1.4rem;
  transition-property: background-image;
}

.tab-view > li.selected {
  transition-delay: .3s;
}

.tab-view > li[data-tab-name="rooms"]:before {
  background-image: url("../shared/img/icons-14x14.svg#hello");
}

.tab-view > li[data-tab-name="rooms"]:hover:before {
  background-image: url("../shared/img/icons-14x14.svg#hello-hover");
}

.tab-view > li[data-tab-name="rooms"].selected:before {
  background-image: url("../shared/img/icons-14x14.svg#hello-active");
}

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

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

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

/* Styling for one tab */
.tab-view li:first-child:nth-last-child(2) {
  width: 100%;
}

.tab-view li:first-child:nth-last-child(2) > span {
  display: none;
}

.tab-view li:first-child:nth-last-child(2) > span {
  display: none;
}

.tab-view li:first-child:nth-last-child(2):before {
  background-image: url("../shared/img/icons-14x14.svg#hello-hover");
}

.tab-view li:first-child:nth-last-child(2) ~ div {
  display: none;
}

.tab-view li:first-child:nth-last-child(3),
.tab-view li:first-child:nth-last-child(3) ~ li {
  width: 50%;
}

.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: 1rem;
  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;
  height: 3rem;
  line-height: 3rem;
}

.new-room-view > .context-checkbox-checked {
  background-color: #dbf7ff;
}

.new-room-view > .context {
  margin: .5rem 0 .5rem;
  border-radius: 3px 3px 0 0;
  padding: .5rem 1rem ;
  margin-left: -1rem;
  margin-right: -1rem;
}

.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 {
  height: 2rem;
  margin-bottom: .5em;
  line-height: 2rem;
}

.new-room-view > .context > .checkbox-wrapper > .checkbox {
  border-color: #d8d8d8;
  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: #333;
  font-size: 1.1rem;
}

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

/* 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: .2rem 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: 1rem;
  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: #dbf7ff;
}

.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: 1.2rem;
  line-height: 1.2rem;
}

.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: #00a9dc;
}

/* 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);
  cursor: pointer;
  border-radius: 3px;
}

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

.status-available:before,
.status-unavailable:before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: bottom;
  background-repeat: no-repeat;
  background-size: cover;
  -moz-margin-end: .2rem;
  margin-bottom: -2px;
}

.dropdown-menu-item.status-available:before,
.dropdown-menu-item.status-unavailable:before {
  margin-bottom: 2px;
}

html[dir="rtl"] .dropdown-menu-item.status-available:before,
html[dir="rtl"] .dropdown-menu-item.status-unavailable:before {
  margin-right: -3px;
}

.status-available:before {
  background-image: url("../shared/img/icons-16x16.svg#status-available");
}

.status-unavailable:before {
  background-image: url("../shared/img/icons-16x16.svg#status-unavailable");
}

/* Status badges -- Available/Unavailable */
.status {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 5px;
  border-radius: 50%;
}

/* Sign in/up link */

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

.signin-link > a {
  font-weight: 500;
  text-decoration: none;
  color: #00A9DC;
}

/* Settings (gear) menu */

.button-settings {
  width: 10px;
  height: 10px;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  vertical-align: middle;
  background: transparent url("../shared/img/icons-10x10.svg#settings-cog");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  -moz-margin-start: .5em;
}

.user-details .dropdown-menu {
  bottom: 1.3rem; /* Just above the text. */
  left: -5px; /* Compensate for button padding. */
}

html[dir="rtl"] .user-details .dropdown-menu {
  right: -5px;
}

.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: 1.1em;
  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;
  background-repeat: no-repeat;
  background-position: center;
  width: 12px;
  height: 12px;
  -moz-margin-end: 1em;
  margin-top: 2px;
}

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

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

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

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

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

/* Footer */

.footer {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-content: stretch;
  align-items: center;
  font-size: 1rem;
  background-color: #fbfbfb;
  color: #666666;
  padding: .5rem 15px;
}

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

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