/* 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/. */

/* Panel styles */
.panel {
  /* XXX force proper content positioning by adding extra margin space
   * taken away by reset.css
   */
  margin-top: 7px;
  margin-bottom: 7px;

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

.spacer {
  margin-bottom: 1em;
}

.share {
  background: #fbfbfb;
}

.share .description,
.share .action input,
.share > .action > .invite > .url-actions {
  margin: 14px 14px 0 14px;
}

.share .description {
  font-weight: 700;
}

.share .action input {
  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. */
  font-size: 1em;
  padding: 0 10px;
  border-radius: 2px;
  outline: 0;
  height: 26px;
  width: calc(100% - 28px);
}

.share .action input.pending {
  background-image: url(../img/loading-icon.gif);
  background-repeat: no-repeat;
  background-position: right;
}

.share .action .btn {
  background-color: #0096DD;
  border: 1px solid #0095DD;
  color: #fff;
  width: 50%;
  height: 26px;
  text-align: center;
}

.share > .action .btn:hover {
  background-color: #008ACB;
  border: 1px solid #008ACB;
}

.share > .action > .invite > .url-actions > .btn:first-child {
  -moz-margin-end: 1em;
}

/* Specific cases */

.panel #messages .alert {
  margin-bottom: 0;
}

/* Dropdown menu (shared styles) */

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: -28px;
  left: 0;
  background: #fdfdfd;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  list-style: none;
  padding: 5px;
  border-radius: 2px;
}

body[dir=rtl] .dropdown-menu-item {
  left: auto;
  right: 10px;
}

.dropdown-menu-item {
  text-align: start;
  margin: .3em 0;
  padding: .2em .5em;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 1em;
  white-space: nowrap;
}

.dropdown-menu-item:hover {
  border: 1px solid #ccc;
  background: #eee;
}

/* DnD menu */

.dnd-status {
  border: 1px solid transparent;
  padding: 2px 4px;
  font-size: .9em;
  cursor: pointer;
  border-radius: 3px;
}

.dnd-status:hover {
  border: 1px solid #DDD;
  background: #F1F1F1;
}

/* Status badges -- Available/Unavailable */

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

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

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

/* Sign in/up link */

.signin-link {
  display: none; /* XXX This should be displayed as soon bug 979845 lands */
  flex: 2 1 auto;
  margin-top: 14px;
  border-right: 1px solid #aaa;
  padding-right: 1em;
  margin-right: 1em;
  text-align: right;
}

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

/* Settings (gear) menu */

.btn-settings {
  display: none; /* XXX This should be displayed as soon bug 979845 lands */
  background: transparent url(../img/svg/glyph-settings-16x16.svg) no-repeat center center;
  background-size: contain;
  width: 12px;
  height: 12px;
}

.footer .btn-settings {
  margin-top: 17px; /* used to align the gear icon with the availability dropdown menu inner text */
  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;
}

.settings-menu .icon {
  display: inline-block;
  background-size: contain;
  width: 12px;
  height: 12px;
  margin-right: 1em;
}

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

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

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

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

/* Terms of Service */

.terms-service {
  padding: 3px 10px 10px;
  background: #FFF;
  text-align: center;
  opacity: .5;
  transition: opacity .3s;
  font-family: 'Lucida Grande', sans-serif;
  font-size: .9em;
}

.terms-service a {
  color: #0095dd;
}

/* Footer */

.footer {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-content: stretch;
  align-items: flex-start;
  font-size: 1em;
  border-top: 1px solid #D1D1D1;
  background: #EAEAEA;
  color: #7F7F7F;
  padding: 14px;
  margin-top: 14px;
}
