/**
 * Rolex GDPR — Frontend CSS
 * Banner e modal cookie, stile generico adattabile a qualsiasi retailer.
 */

/* ── Base ─────────────────────────────────────────────────────────────────── */
.rxgdpr-bar *,
.rxgdpr-modal * {
  box-sizing: border-box;
}

/* ── Bar ──────────────────────────────────────────────────────────────────── */
.rxgdpr-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99998;
  background: #111;
  color: #e8e8e8;
  padding: 14px 0;
  border-top: 2px solid #b8960c;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 -2px 16px rgba(0,0,0,.5);
}

.rxgdpr-bar__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.rxgdpr-bar__text {
  flex: 1 1 300px;
  margin: 0;
  color: #bbb;
}

.rxgdpr-bar__text a {
  color: #c9a84c;
  text-decoration: underline;
}

.rxgdpr-bar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.rxgdpr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.rxgdpr-btn--primary {
  background: #c9a84c;
  color: #111;
  border-color: #c9a84c;
}
.rxgdpr-btn--primary:hover,
.rxgdpr-btn--primary:focus {
  background: #b8960c;
  border-color: #b8960c;
  outline: none;
}

.rxgdpr-btn--outline {
  background: transparent;
  border-color: #555;
}
.rxgdpr-btn--outline:hover,
.rxgdpr-btn--outline:focus {
  border-color: #999;
  outline: none;
}

.rxgdpr-btn--ghost {
  background: transparent;
  color: #999;
  border-color: transparent;
}
.rxgdpr-btn--ghost:hover,
.rxgdpr-btn--ghost:focus {
  color: #e8e8e8;
  outline: none;
}

.rxgdpr-btn--full { width: 100%; }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.rxgdpr-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rxgdpr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px);
}

.rxgdpr-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  margin: 16px;
  display: flex;
  flex-direction: column;
}

.rxgdpr-modal__content {
  background: #fff;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}

.rxgdpr-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.rxgdpr-modal__logo {
  height: 28px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.rxgdpr-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  padding: 4px;
  margin-left: auto;
  display: flex;
  align-items: center;
  border-radius: 2px;
  transition: color .15s;
}
.rxgdpr-modal__close:hover { color: #111; }

.rxgdpr-modal__body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.rxgdpr-modal__title {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  margin: 0 0 8px;
}

.rxgdpr-modal__intro {
  font-size: 13px;
  color: #666;
  margin: 0 0 16px;
  line-height: 1.55;
}

/* ── Quick actions ────────────────────────────────────────────────────────── */
.rxgdpr-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rxgdpr-actions--top {
  margin-bottom: 20px;
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.rxgdpr-section {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.rxgdpr-section:last-of-type { border-bottom: none; }

.rxgdpr-section--fixed { opacity: .75; }

.rxgdpr-section__info { flex: 1; }

.rxgdpr-section__label {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rxgdpr-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #f0f0f0;
  color: #666;
  padding: 2px 6px;
  border-radius: 2px;
}

.rxgdpr-section__desc {
  font-size: 12px;
  color: #777;
  margin: 0 0 6px;
  line-height: 1.5;
}

.rxgdpr-section__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
}

.rxgdpr-section__links a {
  font-size: 11px;
  color: #c9a84c;
  text-decoration: none;
}
.rxgdpr-section__links a:hover { text-decoration: underline; }

/* ── Toggle switch ────────────────────────────────────────────────────────── */
.rxgdpr-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 23px;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
}

.rxgdpr-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.rxgdpr-switch__track {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: 23px;
  transition: background .2s;
}

.rxgdpr-switch__track::before {
  content: '';
  position: absolute;
  width: 17px;
  height: 17px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.rxgdpr-switch input:checked   + .rxgdpr-switch__track              { background: #c9a84c; }
.rxgdpr-switch input:checked   + .rxgdpr-switch__track::before      { transform: translateX(19px); }
.rxgdpr-switch input:disabled  + .rxgdpr-switch__track              { background: #c9a84c; cursor: not-allowed; }

/* ── Modal footer ─────────────────────────────────────────────────────────── */
.rxgdpr-modal__footer {
  padding: 16px 20px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.rxgdpr-policy-links {
  text-align: center;
  font-size: 12px;
  color: #aaa;
  margin: 0;
}
.rxgdpr-policy-links a {
  color: #999;
  text-decoration: none;
}
.rxgdpr-policy-links a:hover { color: #c9a84c; }

/* ── SR only ──────────────────────────────────────────────────────────────── */
.rxgdpr-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .rxgdpr-bar__inner   { flex-direction: column; align-items: stretch; gap: 12px; }
  .rxgdpr-bar__actions { flex-direction: column; }
  .rxgdpr-btn          { width: 100%; justify-content: center; }
  .rxgdpr-modal__dialog { margin: 0; max-height: 100dvh; border-radius: 0; }
  .rxgdpr-modal__content { border-radius: 0; max-height: 100dvh; }
}
