/**
 * Wedding Registration Styles
 * Theme: Mint, Blue, Green
 */

:root {
    /* Primary Colors */
    --color-primary: #4fd1c5;
    --color-primary-light: #81e6d9;
    --color-primary-dark: #319795;

    /* Secondary Colors */
    --color-secondary: #63b3ed;
    --color-secondary-light: #90cdf4;
    --color-secondary-dark: #3182ce;

    /* Accent Colors */
    --color-accent: #48bb78;
    --color-accent-light: #68d391;
    --color-accent-dark: #38a169;

    /* Neutral Colors */
    --color-background: #f7fafc;
    --color-surface: #ffffff;
    --color-text-primary: #2d3748;
    --color-text-secondary: #4a5568;
    --color-text-light: #718096;
    --color-border: #e2e8f0;

    /* Status Colors */
    --color-success: #48bb78;
    --color-error: #f56565;
    --color-warning: #ed8936;
    --color-info: #4299e1;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --gradient-accent: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* JS-driven parallax offset (updated by scroll handler in app.js) */
    --parallax-y: 0px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--color-background);
    min-height: 100vh;
    color: var(--color-text-primary);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* Dashboard: full-width container override */
.container--wide {
    max-width: 1600px;
}

/* Card */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--spacing-2xl);
    margin-bottom: var(--spacing-lg);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.header h1 {
    font-size: 2.5rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
}

.header .subtitle {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

.header .date {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-top: var(--spacing-xs);
}

/* Token Input Section */
.token-section {
    text-align: center;
}

.token-section h2 {
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
}

.token-section p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-lg);
}

label {
    display: block;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--color-background);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all var(--transition-base);
    cursor: pointer;
}

.checkbox-item:hover {
    background: rgba(79, 209, 197, 0.05);
    border-color: var(--color-primary-light);
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: var(--spacing-md);
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-item label {
    margin: 0;
    cursor: pointer;
    flex: 1;
}

/* Button Styles */
.button {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--gradient-accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    text-decoration: none;
    text-align: center;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.button:active {
    transform: translateY(0);
}

.button-full {
    width: 100%;
}

.button-secondary {
    background: var(--color-text-light);
}

/* Steps Indicator */
.steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--spacing-2xl);
    gap: var(--spacing-md);
}

.step {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-border);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all var(--transition-base);
}

.step.active .step-number {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-md);
}

.step.completed .step-number {
    background: var(--color-success);
    color: white;
}

.step-text {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.step-divider {
    width: 40px;
    height: 2px;
    background: var(--color-border);
}

/* Alert Messages */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid;
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    border-color: var(--color-success);
    color: var(--color-success);
}

.alert-error {
    background: rgba(245, 101, 101, 0.1);
    border-color: var(--color-error);
    color: var(--color-error);
}

.alert-info {
    background: rgba(66, 153, 225, 0.1);
    border-color: var(--color-info);
    color: var(--color-info);
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dashboard Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

/* Compact card padding for the dashboard */
.container--wide .card {
    padding: var(--spacing-xl);
}

/* Tighter table cells on dashboard for readability at full width */
.container--wide td,
.container--wide th {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.88rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--gradient-accent);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    color: white;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--color-background);
}

th {
    text-align: left;
    padding: var(--spacing-md);
    font-weight: 600;
    color: var(--color-text-primary);
    border-bottom: 2px solid var(--color-border);
}

td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
}

tr:hover {
    background: rgba(79, 209, 197, 0.05);
}

/* Badge */
.badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(72, 187, 120, 0.2);
    color: var(--color-success);
}

.badge-error {
    background: rgba(245, 101, 101, 0.2);
    color: var(--color-error);
}

/* ─── Parallax Hero ──────────────────────────────────────────────────────────── */

.hero-parallax {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden; /* clips the over-scrolling ::before */
}

/* The image lives on ::before so we can translate it independently */
.hero-parallax::before {
    content: '';
    position: absolute;
    inset: -20%; /* extra room so translateY never shows a gap */
    background-image: url('vanessa-tim.jpg');
    background-size: cover;
    background-position: center 15%;
    background-repeat: no-repeat;
    will-change: transform;
    transform: translateY(var(--parallax-y, 0px));
    z-index: 0;
}

