/**
 * EU Legal Guarantee Notice & GARAN Label
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Commercial License
 * you can't distribute, modify or sell this code
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file
 * If you need help please contact leo@prestachamps.com
 *
 * @author    PrestaChamps
 * @copyright PrestaChamps
 * @license   commercial
 */

/* AJAX results (test email, cache purge, preview errors) */
.eugl-ajax-result {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 3px;
}

.eugl-ajax-result.eugl-result-success {
  background: #dff0d8;
  color: #3c763d;
}

.eugl-ajax-result.eugl-result-error {
  background: #f2dede;
  color: #a94442;
}

.eugl-ajax-result.eugl-result-warning {
  background: #fcf8e3;
  color: #8a6d3b;
}

/* Notice preview trigger (the storefront CSS styles .eugl-btn; this is the fallback when it is absent) */
.eugl-preview-trigger {
  margin: 10px 0;
}

.eugl-preview-trigger .eugl-btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 3px;
  background: #003399;
  color: #fff;
  text-decoration: none;
}

/* Label preview panel (settings tab and product tab) */
.eugl-preview {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  margin: 10px -8px 0;
}

.eugl-preview-column {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 280px;
  flex: 1 1 280px;
  max-width: 100%;
  padding: 0 8px 10px;
}

.eugl-preview-column h4 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #555;
}

.eugl-preview-svg img,
.eugl-preview-png img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fff;
}

.eugl-preview-nested img {
  max-width: 184px;
}

.eugl-preview-empty {
  padding: 20px;
  border: 1px dashed #ccc;
  border-radius: 3px;
  color: #777;
  text-align: center;
}

.eugl-truncated {
  display: none;
  margin-top: 6px;
}

.eugl-truncated.eugl-visible {
  display: block;
}

/* Product page tab: shared by the 1.7.8 page and the 8/9 "Modules" tab */
.eugl-product-tab {
  padding: 10px 0;
}

.eugl-product-tab .eugl-mode-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.eugl-product-tab .eugl-mode-list li {
  margin-bottom: 6px;
}

.eugl-product-tab .eugl-mode-list label {
  font-weight: normal;
  cursor: pointer;
}

.eugl-product-tab .eugl-mode-list input[type="radio"] {
  margin-right: 6px;
}

.eugl-product-tab .eugl-custom-fields {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fafafa;
}

.eugl-product-tab .eugl-custom-fields[hidden] {
  display: none;
}

.eugl-product-tab .eugl-years-input {
  max-width: 120px;
}

.eugl-product-tab .eugl-compliance {
  margin-top: 12px;
}

.eugl-product-tab .eugl-field-error {
  display: none;
  margin-top: 4px;
  color: #a94442;
}

.eugl-product-tab .eugl-field-error.eugl-visible {
  display: block;
}

/* Producer guarantee input: number + unit select (product tab, brand rules, bulk dialog) */
.eugl-guarantee {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.eugl-guarantee .eugl-guarantee-unit {
  width: auto;
  min-width: 90px;
  max-width: 130px;
}

.eugl-guarantee .eugl-field-error,
.eugl-guarantee .eugl-guarantee-locked-note {
  flex-basis: 100%;
  margin: 0;
}

.eugl-guarantee .eugl-field-error {
  display: none;
  color: #a94442;
}

.eugl-guarantee .eugl-field-error.eugl-visible {
  display: block;
}

.eugl-guarantee--locked .eugl-guarantee-value {
  background: #f5f5f5;
}

.eugl-short-note {
  font-style: italic;
}

.eugl-preview-short {
  max-width: 320px;
}

/* Brand rules editor */
.eugl-brand-rules .eugl-years-input {
  max-width: 110px;
}

/* Products list: number + unit dialog of the bulk action */
.eugl-bulk-dialog-backdrop {
  position: fixed;
  z-index: 10000;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.eugl-bulk-dialog {
  width: 420px;
  max-width: calc(100vw - 32px);
  padding: 18px 20px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.eugl-bulk-dialog h4 {
  margin: 0 0 12px;
}

.eugl-bulk-dialog .eugl-guarantee-value {
  max-width: 120px;
}

.eugl-bulk-dialog .eugl-field-error {
  display: none;
  color: #a94442;
}

.eugl-bulk-dialog .eugl-field-error.eugl-visible {
  display: block;
}

.eugl-bulk-dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.eugl-brand-rules td {
  vertical-align: middle;
}

/* Products list: bulk duration input */
.eugl-bulk-years {
  display: inline-block;
  width: 90px;
  margin-left: 6px;
}

/* Notice preview modal (the storefront modal on the settings page). The admin
   theme's ".bootstrap button" rule (font-size and line-height: inherit) beats
   the storefront style of the close button and shrinks its cross to 12 px, so
   the 36 px target could not be seen. The id selector outranks it: a 24 px
   cross centred on a visible 36 x 36 px disc (never below 32 x 32 px). */
#eugl-modal .eugl-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f1f1;
  color: #222;
  font-size: 24px;
  line-height: 1;
}

#eugl-modal .eugl-modal__close:hover,
#eugl-modal .eugl-modal__close:focus {
  background: #e2e2e2;
  outline: 2px solid #034ea2;
}
