/* ========================================
   Event Public Page — Royal Theme
   ======================================== */

:root {
    --royal-bg: #111125;
    --royal-surface: #1E1E32;
    --royal-surface-high: #28283D;
    --royal-primary: #FFF6DF;
    --royal-gold: #E9C400;
    --royal-gold-bright: #FFD700;
    --royal-text: #c8c8d4;
    --royal-text-muted: #8b8ba0;
    --royal-border: rgba(255, 246, 223, 0.08);
    --royal-border-hover: rgba(255, 246, 223, 0.15);
    --royal-glass: rgba(55, 55, 77, 0.2);
}

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

body.event-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--royal-bg);
    color: var(--royal-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* ---- Navigation ---- */
.event-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(17, 17, 37, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--royal-border);
}
.event-nav-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Noto Serif', Georgia, serif;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    background: linear-gradient(135deg, var(--royal-gold), var(--royal-gold-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}
.event-nav-links { display: flex; gap: 16px; }
.event-nav-lang {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    flex-shrink: 0;
}
.event-nav-lang a {
    color: var(--royal-text-muted);
    text-decoration: none;
    letter-spacing: 0.05em;
    font-weight: 500;
    transition: color 0.2s;
}
.event-nav-lang a.active { color: var(--royal-gold); font-weight: 700; }
.event-nav-lang a:hover { color: var(--royal-primary); }
.event-nav-lang .sep { color: var(--royal-surface-high); }
.event-nav-links a {
    color: var(--royal-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}
.event-nav-links a:hover { color: var(--royal-primary); }

/* ---- Hero ---- */
.event-hero {
    background: linear-gradient(180deg, var(--royal-surface) 0%, var(--royal-bg) 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.event-hero-overlay {
    background: rgba(17, 17, 37, 0.8);
    backdrop-filter: blur(8px);
    padding: 60px 40px;
    text-align: center;
    width: 100%;
}
.event-hero h1 {
    font-family: 'Noto Serif', Georgia, serif;
    color: var(--royal-primary);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}
.event-hero-details {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: var(--royal-text-muted);
    margin-bottom: 28px;
    flex-wrap: wrap;
    font-size: 14px;
}
.event-hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---- Sections ---- */
.event-section {
    padding: 48px 24px;
    max-width: 900px;
    margin: 0 auto;
    border-bottom: 1px solid var(--royal-border);
}
.event-section h2 {
    font-family: 'Noto Serif', Georgia, serif;
    color: var(--royal-primary);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    opacity: 0.85;
}
.event-description {
    color: var(--royal-text);
    line-height: 1.8;
    font-size: 15px;
}

/* ---- Location ---- */
.location-content { display: flex; gap: 32px; align-items: flex-start; }
.location-info { flex: 1; }
.location-info h3 { color: var(--royal-primary); font-family: 'Noto Serif', Georgia, serif; margin-bottom: 8px; }
.location-info p { color: var(--royal-text-muted); margin-bottom: 16px; }
.location-qr { text-align: center; }
.location-qr img { width: 120px; height: 120px; border-radius: 12px; background: #ffffff; padding: 10px; box-shadow: 0 0 0 1px var(--royal-border); }
.location-qr small { display: block; color: var(--royal-text-muted); margin-top: 6px; font-size: 11px; }

/* ---- Timeline ---- */
.timeline-list { position: relative; padding-left: 24px; }
.timeline-list::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--royal-border); }
.timeline-item { display: flex; gap: 16px; margin-bottom: 24px; position: relative; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-time { flex-shrink: 0; width: 50px; font-size: 14px; font-weight: 600; color: var(--royal-gold); padding-top: 2px; margin-left: -24px; }
.timeline-dot { flex-shrink: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--royal-gold); margin-top: 5px; box-shadow: 0 0 0 3px var(--royal-bg); position: relative; z-index: 1; }
.timeline-content h3 { font-size: 15px; font-weight: 600; color: var(--royal-primary); margin: 0 0 4px; }
.timeline-content p { font-size: 13px; color: var(--royal-text-muted); margin: 0; }

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border: none;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--royal-gold), var(--royal-gold-bright));
    color: var(--royal-bg);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(233, 196, 0, 0.3); }
.btn-secondary {
    background: var(--royal-surface);
    color: var(--royal-primary);
    border: 1px solid var(--royal-border);
}
.btn-secondary:hover { border-color: var(--royal-border-hover); background: var(--royal-surface-high); }
.btn-accent {
    background: linear-gradient(135deg, var(--royal-gold), var(--royal-gold-bright));
    color: var(--royal-bg);
}
.btn-accent:hover { transform: translateY(-1px); }
.btn-sm { padding: 6px 14px; font-size: 12px; }

