/**
 * Sema Cookie Consent – Banner Styles
 * Prefix: scc-* (generic, no project-specific naming)
 * Colors via CSS custom properties with defaults
 */

:root {
  --scc-bg: #1e2533;
  --scc-text: #ccd0d8;
  --scc-heading: #fff;
  --scc-accent: #e67e22;
  --scc-accent-hover: #cf6d17;
  --scc-toggle: #27ae60;
}

/* ---- Banner container ---- */
.scc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99998;
  background: var(--scc-bg);
  color: var(--scc-text);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
}

.scc-banner--top {
  bottom: auto;
  top: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.scc-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 28px;
}

/* ---- Main row ---- */
.scc-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.scc-text strong {
  display: block;
  color: var(--scc-heading);
  font-size: 1rem;
  margin-bottom: 6px;
}

.scc-text p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.scc-text a {
  color: var(--scc-accent);
  text-decoration: underline;
}

.scc-text a:hover {
  color: var(--scc-accent-hover);
}

/* ---- Buttons ---- */
.scc-buttons,
.scc-detail-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.scc-btn {
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.scc-btn:hover {
  transform: translateY(-1px);
}

.scc-accept,
.scc-save {
  background: var(--scc-accent);
  color: #fff;
}

.scc-accept:hover,
.scc-save:hover {
  background: var(--scc-accent-hover);
}

.scc-reject,
.scc-settings-toggle {
  background: transparent;
  color: var(--scc-text);
  border: 1px solid #555;
}

.scc-reject:hover,
.scc-settings-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #888;
}

/* ---- Detail panel (categories) ---- */
.scc-detail {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 18px;
  padding-top: 18px;
}

.scc-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.scc-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
}

.scc-cat-info {
  flex: 1;
}

.scc-cat-info strong {
  display: block;
  color: var(--scc-heading);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.scc-cat-info span {
  font-size: 0.82rem;
  color: #99a3b3;
  line-height: 1.5;
}

/* ---- Toggle switch ---- */
.scc-cat input[type="checkbox"] {
  display: none;
}

.scc-toggle {
  position: relative;
  width: 44px;
  min-width: 44px;
  height: 24px;
  background: #444;
  border-radius: 12px;
  transition: background 0.25s;
  flex-shrink: 0;
}

.scc-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}

.scc-cat input:checked + .scc-toggle {
  background: var(--scc-toggle);
}

.scc-cat input:checked + .scc-toggle::after {
  transform: translateX(20px);
}

.scc-toggle-disabled {
  background: var(--scc-toggle);
  opacity: 0.6;
  cursor: not-allowed;
}

.scc-toggle-disabled::after {
  transform: translateX(20px);
}

.scc-detail-buttons {
  justify-content: flex-end;
}

/* ---- Reopen bar ---- */
.scc-reopen {
  position: fixed;
  bottom: 0;
  left: 18px;
  z-index: 99997;
  background: var(--scc-bg);
  color: var(--scc-text);
  border: 1px solid #444;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 8px 20px;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.2s;
}

.scc-reopen:hover {
  background: #2a3548;
}

.scc-reopen-icon {
  font-size: 1rem;
  line-height: 1;
}

.scc-reopen-text {
  white-space: nowrap;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
  .scc-inner {
    padding: 18px 16px;
  }

  .scc-main {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .scc-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .scc-btn {
    padding: 10px 16px;
    font-size: 0.82rem;
  }

  .scc-cat {
    padding: 10px 12px;
  }

  .scc-detail-buttons {
    justify-content: center;
  }
}
