/* ── TalentRewards Cookie Consent ───────────────────────────────────── */

#tr-cookie-banner[hidden] { display: none !important; }

#tr-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Compact bar ─────────────────────────────────────────────────────── */
.tr-cookie-bar {
  background: #ffffff;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid #e2e8f0;
}

.tr-cookie-bar__text {
  margin: 0;
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
}

.tr-cookie-bar__link {
  color: #00748F;
  text-decoration: underline;
  margin-left: 8px;
  white-space: nowrap;
}

.tr-cookie-bar__actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* ── Preferences panel ───────────────────────────────────────────────── */
.tr-cookie-prefs {
  background: #ffffff;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
  border-top: 1px solid #e2e8f0;
  padding: 24px 32px;
  max-height: 90vh;
  overflow-y: auto;
}

.tr-cookie-prefs__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

#tr-cookie-banner .tr-cookie-prefs__title {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.tr-cookie-prefs__close {
  background: none;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
}
.tr-cookie-prefs__close:hover { color: #0f172a; background: #f1f5f9; }

.tr-cookie-prefs__list {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.tr-cookie-prefs__footer {
  display: flex;
  justify-content: flex-end;
}

/* ── Category rows ───────────────────────────────────────────────────── */
.tr-cookie-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  gap: 16px;
}
.tr-cookie-row:last-child { border-bottom: none; }

.tr-cookie-row__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tr-cookie-row__name {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.tr-cookie-row__desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.tr-cookie-row__always {
  font-size: 12px;
  font-weight: 500;
  color: #00748F;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
#tr-cookie-banner .tr-btn {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid #00748F;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  line-height: 1;
}

#tr-cookie-banner .tr-btn--primary {
  background: #00748F;
  color: #ffffff;
}
#tr-cookie-banner .tr-btn--primary:hover { background: #005f76; border-color: #005f76; }

#tr-cookie-banner .tr-btn--secondary {
  background: transparent;
  color: #00748F;
}
#tr-cookie-banner .tr-btn--secondary:hover { background: #f0f9ff; }
#tr-cookie-banner .tr-btn--ghost {
  background: transparent;
  color: #64748b;
  border-color: #e2e8f0;
}
#tr-cookie-banner .tr-btn--ghost:hover { background: #f8fafc; border-color: #cbd5e1; color: #334155; }

/* ── Toggle switch ───────────────────────────────────────────────────── */
.tr-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.tr-toggle__input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.tr-toggle__slider {
  display: block;
  width: 44px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 12px;
  transition: background 0.2s ease;
  position: relative;
}

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

.tr-toggle__input:checked + .tr-toggle__slider { background: #00748F; }
.tr-toggle__input:checked + .tr-toggle__slider::after { transform: translateX(20px); }
.tr-toggle__input:focus-visible + .tr-toggle__slider { outline: 2px solid #00748F; outline-offset: 2px; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .tr-cookie-bar {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
  .tr-cookie-bar__actions {
    width: 100%;
    justify-content: stretch;
  }
  .tr-cookie-bar__actions .tr-btn {
    flex: 1;
    text-align: center;
  }
  .tr-cookie-prefs {
    padding: 16px;
  }
  .tr-cookie-row {
    padding: 14px 16px;
  }
}