.text-muted { color: var(--royal-text-muted); }

/* ---- Wishlist ---- */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.wishlist-card {
    background: var(--royal-surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--royal-border);
    transition: border-color 0.2s;
}
.wishlist-card:hover { border-color: var(--royal-border-hover); }
.wishlist-card-reserved { opacity: 0.6; }
.wishlist-card-image { height: 140px; background: var(--royal-surface-high); position: relative; }
.wishlist-card-image img { width: 100%; height: 100%; object-fit: cover; }
.wishlist-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
}
.wishlist-badge-reserved {
    position: absolute; top: 8px; right: 8px;
    background: #10b981; color: white;
    padding: 3px 10px; border-radius: 99px;
    font-size: 10px; font-weight: 600;
}
.wishlist-badge-group {
    position: absolute; top: 8px; right: 8px;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    color: white;
    padding: 3px 10px; border-radius: 99px;
    font-size: 10px; font-weight: 600;
}
.wishlist-card-body { padding: 16px; }
.wishlist-card-body h3 { color: var(--royal-primary); font-size: 15px; margin-bottom: 6px; }
.wishlist-card-desc { color: var(--royal-text-muted); font-size: 12px; margin-bottom: 6px; }
.wishlist-card-price {
    background: linear-gradient(135deg, var(--royal-gold), var(--royal-gold-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
}
.wishlist-card-progress { color: var(--royal-text-muted); font-size: 11px; margin-top: 4px; }
.wishlist-card-actions { margin-top: 12px; display: flex; gap: 8px; }
.amount-input {
    width: 80px; padding: 6px 10px;
    background: var(--royal-surface-high);
    border: 1px solid var(--royal-border);
    border-radius: 8px;
    color: var(--royal-primary);
    font-size: 12px;
}
.amount-input:focus { outline: none; box-shadow: 0 0 0 2px rgba(233, 196, 0, 0.3); }

.progress-bar { background: var(--royal-surface-high); border-radius: 99px; height: 6px; margin-top: 8px; }
.progress-fill { background: linear-gradient(90deg, var(--royal-gold), var(--royal-gold-bright)); height: 100%; border-radius: 99px; }

/* ---- Polls ---- */
.public-poll {
    background: var(--royal-surface);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--royal-border);
}
.public-poll h3 { color: var(--royal-primary); font-size: 16px; margin-bottom: 16px; }

.poll-vote-option {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    background: var(--royal-surface-high);
    border: 1px solid var(--royal-border);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    color: var(--royal-text);
    transition: border-color 0.2s;
}
.poll-vote-option:hover { border-color: var(--royal-border-hover); }
.poll-vote-option input { accent-color: var(--royal-gold); }

.poll-option-result { margin-bottom: 10px; }
.poll-option-label { display: flex; justify-content: space-between; margin-bottom: 4px; color: var(--royal-text); font-size: 13px; }
.poll-bar { background: var(--royal-surface-high); border-radius: 99px; height: 8px; }
.poll-bar-fill { background: linear-gradient(90deg, var(--royal-gold), var(--royal-gold-bright)); height: 100%; border-radius: 99px; min-width: 2px; }

.poll-text-answers { display: flex; flex-direction: column; gap: 8px; }
.text-answer { background: var(--royal-surface-high); border-radius: 12px; padding: 12px 16px; }
.text-answer-author { color: var(--royal-gold); font-size: 12px; font-weight: 600; }
.text-answer p { color: var(--royal-text); margin-top: 4px; font-size: 13px; }

.public-poll textarea {
    width: 100%; padding: 12px;
    background: var(--royal-surface-high);
    border: 1px solid var(--royal-border);
    border-radius: 12px;
    color: var(--royal-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}
.public-poll textarea:focus { outline: none; box-shadow: 0 0 0 2px rgba(233, 196, 0, 0.3); }

/* ---- Photos ---- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.photo-card-public { border-radius: 12px; overflow: hidden; background: var(--royal-surface); }
.photo-card-public img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.photo-caption { padding: 8px 12px; color: var(--royal-text-muted); font-size: 11px; }
.photo-upload-form input[type="file"],
.photo-upload-form input[type="text"] {
    width: 100%; padding: 10px 14px;
    background: var(--royal-surface);
    border: 1px solid var(--royal-border);
    border-radius: 12px;
    color: var(--royal-primary);
    font-size: 13px;
}

/* ---- RSVP ---- */
.rsvp-form { max-width: 500px; margin: 0 auto; }
.rsvp-current { text-align: center; margin-bottom: 24px; }

.rsvp-buttons { display: flex; gap: 12px; margin-top: 8px; }
.rsvp-option { flex: 1; cursor: pointer; }
.rsvp-option input { display: none; }
.rsvp-option-label {
    display: block;
    padding: 14px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid var(--royal-border);
    background: var(--royal-surface);
    color: var(--royal-text-muted);
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}
.rsvp-option input:checked + .rsvp-option-yes { border-color: #10b981; background: rgba(16, 185, 129, 0.1); color: #10b981; }
.rsvp-option input:checked + .rsvp-option-maybe { border-color: var(--royal-gold); background: rgba(233, 196, 0, 0.1); color: var(--royal-gold); }
.rsvp-option input:checked + .rsvp-option-no { border-color: #ef4444; background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.rsvp-option-label:hover { border-color: var(--royal-border-hover); }

.rsvp-form .form-group { margin-bottom: 20px; }
.rsvp-form label {
    display: block;
    color: var(--royal-text-muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}
.rsvp-form input[type="text"],
.rsvp-form input[type="email"],
.rsvp-form input[type="number"],
.rsvp-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--royal-surface);
    border: 1px solid var(--royal-border);
    border-radius: 12px;
    color: var(--royal-primary);
    font-size: 14px;
    transition: box-shadow 0.2s;
}
.rsvp-form input:focus,
.rsvp-form textarea:focus { outline: none; box-shadow: 0 0 0 2px rgba(233, 196, 0, 0.3); }
.rsvp-form textarea { resize: vertical; font-family: inherit; }
.rsvp-form .btn-primary { width: 100%; padding: 14px; font-size: 15px; margin-top: 8px; }

.rsvp-badge { padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.rsvp-yes { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.rsvp-no { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.rsvp-maybe { background: rgba(233, 196, 0, 0.1); color: var(--royal-gold); }
.rsvp-pending { background: var(--royal-surface-high); color: var(--royal-text-muted); }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 13px; }
.alert-success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); color: #10b981; }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); color: #ef4444; }

/* ---- Footer ---- */
.event-footer {
    padding: 32px 24px;
    text-align: center;
    color: var(--royal-text-muted);
    font-size: 12px;
}
.event-footer a {
    background: linear-gradient(135deg, var(--royal-gold), var(--royal-gold-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

/* ---- Tooltip ---- */
[data-tooltip] { position: relative; cursor: default; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    background: var(--royal-bg); color: var(--royal-gold); border: 1px solid rgba(233,196,0,0.3);
    padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 500;
    white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.15s;
    z-index: 100; box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
[data-tooltip]:hover::after { opacity: 1; }
[data-tooltip-pos="bottom"]::after { bottom: auto; top: calc(100% + 8px); }

/* ---- File upload ---- */
.file-upload { position: relative; cursor: pointer; }
.file-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-upload-label {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 16px; border-radius: 12px;
    background: var(--royal-surface); border: 2px dashed var(--royal-border);
    color: var(--royal-text-muted); font-size: 13px; transition: all 0.2s;
}
.file-upload:hover .file-upload-label { border-color: rgba(233,196,0,0.3); color: var(--royal-gold); }
.file-upload-label .material-symbols-outlined { font-size: 20px; }

/* ---- Mobile menu toggle ---- */
.event-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--royal-text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .event-hero-overlay { padding: 40px 20px; }
    .event-hero h1 { font-size: 26px; }
    .event-hero-details { flex-direction: column; gap: 8px; }
    .location-content { flex-direction: column; }
    .event-section { padding: 32px 16px; }
    .rsvp-buttons { flex-direction: column; gap: 8px; }

    .event-nav { flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
    .event-nav-toggle { display: block; }
    .event-nav-links {
        display: none;
        order: 10;
        width: 100%;
        flex-direction: column;
        gap: 4px;
        padding-top: 10px;
        border-top: 1px solid var(--royal-border);
    }
    .event-nav-links.open { display: flex; }
    .event-nav-links a {
        font-size: 13px;
        padding: 8px 0;
        border-bottom: 1px solid var(--royal-border);
    }
    .event-nav-links a:last-child { border-bottom: none; }
    .event-nav-logo { font-size: 14px; }

    .location-qr img { width: 100px; height: 100px; }
}
