/* Mobile-first, minimal styling for GladFest app */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #7c3aed;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --accent-sun: #f97316;
    --accent-sky: #0ea5e9;
    --accent-leaf: #10b981;
    --accent-rose: #ec4899;
    --sweden-blue: #005293;
    --sweden-yellow: #f4d46a;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #fdf2ff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.16), 0 4px 6px -2px rgba(0, 0, 0, 0.08);
}

.hidden {
    display: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--sweden-blue);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 1rem;
}

.admin-page-header {
    text-align: center;
    margin: 0.5rem 0 1.5rem;
}

.admin-page-header h1 {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.admin-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--bg-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 2rem 1.5rem;
}

.stacked-container {
    margin-top: 2rem;
}

.container.landing {
    max-width: 960px;
    padding: 2rem;
    background: var(--sweden-yellow);
}

.container.landing {
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
}

.landing-header {
    margin-bottom: 1.5rem;
}

.lang-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.flag-icon {
    width: 32px;
    height: 22px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--shadow);
    cursor: pointer;
    pointer-events: auto;
}

.landing-header h1 {
    font-size: 2rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 0.5rem;
}

.landing-header .subtitle {
    color: #000000;
    font-weight: 600;
}

.landing-main {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.site-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 0.85rem;
    color: var(--text-light);
    background: var(--sweden-yellow);
    animation: fadeUp 1.15s ease both;
}

.mailto-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background-color: var(--sweden-blue);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.mailto-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.mailto-button:active {
    transform: translateY(0);
    opacity: 0.9;
}

