/* ============================================================
   Bliss Homes — Cookie consent banner (GDPR/ePrivacy)
   ============================================================ */

/* Banner */
.bh-cc {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  z-index: 9998;
  max-width: 960px;
  margin: 0 auto;
  background: rgba(21, 38, 68, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 20px 24px;
  color: #fff;
  font-family: 'Inter Tight', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 12px 48px rgba(0,0,0,0.35);
  transform: translateY(calc(100% + 40px));
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}
.bh-cc.open { transform: translateY(0); }
.bh-cc p { margin: 0; color: rgba(255,255,255,.82); }
.bh-cc h3 {
  margin: 0 0 6px;
  font-size: 15px; font-weight: 600;
  color: #fff; letter-spacing: -0.01em;
}
.bh-cc a { color: #40A9FF; text-decoration: underline; }
.bh-cc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bh-cc-btn {
  font: inherit; font-weight: 600;
  padding: 10px 18px; border-radius: 10px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent; color: #fff;
  transition: background .2s, border-color .2s, transform .2s;
  white-space: nowrap;
}
.bh-cc-btn:hover { border-color: #40A9FF; color: #40A9FF; }
.bh-cc-btn.primary {
  background: #fff; color: #1A2E52; border-color: #fff;
}
.bh-cc-btn.primary:hover { color: #1A2E52; transform: translateY(-1px); }

@media (max-width: 720px) {
  .bh-cc { grid-template-columns: 1fr; padding: 16px 18px; left: 12px; right: 12px; bottom: 12px; }
  .bh-cc-actions { justify-content: space-between; }
  .bh-cc-btn { flex: 1; padding: 10px 12px; font-size: 13px; }
}

/* Modal (preferencias) */
.bh-cc-modal {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(10, 20, 40, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .3s;
}
.bh-cc-modal.open { display: flex; opacity: 1; }
.bh-cc-modal-card {
  background: #1A2E52;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  max-width: 560px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  color: #fff;
  font-family: 'Inter Tight', system-ui, sans-serif;
  padding: 32px;
}
.bh-cc-modal-card h2 {
  margin: 0 0 8px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
}
.bh-cc-modal-card > p { margin: 0 0 24px; color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.6; }
.bh-cc-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.bh-cc-row:last-of-type { border-bottom: 1px solid rgba(255,255,255,0.1); }
.bh-cc-row-body { flex: 1; }
.bh-cc-row-body strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.bh-cc-row-body span { color: rgba(255,255,255,.65); font-size: 13px; line-height: 1.55; display: block; }
.bh-cc-row-body .badge {
  display: inline-block; margin-left: 8px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(64,169,255,0.15); color: #40A9FF;
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}

/* iOS-style switch */
.bh-cc-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.bh-cc-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.bh-cc-switch .track {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255,255,255,0.15); transition: background .2s; cursor: pointer;
}
.bh-cc-switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .25s cubic-bezier(.2,.7,.2,1);
}
.bh-cc-switch input:checked ~ .track { background: #40A9FF; }
.bh-cc-switch input:checked ~ .track::after { transform: translateX(20px); }
.bh-cc-switch input:disabled ~ .track { opacity: 0.5; cursor: not-allowed; }

.bh-cc-modal-actions {
  display: flex; gap: 10px; margin-top: 24px; justify-content: flex-end; flex-wrap: wrap;
}

/* Floating "Gestionar cookies" reopen button */
.bh-cc-reopen {
  position: fixed; left: 16px; bottom: 16px; z-index: 50;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(21, 38, 68, 0.88);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,.7);
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s, transform .2s, border-color .2s;
  opacity: 0;
  pointer-events: none;
}
.bh-cc-reopen.show { opacity: 1; pointer-events: auto; }
.bh-cc-reopen:hover { color: #40A9FF; border-color: #40A9FF; transform: translateY(-2px); }
