/* ============================================
   UTILITIES.CSS - Theme Toggle, Containers, Misc Helpers
   ============================================
   Contains:
   - Release notes styling
   - Theme toggle button
   - Container utilities
   - Section styling
   - Ghost/Secondary button variants
   - Background decoration
   - Footer styling
   ============================================ */

/* Release Notes View Modal Content */
.release-notes-content {
  max-height: 60vh;
  overflow-y: auto;
}

.release-notes-content pre {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 4px;
}

[data-theme="dark"] .release-notes-content pre {
  background-color: #2a2a2a;
  color: var(--text-color);
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--transition-base);
    position: relative;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Light mode: show moon, hide sun */
:root:not([data-theme="dark"]) .theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg); }
:root:not([data-theme="dark"]) .theme-toggle .icon-moon { opacity: 1; transform: rotate(0); }

/* Dark mode: show sun, hide moon */
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg); }

/* ============================================
   SHARED PAGE COMPONENTS
   ============================================ */

/* Container utility */
.container,
.container-fluid.px-4,
.container-fluid.px-lg-5 {
    max-width: clamp(320px, 90%, 1800px);
    margin: 0 auto;
}

/* Section styling */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Ghost button variant */
.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: none;
}

.btn-ghost:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Secondary button variant */
.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Large button variant */
.btn-large {
    padding: 14px 32px;
    font-size: 1rem;
}

/* Background decoration elements */
.bg-decoration {
    position: absolute;
    color: var(--primary);
    opacity: 0.04;
    font-size: 120px;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .bg-decoration {
    opacity: 0.06;
}

/* Footer styling */
.page-footer {
    padding: 40px 24px;
    background: var(--background);
    border-top: 1px solid var(--border-soft);
    text-align: center;
}

.page-footer .footer-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.page-footer .footer-text a {
    color: var(--primary);
    text-decoration: none;
}

.page-footer .footer-text a:hover {
    text-decoration: underline;
}
