/* ==============================================
   Cookie Consent Banner - Aires de Campo
   ============================================== */

/* Overlay */
#cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9990;
  display: none;
}

/* ---- Compact Banner ---- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 375px;
  z-index: 9991;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 22px 20px 24px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
  display: none;
  flex-direction: column;
  font-family: 'DM Sans', sans-serif;
}

.cookie-banner__title {
  font-size: 17px;
  font-weight: 700;
  color: #000;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner__body {
  font-size: 13px;
  color: #444;
  line-height: 1.55;
  margin-bottom: 16px;
  margin-top: 0;
}

.cookie-banner__actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.cookie-btn {
  flex: 1;
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid;
  transition: opacity 0.2s;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
}
.cookie-btn:hover { opacity: 0.82; }

.cookie-btn--accept {
  background: #69c054;
  color: #fff;
  border-color: #69c054;
}

.cookie-btn--reject {
  background: transparent;
  color: #69c054;
  border-color: #69c054;
}

.cookie-btn--configure {
  background: transparent;
  color: #555;
  border-color: #ccc;
  font-weight: 400;
  font-size: 12px;
}

.cookie-banner__privacy {
  font-size: 11px;
  color: #666;
  text-align: center;
  margin: 0;
}

.cookie-banner__privacy a {
  color: #69c054;
  text-decoration: underline;
}

/* ---- Preferences Panel ---- */
#cookie-preferences-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 355px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 9992;
  background: #fff;
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
  display: none;
  flex-direction: column;
  font-family: 'DM Sans', sans-serif;
}

.cookie-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.cookie-panel__title {
  font-size: 15px;
  font-weight: 700;
  color: #000;
}

.cookie-panel__close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #555;
  padding: 0;
}

.cookie-category {
  padding: 14px 0;
  border-bottom: 1px solid #f2f2f2;
}

.cookie-category:last-of-type {
  border-bottom: none;
}

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

.cookie-category__name {
  font-size: 13px;
  font-weight: 700;
  color: #000;
}

.cookie-category__description {
  font-size: 12px;
  color: #666;
  line-height: 1.45;
  margin: 0;
}

/* Toggle switch */
.cookie-toggle-wrapper {
  flex-shrink: 0;
  position: relative;
}

.cookie-toggle {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-label {
  display: block;
  width: 42px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.cookie-toggle-label::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle:checked + .cookie-toggle-label {
  background: #69c054;
}

.cookie-toggle:checked + .cookie-toggle-label::after {
  transform: translateX(18px);
}

.cookie-toggle:disabled + .cookie-toggle-label {
  background: #69c054;
  cursor: not-allowed;
}

.cookie-toggle-always {
  font-size: 11px;
  color: #69c054;
  font-weight: 700;
  white-space: nowrap;
  padding-top: 4px;
}

.cookie-panel__actions {
  display: flex;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid #eee;
}

.cookie-btn--panel-save {
  flex: 1;
  padding: 10px 14px;
  background: #69c054;
  color: #fff;
  border: 2px solid #69c054;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.cookie-btn--panel-save:hover { opacity: 0.85; }

.cookie-btn--panel-reject {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  color: #69c054;
  border: 2px solid #69c054;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.cookie-btn--panel-reject:hover { opacity: 0.82; }

/* "Gestionar cookies" link in footer */
.cookie-manage-link {
  color: #69c054;
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
  background: none;
  border: none;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
  display: inline;
}