@media (max-width: 768px) {
    .hero-parallax {
        min-height: 70vh;
    }
    /* Disable parallax movement on mobile — just a static cover */
    .hero-parallax::before {
        inset: 0;
        transform: none !important;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.38) 0%,
        rgba(0, 0, 0, 0.55) 60%,
        rgba(0, 0, 0, 0.75) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: var(--spacing-xl);
    animation: heroFadeIn 1.2s ease both;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-names {
    font-size: clamp(2.2rem, 7vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
    background: none;
    -webkit-text-fill-color: white;
    color: white;
}

.hero-date {
    font-size: clamp(1rem, 3vw, 1.4rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
}

.hero-cta {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-2xl);
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 100px;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    backdrop-filter: blur(6px);
    background: rgba(255,255,255,0.12);
    transition: background var(--transition-base), transform var(--transition-base);
    animation: heroFadeIn 1.6s ease both;
}

.hero-cta:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(3px);
}

/* Scroll arrow bounce */
.hero-cta::after {
    content: '';
    display: block;
    margin: 6px auto 0;
    width: 8px;
    height: 8px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
}


/* ─── Radio Item Wrapper (for sub-input reveal) ───────────────────────────── */

.radio-item-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.radio-sub-input {
    margin-top: 0;
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md) calc(var(--spacing-md) * 2 + 18px + var(--spacing-md));
    background: rgba(79, 209, 197, 0.05);
    border: 2px solid var(--color-primary-light);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sub-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xs);
}

.sub-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition-base);
}

.sub-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.1);
}

/* ─── Spotify / Music Search ─────────────────────────────────────────────── */

.spotify-search-wrap {
    position: relative;
}

.spotify-input-row {
    display: flex;
}

/* Input with icon + spinner inside */
.spotify-input-inner {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.spotify-input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #1DB954;
    pointer-events: none;
    flex-shrink: 0;
}

.spotify-input-inner input {
    width: 100%;
    padding-left: 42px;  /* room for the Spotify icon */
    padding-right: 38px; /* room for the spinner */
}

.spotify-input-spinner {
    position: absolute;
    right: 12px;
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border);
    border-top-color: #1DB954;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

.spotify-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
}

.spotify-result-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--color-border);
}

.spotify-result-item:last-child {
    border-bottom: none;
}

.spotify-result-item:hover {
    background: rgba(79, 209, 197, 0.08);
}

.spotify-result-item img {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.spotify-result-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.spotify-result-text strong {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text-primary);
}