.footer-note {
    margin: 0;
    max-width: 520px;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.hero {
    display: grid;
    gap: 1.5rem;
    animation: fadeInOnly 0.8s ease both;
}

.hero-media img,
.story-media img,
.mood-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    box-shadow: var(--shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.mood-card img {
    height: 180px;
    object-fit: cover;
}

.hero-media img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hero-media img:hover,
.story-media img:hover,
.mood-card img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.hero-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.lead {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.feature-section h3,
.story-section h3,
.gallery-section h3,
.future-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.card-grid {
    display: grid;
    gap: 1rem;
    animation: fadeUp 0.9s ease both;
}

.card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    background-color: #fff7ed;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-sun {
    border-top: 4px solid var(--accent-sun);
    background-color: #fff7ed;
}

.card-sky {
    border-top: 4px solid var(--accent-sky);
    background-color: #ecfeff;
}

.card-leaf {
    border-top: 4px solid var(--accent-leaf);
    background-color: #ecfdf5;
}

.card-rose {
    border-top: 4px solid var(--accent-rose);
    background-color: var(--sweden-yellow);
}

.wide-card {
    padding: 1.5rem;
    background-color: #e0f2fe;
    border-color: #38bdf8;
}

.card h4 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.story-section {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    animation: fadeUp 1s ease both;
}

.gallery-section {
    animation: fadeUp 1.05s ease both;
}

.section-header {
    text-align: right;
    margin-bottom: 1rem;
}

.mood-grid {
    display: grid;
    gap: 1rem;
    align-items: stretch;
}

.mood-card {
    text-align: center;
    background-color: var(--bg-color);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    animation: floatSoft 6s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mood-card:nth-child(2) {
    animation-delay: 0.8s;
}

.mood-card:nth-child(3) {
    animation-delay: 1.6s;
}

.mood-card p {
    margin-top: 0.75rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.future-section {
    padding: 1.5rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #ede9fe 0%, #dbeafe 100%);
    border: 1px solid #c7d2fe;
    border-top: 4px solid #7aa2ff;
    animation: fadeUp 1.1s ease both;
}

.audience-section {
    animation: fadeUp 1.12s ease both;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.required {
    color: var(--error-color);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
}

.select-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.select-row select {
    flex: 1;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: #f3f4f6;
    color: var(--text-color);
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

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

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #1d4ed8;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
}

.btn-copy {
    margin-top: 1rem;
    background-color: var(--success-color);
    color: #ffffff;
}

.btn-copy:hover:not(:disabled) {
    background-color: #059669;
}

.btn-copy.copied {
    background-color: #9ca3af;
}

.btn-copy.copied:hover:not(:disabled),
.btn-copy.copied:active:not(:disabled),
.btn-copy.copied:focus-visible:not(:disabled) {
    background-color: #9ca3af;
}


.copy-actions {
    --split-duration: 0.35s;
    --split-gap: 0.75rem;
    margin-top: 1rem;
    display: flex;
    gap: var(--split-gap);
    align-items: stretch;
    overflow: hidden;
}

.copy-actions .btn {
    width: 100%;
    flex: 0 0 auto;
    margin-top: 0;
    min-width: 0;
    transition: width var(--split-duration) ease,
        opacity var(--split-duration) ease,
        transform var(--split-duration) ease,
        background-color 0.2s ease;
}

.btn-swish {
    background-color: var(--success-color);
    color: #ffffff;
    width: 0;
    opacity: 0;
    transform: translateX(100%) scale(0.98);
    pointer-events: none;
}

.btn-swish:hover:not(:disabled) {
    background-color: #059669;
}

.copy-actions.split .btn-copy {
    width: calc(50% - (var(--split-gap) / 2));
}

.copy-actions.split .btn-swish {
    width: calc(50% - (var(--split-gap) / 2));
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.result {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 6px;
    animation: fadeIn 0.3s ease-in;
}

.result.hidden {
    display: none;
}

.result.success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.result.warning {
    background-color: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.result.error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.code-display {
    text-align: center;
}

.code-label {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.code-value {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    margin: 1rem 0;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.code-hint {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.pin-gate {
    margin-top: 2rem;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.5s ease both;
    justify-content: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background-color: #e0f2fe;
    border: 1px solid #bae6fd;
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow);
}

.nav-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.class-roster {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    box-shadow: var(--shadow);
    animation: fadeIn 0.4s ease both;
}

.manual-add {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.stats-container {
    margin-top: 2rem;
}

.notification-container {
    margin-top: 2rem;
}

.import-container {
    margin-top: 2rem;
}

.import-warning {
    padding: 0.9rem 1rem;
    border-radius: 8px;
    border: 1px solid #fde68a;
    background-color: #fffbeb;
    color: #92400e;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}

.notification-banner {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #fde68a;
    background-color: #fffbeb;
    color: #92400e;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    animation: fadeIn 0.4s ease both;
    white-space: pre-line;
}

.registration-success {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-color);
    white-space: pre-line;
}

.roster-title {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.name-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.35rem;
}

.name-item {
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.name-stack {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.name-code {
    font-size: 0.75rem;
    color: var(--text-light);
}

.manual-badge {
    background-color: #e5e7eb;
    color: #374151;
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.status-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.name-item.checked-in {
    background-color: #d1fae5;
    border-color: #86efac;
    color: #065f46;
}

.checkin-time-inline {
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
}

.status-action {
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.status-action.check {
    background-color: var(--success-color);
}

.status-action.uncheck {
    background-color: var(--error-color);
}

.status-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.status-badge.checked-in {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge.not-checked {
    background-color: #fcd34d;
    color: #92400e;
}

.participant-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.participant-class {
    color: var(--text-light);
    margin: 0.25rem 0;
}

.checkin-time {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

#checkinSection {
    margin-top: 1.5rem;
}

.stats-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
}

.stats-progress {
    margin-bottom: 1rem;
}

.group-stats {
    margin-top: 1.5rem;
}

.group-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.group-stats-display {
    margin-bottom: 0;
}

.progress-bar {
    width: 100%;
    height: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.progress-fill {
    height: 100%;
    background-color: var(--success-color);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.last-updated {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
}


.modal {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    width: 100%;
    max-width: 520px;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    animation: fadeIn 0.2s ease;
}

.warning-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.warning-header h3 {
    margin: 0;
}

.warning-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #ef4444;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
}

.modal-content h3 {
    margin-bottom: 0.75rem;
}

.modal-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.modal-actions .btn {
    width: 100%;
}

.btn-secondary {
    background-color: #e5e7eb;
    color: var(--text-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #d1d5db;
}

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

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

@keyframes fadeInOnly {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes floatSoft {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Tablet and up */
@media (min-width: 768px) {
    .container {
        padding: 2.5rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .code-value {
        font-size: 3rem;
    }

    .hero {
        grid-template-columns: 1.1fr 1fr;
        align-items: center;
    }

    .card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .story-section {
        grid-template-columns: 1fr 1fr;
    }

    .mood-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

