/* =========================================================
   BLU Coaching — GDPR & Legal Stylesheet
   Cookie Banner, Preferences Modal, Privacy / Legal Pages Layout
   Conforme alle Linee Guida Garante Privacy 10 giugno 2021
   ========================================================= */

/* ============ BANNER COOKIE (BOTTOM BAR) ============ */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 980px;
  margin: 0 auto;
  z-index: 99999;
  background: var(--white, #FFFFFF);
  border: 1px solid var(--border, #E4E7EC);
  border-radius: var(--radius-lg, 20px);
  box-shadow: 0 20px 60px -15px rgba(28, 31, 38, 0.35);
  animation: slideUpCookie 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cookie-banner-container {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cookie-banner-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.cookie-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue-tint, #EAF1FC);
  color: var(--blue, #3076D4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cookie-banner-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink, #1C1F26);
  margin: 0;
  flex: 1;
}

.cookie-close-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--slate, #5B6270);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
  line-height: 1;
  transition: all 0.2s ease;
}
.cookie-close-btn:hover {
  color: var(--ink, #1C1F26);
  background: var(--off-white-2, #F1F3F7);
}

.cookie-banner-content p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--slate, #5B6270);
  margin: 0;
}
.cookie-banner-content a {
  color: var(--blue, #3076D4);
  text-decoration: underline;
  font-weight: 500;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-cookie {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-cookie-accept {
  background: var(--blue, #3076D4);
  color: #FFFFFF;
}
.btn-cookie-accept:hover {
  background: var(--blue-dark, #1F5AA0);
}
.btn-cookie-reject {
  background: transparent;
  color: var(--ink, #1C1F26);
  border-color: var(--border, #E4E7EC);
}
.btn-cookie-reject:hover {
  background: var(--off-white-2, #F1F3F7);
  border-color: var(--slate-light, #8A90A0);
}
.btn-cookie-custom {
  background: var(--blue-tint, #EAF1FC);
  color: var(--blue-dark, #1F5AA0);
}
.btn-cookie-custom:hover {
  background: var(--blue-tint-2, #DCE9FA);
}

/* ============ MODALE PREFERENZE (GRANULARE) ============ */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(28, 31, 38, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-lg, 22px);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -20px rgba(0,0,0,0.4);
  overflow: hidden;
  animation: scaleInModal 0.25s ease-out;
}

@keyframes scaleInModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.cookie-modal-head {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border, #E4E7EC);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cookie-modal-head h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  margin: 0;
  color: var(--ink, #1C1F26);
}

.cookie-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cookie-modal-lead {
  font-size: 0.88rem;
  color: var(--slate, #5B6270);
  line-height: 1.5;
  margin: 0 0 10px;
}

.cookie-category-item {
  background: var(--off-white, #F7F8FA);
  border: 1px solid var(--border, #E4E7EC);
  border-radius: var(--radius-md, 14px);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-category-info { flex: 1; }
.cookie-category-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.cookie-category-title-row h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.98rem;
  color: var(--ink, #1C1F26);
  margin: 0;
}
.cookie-category-info p {
  font-size: 0.82rem;
  color: var(--slate, #5B6270);
  margin: 0;
  line-height: 1.45;
}

.cookie-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
}
.cookie-status-badge.required {
  background: #E7F5EC;
  color: #1E7A42;
}

/* TOGGLE SWITCH */
.switch-label {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.switch-label input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #D1D5DB;
  transition: .3s;
  border-radius: 34px;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.switch-label input:checked + .switch-slider {
  background-color: var(--blue, #3076D4);
}
.switch-label input:checked + .switch-slider:before {
  transform: translateX(22px);
}

.switch-visual.checked.disabled {
  display: inline-block;
  width: 48px;
  height: 26px;
  background-color: #93C5FD;
  border-radius: 34px;
  position: relative;
  cursor: not-allowed;
  opacity: 0.85;
}
.switch-visual.checked.disabled:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 25px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
}

.cookie-modal-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border, #E4E7EC);
  background: var(--off-white, #F7F8FA);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* ============ BADGE FLUTTUANTE PREFERENZE COOKIE ============ */
.cookie-settings-badge {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999;
  background: var(--white, #FFFFFF);
  border: 1.5px solid var(--border, #E4E7EC);
  color: var(--slate, #5B6270);
  border-radius: 999px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,0.2);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.cookie-settings-badge:hover {
  color: var(--blue, #3076D4);
  border-color: var(--blue, #3076D4);
  transform: translateY(-2px);
}

/* ============ PAGINE LEGALI (PRIVACY, COOKIE, NOTE LEGALI) ============ */
.legal-page-header {
  padding: calc(var(--header-h, 78px) + 50px) 0 40px;
  background: linear-gradient(180deg, var(--blue-tint, #EAF1FC) 0%, var(--off-white, #F7F8FA) 100%);
  border-bottom: 1px solid var(--border, #E4E7EC);
}
.legal-page-content {
  padding: 60px 0 100px;
  background: #FFFFFF;
}
.legal-box {
  max-width: 860px;
  margin: 0 auto;
}
.legal-box h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
  color: var(--blue-deep, #153E6E);
}
.legal-box .legal-updated {
  font-size: 0.85rem;
  color: var(--slate-light, #8A90A0);
  margin-bottom: 30px;
}
.legal-box h2 {
  font-size: 1.35rem;
  margin: 36px 0 14px;
  color: var(--ink, #1C1F26);
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--off-white-2, #F1F3F7);
}
.legal-box h3 {
  font-size: 1.05rem;
  margin: 20px 0 8px;
  color: var(--blue-dark, #1F5AA0);
}
.legal-box p, .legal-box li {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--slate, #5B6270);
  margin-bottom: 14px;
}
.legal-box ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 18px;
}
.legal-box table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 0.88rem;
}
.legal-box th, .legal-box td {
  padding: 12px 14px;
  border: 1px solid var(--border, #E4E7EC);
  text-align: left;
}
.legal-box th {
  background: var(--off-white, #F7F8FA);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--ink, #1C1F26);
}
.legal-callout {
  background: var(--blue-tint, #EAF1FC);
  border-left: 4px solid var(--blue, #3076D4);
  padding: 18px 22px;
  border-radius: var(--radius-sm, 8px);
  margin: 24px 0;
}
.legal-callout p {
  margin: 0;
  color: var(--blue-deep, #153E6E);
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .cookie-banner { bottom: 12px; left: 12px; right: 12px; }
  .cookie-banner-container { padding: 20px 18px; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn-cookie { width: 100%; text-align: center; }
  .cookie-category-item { flex-direction: column; align-items: flex-start; }
  .cookie-modal-head, .cookie-modal-body, .cookie-modal-footer { padding: 18px 20px; }
}
