/* ==========================================================================
   SUME Consent — cookie consent modal
   ========================================================================== */

.sumeconsent-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: sumeconsent-fade-in 0.2s ease-out;
}

.sumeconsent-overlay.sumeconsent-hidden { display: none; }

@keyframes sumeconsent-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sumeconsent-modal {
  background: #fff;
  border-radius: 10px;
  max-width: 40rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: sumeconsent-slide-up 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: inherit;
}

@keyframes sumeconsent-slide-up {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.sumeconsent-view.sumeconsent-hidden { display: none; }

/* Header */
.sumeconsent-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.sumeconsent-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  color: var(--primary, #f05602);
}

.sumeconsent-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1b1c1c;
  line-height: 1.3;
}

/* Body */
.sumeconsent-body {
  padding: 1.25rem 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #555;
}

.sumeconsent-body p { margin: 0 0 0.75rem; }
.sumeconsent-body p:last-child { margin-bottom: 0; }

.sumeconsent-intro { margin-bottom: 1.5rem; }

/* Footer */
.sumeconsent-footer {
  display: flex; gap: 0.75rem;
  padding: 1rem 1.5rem 1.25rem;
  background: #fafafa;
  border-top: 1px solid #eee;
}

.sumeconsent-footer-settings {
  justify-content: center;
  background: transparent;
  border-top: none;
  padding-top: 0;
}

/* Buttons */
.sumeconsent-btn {
  flex: 1;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  font-family: inherit;
}

.sumeconsent-btn-block {
  display: block; width: 100%;
  flex: none;
  padding: 1rem;
  font-size: 1rem;
}

.sumeconsent-btn-primary {
  background: var(--primary, #f05602);
  color: #fff;
  border-color: var(--primary, #f05602);
}
.sumeconsent-btn-primary:hover {
  background: var(--primary-dark, #d94b02);
  border-color: var(--primary-dark, #d94b02);
}

.sumeconsent-btn-secondary {
  background: #fff;
  color: #333;
  border-color: #ddd;
}
.sumeconsent-btn-secondary:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

.sumeconsent-btn-outline {
  flex: none;
  padding: 0.625rem 1.5rem;
  background: transparent;
  color: var(--primary, #f05602);
  border: 2px solid var(--primary, #f05602);
}
.sumeconsent-btn-outline:hover {
  background: var(--primary, #f05602);
  color: #fff;
}

/* Settings section */
.sumeconsent-quick-actions { margin-bottom: 1.5rem; }

.sumeconsent-settings-header {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: #1b1c1c;
}

/* Accordion */
.sumeconsent-accordion {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.sumeconsent-tab {
  border-bottom: 1px solid #e5e5e5;
}
.sumeconsent-tab:last-child { border-bottom: none; }

.sumeconsent-tab-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 1rem;
  cursor: pointer;
  background: #fff;
  transition: background 0.15s ease;
  user-select: none;
}
.sumeconsent-tab-header:hover { background: #fafafa; }

.sumeconsent-tab-title {
  display: flex; align-items: center; gap: 0.625rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #333;
}

.sumeconsent-tab-icon {
  color: #888;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.sumeconsent-tab.sumeconsent-open .sumeconsent-tab-icon {
  color: var(--primary, #f05602);
}

.sumeconsent-tab-status { display: flex; align-items: center; }

.sumeconsent-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: #dcfce7;
  color: #166534;
}

.sumeconsent-tab-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-out;
}

.sumeconsent-tab.sumeconsent-open .sumeconsent-tab-content {
  grid-template-rows: 1fr;
}

.sumeconsent-tab-desc {
  overflow: hidden;
  min-height: 0;
  padding: 0 1rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #555;
  background: #f9f9f9;
  border-top: 1px solid transparent;
  transition: padding 0.3s ease-out, border-color 0.3s ease-out;
}

.sumeconsent-tab.sumeconsent-open .sumeconsent-tab-desc {
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  border-top-color: #e5e5e5;
}

/* Switch toggle */
.sumeconsent-switch {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.375rem;
  flex-shrink: 0;
}
.sumeconsent-switch input {
  opacity: 0; width: 0; height: 0;
}
.sumeconsent-slider {
  position: absolute; cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 999px;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sumeconsent-slider::before {
  position: absolute; content: "";
  height: 1rem; width: 1rem;
  left: 0.1875rem; bottom: 0.1875rem;
  background: #fff;
  border-radius: 50%;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.sumeconsent-switch input:checked + .sumeconsent-slider {
  background: var(--primary, #f05602);
}
.sumeconsent-switch input:checked + .sumeconsent-slider::before {
  transform: translateX(1.125rem);
}

/* Mobile */
@media (max-width: 600px) {
  .sumeconsent-modal { max-height: 95vh; border-radius: 8px; }
  .sumeconsent-header { padding: 1rem 1rem 0.75rem; }
  .sumeconsent-body { padding: 1rem; }
  .sumeconsent-footer { padding: 0.875rem 1rem 1rem; flex-direction: column-reverse; }
  .sumeconsent-footer .sumeconsent-btn { width: 100%; flex: none; }
  .sumeconsent-footer-settings { padding: 0 1rem 1rem; }
  .sumeconsent-tab-header { padding: 0.75rem 0.875rem; }
  .sumeconsent-tab-title { font-size: 0.875rem; gap: 0.5rem; }
  .sumeconsent-tab-desc { padding-left: 0.875rem; padding-right: 0.875rem; }
}
