/*--------------------------------------------------------------
# TSWIM 2027 Color Theme (NCU Purple & Gold)
# Applied through <html data-theme="tswim2027"> in index.html.
# Overrides the template colors in main.css.
#
# Besides the base color variables, the theme sets a highlight set (--hl-*):
#   --hl-color         highlight on dark backgrounds (nav, hero date, footer)
#   --hl-line-color    highlight lines on light backgrounds
#   --hl-rgb           highlight as an RGB triplet, for glows
#   --hl-btn-*         primary button colors
#   --hl-cell-bg       active registration period cells
#
# The earlier A/B/C color previews are kept in the git tag "theme-previews-abc".
--------------------------------------------------------------*/

:root[data-theme] {
  --logo-mark: url("../img/logo-a-header.png?v=3");
  --logo-size: contain;
  --logo-ratio: 1.157;
  --heading-color: #56008d;
  --accent-color: #56008d;
  --accent-rgb: 86, 0, 141;
  --accent-hover-color: #3f0068;
  --accent-strong-color: #3f0068;
  --accent-dark-rgb: 242, 212, 58; /* Gold timeline flow */
  --surface-color: #f7f2fb;
  --dark-section-bg: #3a005e;
  --dark-section-surface: #56008d;
  --header-scrolled-bg: #2e004b;
  --hero-overlay: none;
  --hero-text-shadow: rgba(30, 0, 50, 0.55);
  --soft-tint-start: #f3e8fb;
  --soft-tint-end: #e6d3f5;
  --nav-hover-color: #ffec5c;
  --nav-dropdown-hover-color: #56008d;
  --table-header-bg: #3a005e;
  --table-day-bg: #e6d3f5;
  --table-title-color: #56008d;
  --table-highlight-bg: #f3e8fb;
  --light-section-bg: #f6f1fa;

  /* Gold: on dark backgrounds only (fails contrast on white) */
  --hl-color: #ffec5c;
  --hl-line-color: #f2d43a;
  --hl-rgb: 242, 212, 58;
  --hl-btn-bg: #ffec5c;
  --hl-btn-hover-bg: #ffe22e;
  --hl-btn-border: #f2d43a;
  --hl-btn-text: #3a005e;
  --hl-cell-bg: #fff8d1;
}

/*--------------------------------------------------------------
# Theme rules
--------------------------------------------------------------*/
:root[data-theme] .light-background {
  --background-color: var(--light-section-bg);
  --surface-color: #ffffff;
}

/* Header: full theme logo (symbol + text) replaces the default badge and site name */
.header .logo .logo-mark {
  display: none;
}

:root[data-theme] .header .logo .logo-badge,
:root[data-theme] .header .logo .logo-text {
  display: none;
}

:root[data-theme] .header .logo .logo-mark {
  display: block;
  height: 120px;
  aspect-ratio: var(--logo-ratio);
  flex-shrink: 0;
  background: var(--logo-mark) center / var(--logo-size) no-repeat;
  transition: height 0.3s ease;
}

:root[data-theme] .scrolled .header .logo .logo-mark {
  height: 64px;
}

/* Smaller screens: keep the logo clear of the hero title (same size as the default badge) */
@media (max-width: 1199px) {
  :root[data-theme] .header .logo .logo-mark {
    height: 80px;
  }

  :root[data-theme] .scrolled .header .logo .logo-mark {
    height: 56px;
  }
}

/* Highlights inside dark sections (hero, footer) */
:root[data-theme] .dark-background {
  --accent-color: var(--hl-color);
}

/* Short highlight line under section titles */
:root[data-theme] .tos-header h2:not(.theme-title)::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 12px auto 0;
  border-radius: 2px;
  background: var(--hl-line-color);
}

/* Header: highlight line once scrolled */
:root[data-theme] .scrolled .header {
  box-shadow: inset 0 -3px 0 var(--hl-color), 0 0 18px rgba(0, 0, 0, 0.1);
}

/* Nav: highlight underline under the active/hovered item */
:root[data-theme] .navmenu>ul>li>a:before {
  background-color: var(--nav-hover-color);
}

