/*
 * theme-modal.css - Footer theme customizer modal styling.
 * Extracted from inline styles so it can be cached.
 */

.footer-theme-launch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  border-radius: 0;
  padding: 0;
  font-weight: 500;
  letter-spacing: 0.1px;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
  text-decoration-color: color-mix(in srgb, var(--primary) 45%, white);
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
  box-shadow: none;
}

.footer-theme-launch:hover,
.footer-theme-launch:focus-visible {
  color: #fff;
  text-decoration-color: color-mix(in srgb, var(--primary) 70%, white);
  outline: none;
}

.theme-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.theme-modal[hidden] {
  display: none;
}

.theme-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 24, 0.72);
  backdrop-filter: blur(4px);
}

.theme-modal__panel {
  position: relative;
  width: min(560px, 100%);
  border-radius: 18px;
  padding: 1.25rem 1.25rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, #161b27 0%, #111421 55%, #0d111b 100%);
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.theme-modal__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.theme-modal__title {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

.theme-modal__subtitle {
  margin: 0.45rem 0 0;
  color: rgba(230, 236, 255, 0.74);
  font-size: 1rem;
  line-height: 1.4;
}

.theme-modal__close {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.theme-modal__close:hover,
.theme-modal__close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.theme-modal__swatches {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.9rem 0 1rem;
}

.theme-modal__swatch {
  border: 0;
  background: transparent;
  color: #dbe6ff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  padding: 0;
}

.theme-modal__dot {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.theme-modal__swatch:hover .theme-modal__dot,
.theme-modal__swatch:focus-visible .theme-modal__dot {
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.12);
}

.theme-modal__swatch.is-active .theme-modal__dot {
  border-color: #fff;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 35%, transparent);
}

.theme-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.85rem;
}

.theme-modal__active {
  margin: 0;
  color: rgba(230, 236, 255, 0.9);
  font-size: 0.92rem;
}

.theme-modal__reset {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.8rem;
  font-size: 0.84rem;
  cursor: pointer;
}

.theme-modal__reset:hover,
.theme-modal__reset:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

@media (max-width: 640px) {
  .theme-modal__swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .theme-modal__title { font-size: 1.45rem; }
  .theme-modal__footer { flex-direction: column; align-items: stretch; }
  .theme-modal__reset { width: 100%; }
}

