/*
  AESTHETIC DIRECTION: Editorial magazine meets modern African energy.
  Think Notion meets Afrobeats concert poster.
  Syne for headings, DM Sans for body. Base-8 spacing system.
  Primary #E8451A · Dark #1A1A2E · Accent #F5A623 · Background #FAFAF8
*/

/* AfriEvents — Custom CSS */

:root {
    --color-primary:      #E8451A;
    --color-primary-dark: #C23510;
    --color-secondary:    #111118;
    --color-dark:         #1A1A2E;
    --color-accent:       #F5A623;
    --color-cream:        #F5F0EB;
    --color-surface:      #FAFAF8;
    --color-success:      #1DB954;
    --color-danger:       #E8001A;
    --color-warning:      #F39C12;
}

html { scroll-behavior: smooth; }

/* Cream background with subtle dot-grid texture */
body {
    background-color: var(--color-cream);
    background-image: radial-gradient(rgba(0, 0, 0, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* Custom scrollbar */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--color-cream); }
::-webkit-scrollbar-thumb { background: #c8b8a2; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* Line clamp utilities */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Aspect ratio */
.aspect-video { aspect-ratio: 16 / 9; }

/* Form focus ring consistency */
input:focus, select:focus, textarea:focus { outline: none; }

/* Styled native select (used where x-model binding must stay intact) */
.select-styled {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%23111118' opacity='0.4'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
    padding-right: 2.75rem;
    cursor: pointer;
}

/* Custom dropdown panel */
.cs-dropdown {
    transform-origin: top;
}
.cs-option-selected { background-color: rgba(232,69,26,0.05); color: #E8451A; font-weight: 700; }
.cs-option:hover    { background-color: rgba(17,17,24,0.04); }

/* Card hover — dramatic shadow or nothing */
.card-hover {
    transition: transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s cubic-bezier(.2,.8,.2,1);
}
.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}

/* Primary button — bold pill with shadow */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary);
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.9rem 2rem;
    border-radius: 9999px;
    border: 2px solid var(--color-primary);
    box-shadow: 0 8px 24px rgba(232, 69, 26, 0.3);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}
.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    box-shadow: 0 12px 32px rgba(232, 69, 26, 0.4);
    transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }

/* Outline button */
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--color-secondary);
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.85rem 1.875rem;
    border-radius: 9999px;
    border: 2px solid var(--color-secondary);
    transition: background 0.2s, color 0.2s, transform 0.15s;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}
.btn-outline:hover {
    background: var(--color-secondary);
    color: #fff;
    transform: translateY(-2px);
}

/* Loading spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Event description prose */
.event-desc p     { margin-bottom: 1em; }
.event-desc h2    { font-size: 1.25rem; font-weight: 700; margin: 1.5em 0 0.5em; color: var(--color-secondary); font-family: 'Syne', sans-serif; }
.event-desc ul    { list-style: disc; padding-left: 1.5em; margin-bottom: 1em; }
.event-desc li    { margin-bottom: 0.25em; }

/* Mobile ticket bar */
@media (max-width: 1023px) {
    .mobile-ticket-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 40;
        background: #fff;
        border-top: 1px solid rgba(0,0,0,0.08);
        padding: 12px 16px;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.12);
    }
}

/* Dashboard sidebar */
.sidebar-link { transition: background 0.15s, color 0.15s; }

/* Table responsive */
@media (max-width: 640px) {
    .hide-mobile { display: none; }
}

/* Alpine cloak */
[x-cloak] { display: none !important; }

/* Full-bleed marquee ticker */
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.marquee-inner {
    display: flex;
    animation: marquee 22s linear infinite;
    will-change: transform;
}
.marquee-inner:hover { animation-play-state: paused; }

/* Section label — editorial eyebrow */
.eyebrow {
    font-family: 'Syne', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-primary);
}

/* Dashboard content area — no dot grid */
.dashboard-content {
    background-color: #F0EBE3;
    background-image: none;
}