.spotify-result-text span {
    font-size: 0.82rem;
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-no-results {
    padding: var(--spacing-md);
    color: var(--color-text-light);
    text-align: center;
    font-size: 0.9rem;
}

/* Selected track display */
.spotify-selected {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(29, 185, 84, 0.08);
    border: 2px solid rgba(29, 185, 84, 0.3);
    border-radius: var(--radius-md);
}

.spotify-track-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.spotify-track-info img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.spotify-track-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.spotify-track-text strong {
    font-size: 0.95rem;
    color: var(--color-text-primary);
}

.spotify-track-text span {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.btn-clear-track {
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 1.1rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    line-height: 1;
    transition: color var(--transition-fast);
    flex-shrink: 0;
}

.btn-clear-track:hover {
    color: var(--color-error);
}

/* ─── Song card grid ─────────────────────────────────────────────────────── */

.song-grid {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.song-grid > .song-card {
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 220px;
    flex: 1 1 220px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.song-card {
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background: rgba(29, 185, 84, 0.06);
    border: 1.5px solid rgba(29, 185, 84, 0.25);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    padding-right: 2rem;        /* room for the × button */
    -webkit-animation: slideUp 0.2s ease;
    animation: slideUp 0.2s ease;
    /* gap fallback for older Safari */
    margin: 0;
}

/* Spacing between card children via margin instead of gap for older Safari */
.song-card-art + .song-card-body,
.song-card-art--placeholder + .song-card-body {
    margin-left: var(--spacing-md);
}

.song-card-art {
    width: 52px;
    height: 52px;
    min-width: 52px;    /* prevent shrink on iOS */
    min-height: 52px;
    border-radius: var(--radius-sm);
    -o-object-fit: cover;
    object-fit: cover;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    display: block;     /* prevent inline baseline gap on iOS */
}

.song-card-art--placeholder {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    border-radius: var(--radius-sm);
    background: var(--color-border);
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

.song-card-body {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    /* gap fallback */
    margin: 0;
}

.song-card-body > * + * {
    margin-top: 2px;
}

.song-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    display: block;
}

.song-card-artist {
    font-size: 0.78rem;
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    display: block;
}

.song-card-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 6px 8px;   /* larger tap target for iOS */
    border-radius: var(--radius-sm);
    -webkit-transition: color var(--transition-fast), background var(--transition-fast);
    transition: color var(--transition-fast), background var(--transition-fast);
    -webkit-appearance: none;   /* remove iOS default button styling */
    touch-action: manipulation; /* prevent double-tap zoom */
}

.song-card-remove:hover,
.song-card-remove:active {
    color: var(--color-error);
    background: rgba(255, 99, 99, 0.1);
}

/* Compact variant for dashboard table cells */
.song-grid--compact {
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    gap: var(--spacing-xs);
    margin-top: 0;
    min-width: 200px;
}

.song-grid--compact > .song-card {
    -webkit-flex: none;
    flex: none;
    width: 100%;
}

.song-card--compact {
    padding: 6px 10px;
    padding-right: 10px;    /* no remove button */
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
    align-items: flex-start;
}

/* Override margin-based gap for compact */
.song-card--compact .song-card-art + .song-card-body,
.song-card--compact .song-card-art--placeholder + .song-card-body {
    margin-left: 10px;
}

.song-card--compact .song-card-art,
.song-card--compact .song-card-art--placeholder {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    margin-top: 2px;
}

.song-card--compact .song-card-body > * + * {
    margin-top: 1px;
}

.song-card--compact .song-card-title {
    font-size: 0.82rem;
    white-space: normal;
    overflow: visible;
    -o-text-overflow: unset;
    text-overflow: unset;
    line-height: 1.3;
}

.song-card--compact .song-card-artist {
    font-size: 0.74rem;
    white-space: normal;
    overflow: visible;
    -o-text-overflow: unset;
    text-overflow: unset;
    line-height: 1.3;
}

.song-card-title--link {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 4px;
    color: #1DB954;
    text-decoration: none;
    font-weight: 600;
}

.song-card-title--link:hover,
.song-card-title--link:active {
    text-decoration: underline;
}

/* Single column on small screens */
@media (max-width: 480px) {
    .song-grid > .song-card {
        -webkit-flex: 1 1 100%;
        flex: 1 1 100%;
    }
}

/* Already-added state in the results dropdown */
.spotify-result-item--added {
    opacity: 0.5;
    cursor: default;
}

.spotify-result-added {
    font-size: 0.75rem;
    color: #1DB954;
    font-weight: 600;
    white-space: nowrap;
    margin-left: auto;
    padding-left: var(--spacing-sm);
}

/* ─── Maps Embed ─────────────────────────────────────────────────────────── */

.maps-embed-wrap {
    margin: var(--spacing-md) 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.maps-link {
    display: inline-block;
    margin-top: var(--spacing-sm);
    font-size: 0.9rem;
    color: var(--color-secondary-dark);
    text-decoration: none;
    font-weight: 500;
}

.maps-link:hover {
    text-decoration: underline;
}

/* Song link in dashboard table */
.song-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1DB954;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted #1DB954;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.song-link:hover {
    color: #17a349;
    border-bottom-color: #17a349;
}

.song-link-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Multi-song list in dashboard table */
.song-list {
    margin: 0;
    padding: 0 0 0 1.1em;
    list-style: decimal;
    min-width: 160px;
}

.song-list li {
    font-size: 0.88rem;
    margin-bottom: 3px;
    white-space: normal;
    word-break: break-word;
}

.song-list li:last-child {
    margin-bottom: 0;
}

/* ─── Form Sections ─────────────────────────────────────────────────────────── */

.form-section {
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--color-border);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-primary-light);
}

/* ─── Radio Items ────────────────────────────────────────────────────────────── */

.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.radio-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--color-background);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all var(--transition-base);
    cursor: pointer;
    user-select: none;
    font-weight: normal;
    margin: 0;
}