/* Hero: soft shadow keeps white text readable on the lighter overlay */
:root[data-theme] .hero h2,
:root[data-theme] .hero p,
:root[data-theme] .hero .container div {
  text-shadow: 0 2px 12px var(--hero-text-shadow);
}

/* Hero: highlighted dates */
:root[data-theme] .hero .hero-date {
  color: var(--hl-color);
  font-weight: 600;
}

/* Primary buttons */
:root[data-theme] .btn-accent:not(.disabled),
:root[data-theme] .information .tos-contact .contact-box .contact-content .contact-link {
  background-color: var(--hl-btn-bg);
  border-color: var(--hl-btn-border);
  color: var(--hl-btn-text);
}

:root[data-theme] .btn-accent:not(.disabled):hover,
:root[data-theme] .btn-accent:not(.disabled):focus,
:root[data-theme] .btn-accent.cfp-submit-btn:hover,
:root[data-theme] .btn-accent.cfp-submit-btn:focus-visible,
:root[data-theme] .information .tos-contact .contact-box .contact-content .contact-link:hover {
  background-color: var(--hl-btn-hover-bg);
  border-color: var(--hl-btn-border);
  color: var(--hl-btn-text);
}

/* Accent tiles with highlighted icons */
:root[data-theme] .information .tos-contact .contact-box .contact-icon {
  background-color: var(--heading-color);
}

:root[data-theme] .information .tos-contact .contact-box .contact-icon i,
:root[data-theme] .scroll-top i {
  color: var(--hl-color);
}

:root[data-theme] .scroll-top {
  background-color: var(--heading-color);
}

/* Call for Papers card and parking box: highlight edge */
:root[data-theme] .submission-banner {
  border-top: 4px solid var(--hl-line-color);
}

:root[data-theme] .parking-info {
  border-left-color: var(--hl-line-color);
}

/* Important Dates timeline: accent-to-highlight line, glowing dot on hover */
:root[data-theme] .timeline-background {
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.45), rgba(var(--hl-rgb), 0.9));
}

:root[data-theme] .timeline-item-elegant:hover .timeline-dot {
  background: var(--hl-color);
  box-shadow: 0 0 16px rgba(var(--hl-rgb), 0.8);
}

/* Program & registration tables: highlighted column-header text and active period */
:root[data-theme] .program-schedule .col-header td,
:root[data-theme] .program-schedule .col-header th {
  color: var(--hl-color);
}

:root[data-theme] .reg-fee-table th.reg-active-period {
  background-color: var(--hl-btn-bg);
  color: var(--hl-btn-text);
}

:root[data-theme] .reg-fee-table .reg-active-period {
  background-color: var(--hl-cell-bg);
}

/* Footer: highlighted site name and top edge */
:root[data-theme] .footer {
  border-top: 4px solid var(--hl-color);
}

:root[data-theme] .footer .sitename {
  color: var(--hl-color);
}

/* Nav: keep the right padding on the last item so its hover box is symmetric (desktop) */
@media (min-width: 1200px) {
  :root[data-theme] .navmenu>ul>li:last-child {
    padding-right: 14px;
  }
}

/* Nav: dark purple box behind the hovered item (desktop) */
@media (min-width: 1200px) {
  :root[data-theme] .navmenu>ul>li:hover {
    background-color: rgba(86, 0, 141, 0.45);
  }
}

/* "Coming Soon" notes: plain gray italic text instead of the template's boxed placeholder */
:root[data-theme] .tbd-placeholder {
  background: none;
  border: 0;
  padding: 0;
  margin-top: 0.5rem;
}

:root[data-theme] .tbd-placeholder i {
  display: none;
}

:root[data-theme] .tbd-placeholder span {
  font-size: 1.15rem;
  font-style: italic;
  letter-spacing: 0.5px;
  color: #6b6b80;
}

/* Inline variant inside a list (Key Staff): match the list text size */
:root[data-theme] .tbd-placeholder.tbd-inline span {
  font-size: 1rem;
}
