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

@import "defines.css";

html[details] {
  background-color: var(--color_about_item);
}

iframe {
  padding: 0;
  margin: 0;
  border:none;
}

a {
  text-decoration: none;
  color: #0096DD;
}

a:active {
  color: #0082C6;
}

.details {
  width: 100%;
}

.details > div {
  display: inline;
}

.hidden {
  display: none;
}

.version {
  /* title is not localized, so keep the margin on the left side */
  margin-left: .67em;
}

.description {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.warn-unsigned {
  border-top: 1px solid var(--color_about_item_border);
  border-bottom: 1px solid var(--color_about_item_border);
  margin-top: 1em;
  margin-bottom: 1em;
  padding: 1em;
  padding-inline-start: calc(var(--icon-size) + var(--icon-margin) * 2);
  background-image: url("chrome://browser/skin/images/grey-caution.svg");
  background-size: var(--icon-size);
  background-position: var(--icon-margin);
  background-repeat: no-repeat;
  display: none;
}

.addon-item[isUnsigned="true"] .warn-unsigned {
  display: block;
}

.status {
  border-top: 1px solid var(--color_about_item_border);
  font-weight: bold;
  padding: 0.5em;
  width: 100%;
}

.addon-item[isDisabled="true"] .options-header,
.addon-item[optionsURL=""] .options-header,
.addon-item[isDisabled="true"] .options-box,
.addon-item[optionsURL=""] .options-box {
  display: none;
}

.update-indicator {
  position: absolute;
  right: var(--icon-margin);
  top: var(--icon-margin);
  width: var(--icon-size);
  height: var(--icon-size);
}

.addon-item[hasUpdate="false"] > .update-indicator {
  display: none;
}

#addons-details > .list-item {
  margin-bottom: 42px;
  border-bottom: none;
}

#addons-details > .list-item:active {
  background-color: #fff;
}

/* Buttons */

.buttons {
  display: grid;
  width: 100%;
  position: fixed;
  bottom: 0px;
}

.buttons::after {
  content: "";
  border-right: 1px solid var(--color_about_item_border);
}

.buttons > button {
  -moz-appearance: none;
  font-size: 1em;
  border: 1px solid transparent;
  border-right: none;
  border-top-color: var(--color_about_item_border);
  border-inline-start-color: var(--color_about_item_border);
  background-color: var(--color_about_item);
  padding: 0.75em 0.5em;
  border-radius: 0;
}

button#update-btn {
  grid-row: 1;
  grid-column: span 2;
}

button:not(#update-btn) {
  grid-row: 2;
}

.buttons > button:active {
  background-color: #eeeeee;
}

.buttons > button[disabled="true"] {
  color: #b5b5b5;
}

.buttons > button[hidden="true"] {
  display: none;
}

.buttons:first-child {
  border-inline-start-color: transparent;
}

.hide-on-enable,
.show-on-error,
.show-on-uninstall,
.show-on-install,
.show-on-restart,
div[isDisabled="true"] .hide-on-disable {
  display: none;
}

div[error] .show-on-error,
div[opType="needs-restart"] .show-on-restart,
div[opType="needs-uninstall"] .show-on-uninstall,
div[opType="needs-install"] .show-on-install,
div[opType="needs-enable"] .show-on-enable,
div[opType="needs-disable"] .show-on-disable,
div[isDisabled="true"] .show-on-disable {
  display: -moz-box;
}

div[opType="needs-restart"] .hide-on-restart,
div[opType="needs-uninstall"] .hide-on-uninstall,
div[isDisabled="true"][opType="needs-uninstall"],
div[opType="needs-install"] .hide-on-install,
div[opType="needs-enable"] .hide-on-enable,
div[opType="needs-disable"] .hide-on-disable {
  display: none;
}

#browse-title:dir(rtl) {
  background-position: left;
  background-image: url("chrome://browser/skin/images/chevron-rtl.png");
}

/* open_in_tab options button style */

button#open-addon-options {
  font-size: 1em;
  border: 1px solid var(--color_about_item_border);
  background-color: var(--color_about_item);
  width: 100%;
  padding: 0.75em 0.5em;
  border-radius: 0;
}
