/* ============================================================
   TidyNihon — Cookie Banner Stylesheet (GDPR Compliant)
   ============================================================ */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(45, 45, 45, 0.98);
  color: #F5EFE6;
  padding: 20px 24px;
  z-index: 9999;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
  font-family: var(--font-body);
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner .container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.cookie-content {
  flex: 1;
}

.cookie-content h3 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #F5EFE6;
  font-family: var(--font-head);
}

.cookie-content p {
  margin: 0;
  font-size: 0.9rem;
  color: #E8DDD0;
  line-height: 1.5;
}

.cookie-content a {
  color: #E8A882;
  text-decoration: underline;
}

.cookie-content a:hover {
  color: #F5EFE6;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cookie-actions button {
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: var(--font-body);
  white-space: nowrap;
}

.btn-reject {
  background: transparent;
  color: #E8DDD0;
  border: 1px solid #E8DDD0;
}

.btn-reject:hover {
  background: rgba(232, 221, 208, 0.1);
}

.btn-customize {
  background: transparent;
  color: #E8A882;
  border: 1px solid #E8A882;
}

.btn-customize:hover {
  background: rgba(232, 168, 130, 0.1);
}

.btn-accept {
  background: #B85C38;
  color: #F5EFE6;
}

.btn-accept:hover {
  opacity: 0.9;
}

/* ============================================================
   COOKIE MODAL — CUSTOMIZE OPTIONS (GDPR Compliant)
   ============================================================ */
.cookie-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.cookie-modal.active {
  display: flex;
}

.cookie-modal-content {
  background: #F5EFE6;
  border-radius: 8px;
  padding: 32px;
  max-width: 580px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cookie-modal-content h2 {
  margin: 0 0 24px 0;
  font-size: 1.4rem;
  color: #2D2D2D;
  font-family: var(--font-head);
}

.cookie-category {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid #E8DDD0;
}

.cookie-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}

.cookie-category-title {
  font-weight: 600;
  color: #2D2D2D;
  font-size: 0.95rem;
  font-family: var(--font-head);
}

.cookie-category-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.cookie-toggle {
  width: 44px;
  height: 24px;
  background: #D4C5B6;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  appearance: none;
  padding: 0;
  flex-shrink: 0;
}

.cookie-toggle:before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: left 0.2s;
}

.cookie-toggle:checked {
  background: #B85C38;
}

.cookie-toggle:checked:before {
  left: 22px;
}

.cookie-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-category-desc {
  font-size: 0.85rem;
  color: #8C7B6E;
  line-height: 1.5;
  margin: 0;
}

.cookie-essential-label {
  font-size: 0.75rem;
  color: #B85C38;
  font-weight: 600;
  margin-top: 6px;
  display: inline-block;
}

.cookie-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.cookie-modal-actions button {
  padding: 11px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: var(--font-body);
}

.btn-save-prefs {
  background: #B85C38;
  color: #F5EFE6;
}

.btn-save-prefs:hover {
  opacity: 0.9;
}

.btn-reject-all {
  background: transparent;
  color: #2D2D2D;
  border: 1px solid #2D2D2D;
}

.btn-reject-all:hover {
  background: rgba(45, 45, 45, 0.05);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .cookie-banner .container {
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: flex-start;
  }

  .cookie-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .cookie-actions button {
    flex: 1;
    min-width: 90px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .cookie-modal-content {
    padding: 24px;
  }

  .cookie-modal-content h2 {
    font-size: 1.2rem;
  }

  .cookie-modal-actions {
    grid-template-columns: 1fr;
  }

  .cookie-modal-actions button {
    padding: 10px 16px;
  }
}
