/* ============================================================
   TD GDPR Consent – Banner & Modal Styles
   ============================================================ */

/* Full-screen overlay */
.tdgdprconsent-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  backdrop-filter: sepia(80%) brightness(130%) blur(5px);
}

/* White card */
.tdgdprconsent-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 580px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
}

.tdgdprconsent-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
}

.tdgdprconsent-card p {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: #555;
  line-height: 1.6;
}

/* 2x2 category grid — gap+background trick creates 1px dividers */
.tdgdprconsent-categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #e5e7eb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin: 0 0 1.5rem;
}

.tdgdprconsent-category-cell {
  background: #fff;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

.tdgdprconsent-category-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #222;
}

/* Toggle switch */
.tdgdpr-toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
}

.tdgdpr-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.tdgdpr-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #d1d5db;
  border-radius: 28px;
  transition: background 0.25s;
}

.tdgdpr-toggle-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.tdgdpr-toggle input:checked + .tdgdpr-toggle-slider {
  background: #22c55e;
}

.tdgdpr-toggle input:checked + .tdgdpr-toggle-slider::before {
  transform: translateX(24px);
}

.tdgdpr-toggle input:disabled + .tdgdpr-toggle-slider {
  cursor: not-allowed;
}

/* Action buttons row */
.tdgdprconsent-modal-actions {
  display: flex;
  gap: 0.625rem;
}

#tdgdprconsent-reject-all {
  flex: 1;
  padding: 0.875rem;
  border: none;
  border-radius: 50px;
  background: #f3f4f6;
  color: #111;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

#tdgdprconsent-reject-all:hover {
  background: #e5e7eb;
}

#tdgdprconsent-accept-all,
#tdgdprconsent-save-prefs {
  flex: 1;
  padding: 0.875rem;
  border: none;
  border-radius: 50px;
  background: #111;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

#tdgdprconsent-accept-all:hover,
#tdgdprconsent-save-prefs:hover {
  background: #333;
}

/* Floating preferences button */
#tdgdprconsent-prefs-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  background: #fff;
  border: 1px solid #d1d5db;
  padding: 8px 18px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #222;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.2s;
}

#tdgdprconsent-prefs-btn:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* Admin catalog table */
tr.tdgdprconsent-catalog-row:nth-child(even) {
  background: #f0f0f0;
}