/* tickets_dmmc - Mobile-first ticket sales site */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    /* Warm tan background + dark text */
    --bg: #f4ead5;           /* light tan page background */
    --surface: #ffffff;      /* cards / elevated surfaces */
    --surface-hover: #faf5e8;
    --input-bg: #fdfaf2;     /* off-white for input fields on cards */
    --border: #d9ccab;       /* soft tan border */
    --text: #1a1a1a;         /* near-black body text */
    --text-muted: #6b5e42;   /* warm brown for secondary text */

    /* Dark orange primary accent */
    --accent: #c2410c;       /* dark orange (burnt) */
    --accent-hover: #9a3412; /* darker on hover */
    --accent-fg: #ffffff;    /* text color on accent buttons */

    /* Green for success / confirmations */
    --success: #15803d;      /* forest green */
    --warning: #ca8a04;      /* dark amber */
    --danger: #b91c1c;       /* dark red */

    --radius: 12px;
    --radius-sm: 8px;

    /* Fonts */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Bebas Neue', 'Inter', Impact, sans-serif;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400; /* Bebas Neue only has 400 */
    letter-spacing: 0.02em;
    line-height: 1.1;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.site-header h1 {
    font-size: clamp(1rem, 4vw, 1.9rem);
    text-align: center;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.site-header .subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 20px 16px;
    margin-bottom: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(60, 40, 10, 0.05);
}
.stat-item {
    text-align: center;
}
.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--accent);
    line-height: 1;
}
.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

/* City Cards (Where We've Been) */
.city-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 480px) {
    .city-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.city-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(60, 40, 10, 0.05);
}
.city-card-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}
.city-card-photo {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.city-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.city-card-body {
    padding: 16px;
}
.city-card-name {
    font-size: 1.5rem;
    margin-bottom: 6px;
    color: var(--text);
}
.city-card-stats {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}
.city-card-since {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.city-card-next {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--accent);
    color: var(--accent-fg);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.2s;
}
.city-card-next:hover {
    background: var(--accent-hover);
    color: var(--accent-fg);
}

/* Photo Scroll Strip (landing page highlight reel) */
.photo-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.photo-scroll::-webkit-scrollbar {
    height: 6px;
}
.photo-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.photo-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.photo-scroll-item {
    flex-shrink: 0;
    width: 220px;
    height: 160px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    scroll-snap-align: start;
    background: var(--border);
}
.photo-scroll-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.photo-scroll-item:hover img {
    transform: scale(1.05);
}
@media (min-width: 600px) {
    .photo-scroll-item {
        width: 260px;
        height: 180px;
    }
}

/* Event Cards */
.events-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 40px;
}

.event-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(60, 40, 10, 0.06), 0 2px 8px rgba(60, 40, 10, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.event-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(60, 40, 10, 0.1), 0 2px 4px rgba(60, 40, 10, 0.06);
    transform: translateY(-1px);
}

.event-card a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.event-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--border);
}

.event-card-body {
    padding: 16px;
}

.event-card-date {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.event-card-title {
    font-size: 1.6rem;
    line-height: 1.1;
    margin-bottom: 8px;
}

.event-card-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.event-card-location svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

.event-card-price {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(194, 65, 12, 0.1);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
}

/* Urgency Banner (above event hero) */
.urgency-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}
.urgency-banner .urgency-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.urgency-banner .urgency-text {
    letter-spacing: 0.01em;
}
.urgency-banner .urgency-time {
    font-weight: 400;
    font-size: 0.85rem;
    opacity: 0.85;
    margin-left: auto;
}
.urgency-warm {
    background: rgba(194, 65, 12, 0.10);
    color: var(--accent);
    border: 1px solid rgba(194, 65, 12, 0.25);
}
.urgency-warm .urgency-dot {
    background: var(--accent);
}
.urgency-hot {
    background: var(--accent);
    color: var(--accent-fg);
    border: 1px solid var(--accent-hover);
}
.urgency-hot .urgency-dot {
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255,255,255,0.6);
    animation: urgency-pulse 2.4s ease-out infinite;
}
@keyframes urgency-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
@media (max-width: 480px) {
    .urgency-banner .urgency-time {
        display: none;
    }
}

/* Single Event Page */
.event-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.event-detail {
    padding-bottom: 120px; /* space for sticky CTA */
}

