/* ===========================
   AMS Cookie Banner & Modal
   Premium Enterprise Styling
   =========================== */

:root{
  --ams-navy: #0f172a;
  --ams-navy-2: #0b1224;
  --ams-slate: #94a3b8;
  --ams-text: #e2e8f0;
  --ams-muted: #cbd5e1;
  --ams-border: rgba(255,255,255,0.14);
  --ams-border-2: rgba(15,23,42,0.10);
  --ams-gold: #d4a373;

  --ams-radius-lg: 16px;
  --ams-radius-md: 12px;
  --ams-shadow-lg: 0 18px 55px rgba(0,0,0,0.38);
  --ams-shadow-md: 0 10px 28px rgba(0,0,0,0.25);
}

/* ---------- Banner ---------- */
.cookie-banner{
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;

  display: none; /* JS îl pornește */
  max-width: 1180px;
  margin: 0 auto;

  color: var(--ams-text);
  border-radius: var(--ams-radius-lg);
  border: 1px solid var(--ams-border);

  background:
    radial-gradient(1200px 180px at 20% 0%, rgba(212,163,115,0.20), transparent 55%),
    linear-gradient(180deg, rgba(15,23,42,0.96), rgba(15,23,42,0.92));

  box-shadow: var(--ams-shadow-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cookie-banner__inner{
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px;
  flex-wrap: wrap;
}

.cookie-banner__text h3{
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #ffffff;
}

.cookie-banner__text p{
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ams-muted);
  max-width: 780px;
}

.cookie-banner__text a{
  color: var(--ams-gold);
  text-decoration: none;
  font-weight: 800;
}
.cookie-banner__text a:hover{
  text-decoration: underline;
}

.cookie-banner__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Buttons (banner + modal) */
.cookie-btn{
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.02);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease;
  letter-spacing: 0.2px;
}

.cookie-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.34);
  background: rgba(255,255,255,0.04);
}

.cookie-btn:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(212,163,115,0.28);
}

.cookie-btn--primary{
  background: var(--ams-gold);
  border-color: var(--ams-gold);
  color: var(--ams-navy);
}

.cookie-btn--primary:hover{
  opacity: 0.96;
}

/* ---------- Modal ---------- */
.cookie-modal{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none; /* JS îl pornește */
}

.cookie-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,0.70);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cookie-modal__card{
  position: relative;
  max-width: 860px;
  width: calc(100% - 32px);
  margin: 8vh auto 0 auto;

  background: #ffffff;
  border-radius: var(--ams-radius-lg);
  overflow: hidden;
  box-shadow: var(--ams-shadow-lg);
  border: 1px solid rgba(2,6,23,0.06);
}

.cookie-modal__header{
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  background:
    radial-gradient(900px 140px at 15% 0%, rgba(212,163,115,0.18), transparent 60%),
    linear-gradient(180deg, #ffffff, #fbfbfd);

  border-bottom: 1px solid #e5e7eb;
}

.cookie-modal__header h3{
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--ams-navy);
  letter-spacing: 0.2px;
}

.cookie-modal__close{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(15,23,42,0.02);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  color: var(--ams-navy);
  transition: .18s ease;
}
.cookie-modal__close:hover{
  background: rgba(15,23,42,0.05);
  transform: translateY(-1px);
}

.cookie-modal__body{
  padding: 18px;
}

.cookie-muted{
  margin: 0 0 14px 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

/* Preference blocks */
.cookie-pref{
  border: 1px solid #e5e7eb;
  border-radius: var(--ams-radius-md);
  padding: 16px;
  margin-bottom: 12px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(2,6,23,0.03);
}

.cookie-pref__row{
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.cookie-pref__title{
  margin: 0;
  font-weight: 900;
  color: var(--ams-navy);
  font-size: 15px;
}

.cookie-pref__desc{
  margin: 6px 0 0 0;
  color: #64748b;
  font-size: 13px;
  max-width: 560px;
}

/* Pills */
.cookie-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15,23,42,0.06);
  color: var(--ams-navy);
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(15,23,42,0.08);
}

.cookie-pill--locked{
  background: rgba(15,23,42,0.10);
}

/* Toggle switch (fără să schimbi HTML-ul) */
.cookie-switch{
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.cookie-switch label{
  font-weight: 800;
  color: #0f172a;
  font-size: 13px;
  margin: 0;
}

/* transformă checkbox-ul într-un switch elegant */
.cookie-switch input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;

  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.18);
  background: rgba(15,23,42,0.08);
  position: relative;
  cursor: pointer;
  outline: none;
  transition: .18s ease;
}

.cookie-switch input[type="checkbox"]::before{
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  transition: .18s ease;
}

.cookie-switch input[type="checkbox"]:checked{
  background: rgba(212,163,115,0.55);
  border-color: rgba(212,163,115,0.95);
}

.cookie-switch input[type="checkbox"]:checked::before{
  left: 22px;
}

.cookie-switch input[type="checkbox"]:focus{
  box-shadow: 0 0 0 4px rgba(212,163,115,0.25);
}

/* Footer actions */
.cookie-modal__footer{
  padding: 14px 18px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: linear-gradient(180deg, #ffffff, #fbfbfd);
}

/* Responsive */
@media (max-width: 640px){
  .cookie-banner{
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .cookie-banner__inner{
    padding: 14px 14px;
  }

  .cookie-banner__actions{
    width: 100%;
  }

  .cookie-btn{
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .cookie-pref__row{
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-modal__footer{
    flex-direction: column;
  }
}