.radio-item:hover {
    background: rgba(79, 209, 197, 0.07);
    border-color: var(--color-primary-light);
}

.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
    margin: 0;
}

.radio-item input[type="radio"]:checked ~ .radio-label,
.radio-item:has(input[type="radio"]:checked) {
    background: rgba(79, 209, 197, 0.12);
    border-color: var(--color-primary);
}

.radio-item:has(input[type="radio"]:checked) {
    background: rgba(79, 209, 197, 0.12);
    border-color: var(--color-primary);
}

.radio-item--decline:has(input[type="radio"]:checked) {
    background: rgba(245, 101, 101, 0.08);
    border-color: var(--color-error);
}

.radio-item--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.radio-item--disabled .radio-label {
    color: var(--color-text-light);
}

.radio-label {
    color: var(--color-text-primary);
    line-height: 1.4;
}

.radio-label small {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: var(--color-text-light);
    line-height: 1.5;
    font-style: normal;
}

.radio-label small a {
    color: var(--color-secondary-dark);
    text-decoration: none;
}

.radio-label small a:hover {
    text-decoration: underline;
}

/* Stepper component — replaces inline number inputs for mobile friendliness */
.stepper {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface);
    transition: border-color var(--transition-base), opacity var(--transition-base);
    vertical-align: middle;
    flex-shrink: 0;
}

/* Block variant used in the hotel room fields */
.stepper--block {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.stepper-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--color-background);
    color: var(--color-primary-dark);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    /* Prevent label activation when tapping inside a <label> */
    pointer-events: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.stepper-btn:hover:not(:disabled) {
    background: var(--color-primary-light);
    color: white;
}

.stepper-btn:active:not(:disabled) {
    background: var(--color-primary);
    color: white;
}

.stepper-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.stepper-val {
    min-width: 36px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    padding: 0 var(--spacing-xs);
    user-select: none;
}

/* Dimmed state when the radio option isn't selected */
.stepper--disabled {
    opacity: 0.38;
    pointer-events: none;
}

/* Inline radio items that contain a stepper can wrap on very small screens */
.radio-item--inline {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

/* ─── Info Box ──────────────────────────────────────────────────────────────── */

.info-box {
    background: rgba(99, 179, 237, 0.08);
    border-left: 4px solid var(--color-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.info-box p {
    margin-bottom: var(--spacing-sm);
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* ─── Sub-fields (hotel rooms) ──────────────────────────────────────────────── */

.sub-fields {
    margin-top: var(--spacing-md);
    padding: var(--spacing-lg);
    background: rgba(79, 209, 197, 0.05);
    border-radius: var(--radius-md);
    border: 1px dashed var(--color-primary-light);
}

/* ─── Form Row (side-by-side inputs) ────────────────────────────────────────── */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ─── Hint text ──────────────────────────────────────────────────────────────── */

.form-hint {
    margin-top: var(--spacing-md);
    color: var(--color-text-light);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.5;
}

.form-hint-inline {
    display: block;
    margin-top: var(--spacing-xs);
    color: var(--color-text-light);
    font-size: 0.88rem;
    font-style: italic;
}

/* ─── Disabled attending section ─────────────────────────────────────────────── */

.disabled-section {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(30%);
    transition: opacity var(--transition-base);
}

/* ─── Field-level validation ─────────────────────────────────────────────── */

.field-error input,
.field-error textarea,
.field-error .sub-input {
    border-color: var(--color-error) !important;
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.15) !important;
}

.field-error .radio-group,
.field-error .stepper {
    outline: 2px solid var(--color-error);
    outline-offset: 3px;
    border-radius: var(--radius-md);
}

.field-error-msg {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--color-error);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Shake animation for the field group when it has an error */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.field-shake {
    animation: shake 0.4s ease;
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .card {
        padding: var(--spacing-lg);
    }

    .steps {
        flex-direction: column;
    }

    .step-divider {
        width: 2px;
        height: 30px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: var(--spacing-sm);
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .card {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .button {
        display: none;
    }
}
