/* ================================================
   SCALUX - Consent Management Platform (CMP)
   Banner cookie-uri + panou de preferinte
   Culori literale (fara var()) ca sa functioneze
   si pe paginile promo/404 care nu incarca style.css
   ================================================ */

.sx-consent,
.sx-consent * {
  box-sizing: border-box;
}

.sx-consent {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #212529;
}

/* ---------- Banner ---------- */
.sx-consent__banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
  max-width: 1120px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-top: 3px solid #c9a962;
  border-radius: 12px;
  box-shadow: 0 20px 45px -10px rgba(26, 26, 46, 0.35);
  padding: 22px 24px;
  display: flex;
  gap: 24px;
  align-items: center;
  animation: sxConsentIn 0.35s ease-out both;
}

@keyframes sxConsentIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .sx-consent__banner { animation: none; }
}

.sx-consent__text {
  flex: 1 1 auto;
  min-width: 0;
}

.sx-consent__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #1a1a2e;
}

.sx-consent__desc {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  color: #495057;
}

.sx-consent__desc a {
  color: #8a6d2f;
  text-decoration: underline;
}

.sx-consent__desc a:hover {
  color: #c9a962;
}

.sx-consent__actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- Butoane ---------- */
/* Accept si Refuz au IDENTIC acelasi tratament vizual:
   aceeasi dimensiune, acelasi contur, aceeasi greutate.
   Cerinta art. 4 pct. 11 GDPR - consimtamant liber exprimat. */
.sx-consent__btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 13px 22px;
  min-width: 132px;
  border-radius: 8px;
  border: 1.5px solid #1a1a2e;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  text-align: center;
  white-space: nowrap;
}

.sx-consent__btn:hover {
  transform: translateY(-1px);
}

.sx-consent__btn:focus-visible {
  outline: 3px solid #c9a962;
  outline-offset: 2px;
}

.sx-consent__btn--accept {
  background: #1a1a2e;
  color: #ffffff;
}

.sx-consent__btn--accept:hover {
  background: #16213e;
}

.sx-consent__btn--reject {
  background: #ffffff;
  color: #1a1a2e;
}

.sx-consent__btn--reject:hover {
  background: #f1f3f5;
}

.sx-consent__btn--link {
  min-width: 0;
  border-color: transparent;
  background: transparent;
  color: #495057;
  text-decoration: underline;
  padding: 13px 10px;
  font-weight: 500;
}

.sx-consent__btn--link:hover {
  color: #1a1a2e;
  background: transparent;
}

/* ---------- Panou preferinte ---------- */
.sx-consent__overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483100;
  background: rgba(26, 26, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.sx-consent__panel {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.45);
}

.sx-consent__panel-head {
  padding: 24px 28px 16px;
  border-bottom: 1px solid #e9ecef;
  position: relative;
}

.sx-consent__panel-head h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  margin: 0 0 8px;
  color: #1a1a2e;
}

.sx-consent__panel-head p {
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
  color: #6c757d;
}

.sx-consent__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: none;
  background: #f1f3f5;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #495057;
}

.sx-consent__close:hover {
  background: #e9ecef;
  color: #1a1a2e;
}

.sx-consent__panel-body {
  padding: 8px 28px 4px;
}

.sx-consent__cat {
  border-bottom: 1px solid #f1f3f5;
  padding: 18px 0;
}

.sx-consent__cat:last-child {
  border-bottom: none;
}

.sx-consent__cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sx-consent__cat-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
}

.sx-consent__cat-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #6c757d;
  margin: 8px 0 0;
}

.sx-consent__cat-detail {
  font-size: 12px;
  line-height: 1.6;
  color: #adb5bd;
  margin: 6px 0 0;
}

/* Comutator */
.sx-consent__switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 27px;
  display: inline-block;
}

.sx-consent__switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.sx-consent__slider {
  position: absolute;
  inset: 0;
  background: #ced4da;
  border-radius: 999px;
  transition: background 0.2s;
  pointer-events: none;
}

.sx-consent__slider::before {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.sx-consent__switch input:checked ~ .sx-consent__slider {
  background: #c9a962;
}

.sx-consent__switch input:checked ~ .sx-consent__slider::before {
  transform: translateX(21px);
}

.sx-consent__switch input:focus-visible ~ .sx-consent__slider {
  outline: 3px solid #c9a962;
  outline-offset: 2px;
}

.sx-consent__switch input:disabled ~ .sx-consent__slider {
  background: #c9a962;
  opacity: 0.45;
  cursor: not-allowed;
}

.sx-consent__always {
  font-size: 12px;
  font-weight: 600;
  color: #8a6d2f;
  white-space: nowrap;
}

.sx-consent__panel-foot {
  padding: 18px 28px 24px;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- Link relansare din footer ---------- */
.sx-consent-reopen {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.sx-consent-reopen:hover {
  text-decoration: underline;
}

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
  .sx-consent__banner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 20px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-height: 82vh;
    overflow-y: auto;
  }

  .sx-consent__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .sx-consent__btn {
    width: 100%;
    min-width: 0;
  }

  .sx-consent__panel-foot {
    flex-direction: column;
  }

  .sx-consent__panel-foot .sx-consent__btn {
    width: 100%;
  }
}

/* Nu acoperi bara CTA mobila existenta a site-ului */
body.has-mobile-cta .sx-consent__banner {
  bottom: 74px;
}

@media (min-width: 861px) {
  body.has-mobile-cta .sx-consent__banner {
    bottom: 16px;
  }
}

/* ---------- Linie juridica minimala (pagini fara subsol complet) ---------- */
.sx-legal-mini {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  padding: 22px 16px 28px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12.5px;
  background: #1a1a2e;
}

.sx-legal-mini a {
  color: #adb5bd;
  text-decoration: none;
  cursor: pointer;
}

.sx-legal-mini a:hover {
  color: #c9a962;
  text-decoration: underline;
}

/* ---------- Informare si consimtamant in formulare ---------- */
.form-consent {
  margin: 16px 0 18px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Culorile se mostenesc din contextul in care e asezat formularul, ca sa ramana
   lizibile si pe fundal deschis, si pe fundal inchis. */
.form-consent__note {
  font-size: 12.5px;
  line-height: 1.6;
  color: inherit;
  opacity: 0.7;
  margin: 0 0 10px;
}

.form-consent__note a,
.form-consent__check a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.form-consent__check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  line-height: 1.5;
  color: inherit;
  opacity: 0.85;
  cursor: pointer;
}

.form-consent__check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #c9a962;
  cursor: pointer;
}

/* ---------- Tabele si note in documentele juridice ---------- */
.legal-content .legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 26px;
  font-size: 13.5px;
  display: block;
  overflow-x: auto;
  white-space: normal;
}

.legal-content .legal-table thead th {
  background: #1a1a2e;
  color: #ffffff;
  font-weight: 600;
  text-align: left;
  padding: 11px 13px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.legal-content .legal-table td {
  border-bottom: 1px solid #e9ecef;
  padding: 11px 13px;
  vertical-align: top;
  line-height: 1.55;
  color: #495057;
}

.legal-content .legal-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.legal-content .legal-table td:first-child {
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
}

.legal-content .legal-note {
  border-left: 3px solid #c9a962;
  background: #fdfbf6;
  padding: 12px 16px;
  margin: 18px 0 24px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #495057;
}

.legal-content h3 {
  margin-top: 26px;
  font-size: 17px;
}

@media (max-width: 700px) {
  .legal-content .legal-table {
    font-size: 12.5px;
  }
  .legal-content .legal-table td:first-child {
    white-space: normal;
  }
}