.event-detail h1 {
    font-size: 2.25rem;
    line-height: 1.05;
    margin-bottom: 12px;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(60, 40, 10, 0.05);
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}
.event-meta-item svg {
    flex-shrink: 0;
    color: var(--accent);
}
.event-meta-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.event-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 24px;
}
.event-description p {
    margin-bottom: 12px;
}
.event-description img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 16px 0;
}
.event-description ul, .event-description ol {
    margin: 12px 0 12px 20px;
}
.event-description h2,
.event-description h3 {
    margin: 20px 0 8px;
    font-weight: 700;
}
.event-description a {
    color: var(--accent);
    text-decoration: underline;
}

/* Event content sections (Agenda, FAQ, Location, Organizer, etc.) */
.event-section {
    margin-bottom: 24px;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(60, 40, 10, 0.05);
}
.event-section h2 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: var(--text);
}
.event-section-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
}
.event-section-body p { margin-bottom: 10px; }
.event-section-body ul,
.event-section-body ol {
    margin: 10px 0 10px 20px;
}
.event-section-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 14px 0 6px;
}
.event-section-body a {
    color: var(--accent);
    text-decoration: underline;
}
.event-section-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 10px 0;
}
.map-link {
    display: block;
    margin-top: 12px;
}

/* Responsive video embed (16:9) */
.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--border);
}
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--radius-sm);
}

/* Vertical/portrait video embed (9:16 — YouTube Shorts, TikTok, etc.) */
.video-embed-vertical {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding-bottom: 177.78%; /* 9:16 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--border);
}
.video-embed-vertical iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--radius-sm);
}
@media (min-width: 600px) {
    .video-embed-vertical {
        max-width: 320px;
        padding-bottom: 0;
        height: 568px;
    }
}

/* Photo Gallery — featured + grid layout */
.photo-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.photo-gallery .photo-gallery-featured {
    grid-column: 1 / -1;
}

/* Container controls the aspect ratio; image fills it via object-fit */
.photo-gallery .photo-gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--border);
    text-decoration: none;
    aspect-ratio: 4 / 3;
}

.photo-gallery .photo-gallery-featured {
    aspect-ratio: 16 / 9;
}

.photo-gallery .photo-gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.photo-gallery .photo-gallery-item:hover img {
    transform: scale(1.04);
}

@media (min-width: 600px) {
    .photo-gallery {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 10px;
    }
}

/* Ticket section / Checkout widget */
.ticket-section {
    margin-bottom: 24px;
}
.ticket-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.eb-widget-container {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    min-height: 400px;
}

/* Sticky Buy button (mobile) */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 16px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(244, 234, 213, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sticky-cta-price {
    font-size: 1.1rem;
    font-weight: 700;
}
.sticky-cta-price .from {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-fg);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--accent-fg);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.4rem;
    border-radius: var(--radius);
}

.btn-block {
    width: 100%;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text);
}

/* Admin styles */
.admin-container {
    max-width: 960px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(60, 40, 10, 0.05);
}

.admin-event-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.admin-event-row:last-child {
    border-bottom: none;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #9ca3af;
    border: 1px solid #6b7280;
    border-radius: 24px;
    transition: background 0.2s, border-color 0.2s;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
.toggle-switch .slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}
.toggle-switch input:checked + .slider {
    border-color: var(--success);
}
.toggle-switch input:checked + .slider {
    background: var(--success);
}
.toggle-switch input:checked + .slider::before {
    transform: translateX(20px);
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}
.badge-success { background: rgba(21, 128, 61, 0.12); color: var(--success); }
.badge-warning { background: rgba(202, 138, 4, 0.15); color: var(--warning); }
.badge-danger { background: rgba(185, 28, 28, 0.12); color: var(--danger); }

/* Flash messages */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.flash-success { background: rgba(21, 128, 61, 0.08); border: 1px solid var(--success); color: var(--success); }
.flash-error { background: rgba(185, 28, 28, 0.08); border: 1px solid var(--danger); color: var(--danger); }

/* Diagnostics */
.diag-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.diag-table th, .diag-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.diag-table th {
    color: var(--text-muted);
    font-weight: 600;
}

/* Footer */
.site-footer {
    padding: 20px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive - tablets and up */
@media (min-width: 600px) {
    .container {
        padding: 0 24px;
    }
    .site-header h1 {
        font-size: 1.5rem;
    }
    .event-detail h1 {
        font-size: 2rem;
    }
    .event-card-body {
        padding: 20px;
    }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-pulse {
    animation: pulse 2s ease-in-out infinite;
    -webkit-animation: pulse 2s ease-in-out infinite;
}
