/* ═══════════════════════════════════════════════════════════
   CONSENT BANNER
═══════════════════════════════════════════════════════════ */

.consent-banner {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.consent-banner--visible {
  opacity: 1;
  pointer-events: all;
}

.consent-banner-box {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  background: var(--dark);
  border: 1px solid var(--dark-bd);
  border-radius: 16px;
  padding: 28px 32px 24px;
  color: var(--text-lt);
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.6);
  max-height: 90vh;
  overflow-y: auto;
}

/* Header */
.consent-banner-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 0;
}
.consent-banner-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: rgba(227, 6, 19, 0.12);
  border: 1px solid rgba(227, 6, 19, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e30613;
  font-size: 1rem;
}
.consent-banner-header strong {
  display: block;
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
}
.consent-banner-header p {
  font-size: 0.85rem;
  color: var(--text-m);
  line-height: 1.6;
  margin: 0;
}

/* ── Details section ───────────────────────────────────── */
.consent-details {
  border-top: 1px solid var(--dark-bd);
  margin-top: 20px;
  padding-top: 4px;
}
.consent-details[hidden] { display: none; }

.consent-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--dark-bd);
}
.consent-service-row:last-child { border-bottom: none; }

.consent-service-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.consent-service-info > i {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.consent-icon-ok   { background: rgba(40, 167, 69, 0.12); color: #28a745; }
.consent-icon-fb   { background: rgba(24, 119, 242, 0.12); color: #1877f2; }
.consent-icon-maps { background: rgba(234, 67, 53, 0.12); color: #ea4335; }

.consent-service-info strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.consent-service-info span {
  font-size: 0.78rem;
  color: var(--text-m);
  line-height: 1.4;
}

/* Always-on badge */
.consent-always-on {
  font-size: 0.72rem;
  color: #28a745;
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.25);
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Toggle switch */
.consent-toggle-label {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 0;
}
.consent-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.consent-toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  background: var(--dark-hover);
  border-radius: 24px;
  transition: background 0.2s;
  position: relative;
}
.consent-toggle-input:checked ~ .consent-toggle-track {
  background: #e30613;
}
.consent-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.consent-toggle-input:checked ~ .consent-toggle-track .consent-toggle-thumb {
  transform: translateX(20px);
}
.consent-toggle-label:focus-within .consent-toggle-track {
  outline: 2px solid #e30613;
  outline-offset: 3px;
}

/* ── Action buttons ────────────────────────────────────── */
.consent-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
}
.consent-btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.consent-btn[hidden] { display: none; }

.consent-btn--accept {
  background: #e30613;
  color: #fff;
  margin-left: auto;
}
.consent-btn--accept:hover { background: #bf0510; }

.consent-btn--decline {
  background: transparent;
  color: var(--text-m);
  border: 1px solid var(--dark-bd);
}
.consent-btn--decline:hover { border-color: var(--text-m); color: var(--text); }

.consent-btn--settings {
  background: transparent;
  color: var(--text-m);
  border: 1px solid var(--dark-bd);
}
.consent-btn--settings:hover { border-color: var(--text-m); color: var(--text); }

.consent-btn--save {
  background: transparent;
  color: #e30613;
  border: 1px solid rgba(227, 6, 19, 0.5);
}
.consent-btn--save:hover { background: rgba(227, 6, 19, 0.1); }

/* Legal note */
.consent-banner-legal {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--text-m);
  text-align: center;
}
.consent-banner-legal a {
  color: var(--text-lt);
  text-decoration: underline;
}
.consent-banner-legal a:hover { color: var(--red); }

/* ═══════════════════════════════════════════════════════════
   CONSENT PLACEHOLDER
═══════════════════════════════════════════════════════════ */

.consent-wrap {
  width: 100%;
}
.consent-wrap[data-loaded] .consent-placeholder {
  display: none;
}

/* Base placeholder */
.consent-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 32px 24px;
  min-height: 220px;
  background: var(--dark-card);
  border: 1px dashed var(--dark-bd);
  border-radius: 12px;
  box-sizing: border-box;
}

/* Light variant (for sections with bright background) */
.consent-placeholder--light {
  background: #f5f5f5;
  border-color: #d8d8d8;
}
.consent-placeholder--light .consent-ph-title { color: #222; }
.consent-placeholder--light .consent-ph-desc  { color: #666; }
.consent-placeholder--light .consent-ph-link  { color: #999; }

/* Maps: fill parent height */
.consent-wrap--maps {
  height: 100%;
  align-self: stretch;
}
.consent-wrap--maps {
  min-height: 280px;
}
.consent-wrap--maps .consent-placeholder {
  height: 100%;
  min-height: 280px;
}

/* Icon */
.consent-ph-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.consent-ph-icon--facebook { background: rgba(24, 119, 242, 0.12); color: #1877f2; }
.consent-ph-icon--maps     { background: rgba(234, 67, 53, 0.12);  color: #ea4335; }

/* Text */
.consent-ph-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.consent-ph-desc {
  font-size: 0.8rem;
  color: var(--text-m);
  line-height: 1.5;
  max-width: 360px;
  margin: 0;
}

/* Load button */
.consent-ph-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
  margin-top: 2px;
  font-family: inherit;
}
.consent-ph-btn--facebook { background: #1877f2; color: #fff; }
.consent-ph-btn--facebook:hover { background: #1565d8; }
.consent-ph-btn--maps     { background: #ea4335; color: #fff; }
.consent-ph-btn--maps:hover { background: #c5382c; }

/* Privacy link */
.consent-ph-link {
  font-size: 0.75rem;
  color: var(--text-m);
  text-decoration: underline;
  margin-top: -2px;
}
.consent-ph-link:hover { color: var(--text-lt); }
.consent-placeholder--light .consent-ph-link { color: #aaa; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .consent-banner {
    padding: 0;
    align-items: flex-end;
  }
  .consent-banner-box {
    border-radius: 16px 16px 0 0;
    padding: 20px 16px 18px;
  }
  .consent-banner-actions {
    flex-direction: column;
  }
  .consent-btn {
    width: 100%;
    justify-content: center;
  }
  .consent-btn--accept {
    margin-left: 0;
    order: -1;
  }
}
