/* ==========================================================================
   Hindustan Sanitary House — Cookie Consent & Preference Centre Stylesheet
   Palette: Matches warm terracotta (#8B3D14), bronze (#5C2D0E), gold (#D4A853),
   and porcelain ivory (#FDFBF7 / #F7F2EA).
   ========================================================================== */

/* COOKIE BANNER CONTAINER */
#hsh-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  background: #ffffff;
  color: #2a1505;
  border-top: 3px solid #8b3d14;
  box-shadow: 0 -8px 30px rgba(44, 21, 8, 0.16);
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 1.2rem 1.5rem;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  pointer-events: none;
}

#hsh-cookie-banner.hsh-cookie-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.hsh-cb-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hsh-cb-content {
  flex: 1 1 540px;
}

.hsh-cb-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: #5c2d0e;
  margin-bottom: 0.35rem;
}

.hsh-cb-icon {
  font-size: 1.2rem;
}

.hsh-cb-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #5a3a20;
  margin: 0;
}

.hsh-cb-text a {
  color: #8b3d14;
  font-weight: 700;
  text-decoration: underline;
  transition: color 0.2s;
}

.hsh-cb-text a:hover {
  color: #c8762a;
}

.hsh-cb-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.hsh-cb-btn {
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.6rem 1.15rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.hsh-cb-btn-accept {
  background: #8b3d14;
  color: #ffffff;
  border-color: #8b3d14;
  box-shadow: 0 2px 8px rgba(139, 61, 20, 0.25);
}

.hsh-cb-btn-accept:hover {
  background: #c8762a;
  border-color: #c8762a;
  transform: translateY(-1px);
}

.hsh-cb-btn-reject {
  background: #f7f2ea;
  color: #5c2d0e;
  border-color: rgba(92, 45, 14, 0.2);
}

.hsh-cb-btn-reject:hover {
  background: #ede4d6;
  color: #2a1505;
  transform: translateY(-1px);
}

.hsh-cb-btn-custom {
  background: transparent;
  color: #5a3a20;
  border-color: rgba(92, 45, 14, 0.2);
}

.hsh-cb-btn-custom:hover {
  background: #fdfbf7;
  color: #8b3d14;
  border-color: #8b3d14;
}

/* ==========================================================================
   COOKIE PREFERENCE CENTRE MODAL
   ========================================================================== */

#hsh-cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(42, 21, 5, 0.62);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#hsh-cookie-modal-backdrop.hsh-modal-visible {
  display: flex;
  opacity: 1;
}

.hsh-cm-card {
  background: #ffffff;
  color: #2a1505;
  width: 100%;
  max-width: 660px;
  max-height: 88vh;
  border-radius: 16px;
  border: 1px solid rgba(92, 45, 14, 0.15);
  box-shadow: 0 16px 48px rgba(44, 21, 8, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: hshModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hshModalPop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.hsh-cm-header {
  padding: 1.3rem 1.6rem;
  background: #fdfbf7;
  border-bottom: 1px solid rgba(92, 45, 14, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hsh-cm-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #5c2d0e;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hsh-cm-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #8a6a50;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.hsh-cm-close-btn:hover {
  color: #5c2d0e;
  background: #f7f2ea;
}

.hsh-cm-body {
  padding: 1.4rem 1.6rem;
  overflow-y: auto;
  line-height: 1.6;
  font-size: 0.88rem;
  color: #5a3a20;
}

.hsh-cm-intro {
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(92, 45, 14, 0.08);
  font-size: 0.86rem;
  color: #5a3a20;
}

.hsh-cm-cat-group {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.hsh-cm-cat-item {
  background: #fdfbf7;
  border: 1px solid rgba(92, 45, 14, 0.1);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  transition: border-color 0.2s;
}

.hsh-cm-cat-item:hover {
  border-color: rgba(139, 61, 20, 0.3);
}

.hsh-cm-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.hsh-cm-cat-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #5c2d0e;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hsh-cm-badge-lock {
  font-size: 0.72rem;
  font-weight: 700;
  background: #e2d9cf;
  color: #5c2d0e;
  padding: 0.18rem 0.55rem;
  border-radius: 12px;
  letter-spacing: 0.4px;
}

.hsh-cm-badge-opt {
  font-size: 0.72rem;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  padding: 0.18rem 0.55rem;
  border-radius: 12px;
  letter-spacing: 0.4px;
}

.hsh-cm-cat-desc {
  font-size: 0.82rem;
  color: #5a3a20;
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

.hsh-cm-cookies-list {
  font-size: 0.76rem;
  background: #ffffff;
  border: 1px solid rgba(92, 45, 14, 0.08);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: #8a6a50;
}

.hsh-cm-cookies-list code {
  color: #8b3d14;
  background: #f7f2ea;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-family: monospace;
}

/* TOGGLE SWITCH */
.hsh-cm-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.hsh-cm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.hsh-cm-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}

.hsh-cm-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hsh-cm-switch input:checked + .hsh-cm-slider {
  background-color: #8b3d14;
}

.hsh-cm-switch input:checked + .hsh-cm-slider:before {
  transform: translateX(20px);
}

.hsh-cm-switch input:disabled + .hsh-cm-slider {
  opacity: 0.7;
  cursor: not-allowed;
  background-color: #5c2d0e;
}

.hsh-cm-footer {
  padding: 1.1rem 1.6rem;
  background: #fdfbf7;
  border-top: 1px solid rgba(92, 45, 14, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hsh-cm-footer-right {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* FOOTER PERSISTENT LINK */
.ft-legal-link {
  color: var(--gl, #d4a853);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, text-decoration 0.2s;
}

.ft-legal-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  #hsh-cookie-banner {
    padding: 1rem;
  }
  .hsh-cb-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .hsh-cb-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hsh-cb-btn {
    width: 100%;
    text-align: center;
  }
  .hsh-cm-card {
    max-height: 92vh;
  }
  .hsh-cm-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .hsh-cm-footer-right {
    flex-direction: column;
  }
}