/* ── Form Design System ─────────────────────────────────────── */
/*
  Rules:
  - Labels: static, above input, uppercase 11px
  - Inputs: 2px bottom border only, transparent bg, 16px min font
  - Focus: border-bottom → brand color #E8451A, 0.2s transition
  - No box shadows or rounded rectangle borders on inputs
  - Spacing: 28px gap between fields
  - Submit: full-width, 54px height, pill (border-radius 50px)
  - Errors: red left border (3px) + small error text
  - Avatars: initials circle, camera overlay on hover, click to upload
*/

.fi-group {
    margin-bottom: 28px;
}
.fi-label {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(26, 26, 46, 0.50);
    margin-bottom: 10px;
    line-height: 1;
}
.fi-label .fi-req {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    color: rgba(26, 26, 46, 0.28);
}
.fi-input,
.fi-textarea {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 500;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(26, 26, 46, 0.12);
    border-radius: 0;
    outline: none;
    color: #1A1A2E;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.fi-input::placeholder,
.fi-textarea::placeholder {
    color: rgba(26, 26, 46, 0.20);
}
.fi-input:focus,
.fi-textarea:focus {
    border-bottom-color: #E8451A;
}
.fi-input:disabled {
    color: rgba(26, 26, 46, 0.35);
    cursor: not-allowed;
}
.fi-textarea {
    resize: vertical;
    min-height: 120px;
    padding-top: 10px;
}
.fi-select {
    width: 100%;
    padding: 10px 28px 10px 0;
    font-size: 16px;
    font-weight: 500;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%231A1A2E' opacity='0.3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 4px center;
    background-size: 16px;
    border: none;
    border-bottom: 2px solid rgba(26, 26, 46, 0.12);
    border-radius: 0;
    outline: none;
    color: #1A1A2E;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease;
}
.fi-select:focus {
    border-bottom-color: #E8451A;
}

/* Error state */
.fi-group.fi-error .fi-input,
.fi-group.fi-error .fi-textarea {
    border-bottom-color: #dc2626;
    border-left: 3px solid #dc2626;
    padding-left: 12px;
}
.fi-error-msg {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
}

/* Submit button — full width pill */
.fi-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    background: #E8451A;
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    gap: 8px;
}
.fi-submit:hover {
    background: #C23510;
    transform: scale(1.02);
}
.fi-submit:active {
    transform: scale(0.99);
}

/* Avatar — click circle to upload, camera overlay on hover */
.avatar-trigger {
    position: relative;
    display: inline-block;
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
}
.avatar-trigger input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    border-radius: 50%;
    z-index: 2;
}
.avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.52);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 1;
}
.avatar-trigger:hover .avatar-overlay {
    opacity: 1;
}
/* Avatar upload spinner */
.avatar-spinner {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid rgba(232,69,26,0.2);
    border-top-color: #E8451A;
    animation: spin 0.8s linear infinite;
}

/* Custom checkbox */
.fi-check {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}
.fi-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.fi-check-box {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid rgba(26, 26, 46, 0.20);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
    background: transparent;
}
.fi-check input[type="checkbox"]:checked + .fi-check-box {
    background: #E8451A;
    border-color: #E8451A;
}
.fi-check-box svg {
    opacity: 0;
    transition: opacity 0.15s;
}
.fi-check input[type="checkbox"]:checked + .fi-check-box svg {
    opacity: 1;
}

/* Form page wrapper — sits on page bg, no card shadow */
.fi-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 48px 24px;
}
.fi-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(26, 26, 46, 0.30);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(26, 26, 46, 0.06);
}

/* Two-column profile grid */
.fi-profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}
@media (min-width: 768px) {
    .fi-profile-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Mobile Responsive Helpers ── */
/* Hide scrollbar but keep scroll functionality */
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }


@media (max-width: 639px) {
    .btn-primary.whitespace-normal,
    .btn-primary.!whitespace-normal {
        white-space: normal;
    }
    .fi-page {
        padding: 32px 16px;
    }
}
