/*
  Mishti & Mike — Guest Portal
  Theme: Warm cream/gold, Playfair Display serif, elegant minimal
  Reference: docs/reference/reception-meal-selection.html
*/

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

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.5;
    color: #44403c;
    background-color: #f5f0eb;
    min-height: 100vh;
}

/* ===== COMMON LAYOUT ===== */
.page-container {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ===== TOP BAR ===== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid #d6cfc7;
    margin-bottom: 3rem;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.monogram-logo {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #3d3929;
    font-style: italic;
    line-height: 1;
}

/* Uploaded logo (Theme → Logo) in place of the text monogram */
.monogram-logo-img {
    display: block;
    height: 3.25rem;
    width: auto;
    max-width: 10rem;
    object-fit: contain;
}

.monogram-logo-img.lg {
    height: 7rem;
    max-width: 16rem;
    margin: 0 auto;
}

.top-bar-date {
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    color: #78716c;
}

.top-bar-venue {
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #78716c;
}

/* ===== TYPOGRAPHY ===== */
.serif {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

.label-text {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a7a5a;
}

.heading-lg {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 3rem;
    font-weight: 400;
    font-style: italic;
    color: #3d3929;
    line-height: 1.2;
}

.heading-md {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: #3d3929;
}

.body-text {
    font-size: 0.9375rem;
    color: #78716c;
    line-height: 1.7;
}

.accent-gold {
    color: #8a7a5a;
}

/* ===== DIAMOND DIVIDER ===== */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2.5rem 0;
    color: #c4bdb4;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    max-width: 6rem;
    height: 1px;
    background: #d6cfc7;
}

.divider .diamond {
    font-size: 0.75rem;
    line-height: 1;
}

/* ===== CARD ===== */
.card {
    background: #fff;
    border-radius: 0.5rem;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-block;
    padding: 0.875rem 2.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: #8a7a5a;
    border: none;
    border-radius: 0.375rem;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background: #6b5f45;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background: #c4bdb4;
    cursor: not-allowed;
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a7a5a;
    background: transparent;
    border: 1px solid #8a7a5a;
    border-radius: 0.375rem;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #8a7a5a;
    color: #fff;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #3d3929;
    margin-bottom: 0.5rem;
}

.form-text-input {
    width: 100%;
    padding: 0.75rem 0.875rem;
    font: inherit;
    font-size: 1rem;           /* 16px+ stops iOS zooming into the field */
    color: #3d3929;
    background: #fff;
    border: 1px solid #e7e0d6;
    border-radius: 0.375rem;
    box-sizing: border-box;
}
.form-text-input:focus { outline: none; border-color: #8a7a5a; }

.form-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.form-checkbox-row input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    accent-color: #8a7a5a;
    flex-shrink: 0;
}

/* ===== UPLOAD AREA ===== */
.upload-area {
    border: 2px dashed #d6cfc7;
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #faf8f5;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #8a7a5a;
    background: #f5f0eb;
}

.upload-area .upload-icon {
    font-size: 2.5rem;
    color: #c4bdb4;
    margin-bottom: 1rem;
}

.upload-area .upload-text {
    font-size: 0.9375rem;
    color: #78716c;
    margin-bottom: 0.5rem;
}

.upload-area .upload-hint {
    font-size: 0.8125rem;
    color: #a8a29e;
}

/* ===== FILE LIST ===== */
.file-list {
    list-style: none;
    margin: 1.5rem 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #ede9e3;
}

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

.file-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.file-item-name {
    font-size: 0.875rem;
    color: #3d3929;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-size {
    font-size: 0.75rem;
    color: #a8a29e;
    flex-shrink: 0;
}

.file-item-remove {
    color: #a8a29e;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.25rem;
    border: none;
    background: none;
}

.file-item-remove:hover {
    color: #78716c;
}

/* ===== PROGRESS ===== */
.progress-bar {
    width: 100%;
    height: 0.375rem;
    background: #e8e3dd;
    border-radius: 0.25rem;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar-fill {
    height: 100%;
    background: #8a7a5a;
    border-radius: 0.25rem;
    transition: width 0.3s ease;
}

/* ===== STATUS MESSAGES ===== */
.status-success {
    background: #f0f7f0;
    border: 1px solid #b8d4b8;
    color: #2d5a2d;
    padding: 1rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin: 1rem 0;
}

.status-error {
    background: #fdf0f0;
    border: 1px solid #e0b4b4;
    color: #6b2c2c;
    padding: 1rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin: 1rem 0;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    font-style: italic;
    color: #78716c;
    letter-spacing: 0.025em;
}

/* ===== MY UPLOADS ===== */
.upload-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #ede9e3;
}

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

.upload-item-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.upload-item-info {
    flex: 1;
    min-width: 0;
}

.upload-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #3d3929;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.upload-status {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

.status-published {
    background: #f0f7f0;
    color: #2d5a2d;
}

.status-pending {
    background: #fef9ec;
    color: #7a6520;
}

.status-review {
    background: #eef2ff;
    color: #3b4fa0;
}

.status-rejected {
    background: #fdf0f0;
    color: #6b2c2c;
}

.upload-item-date {
    font-size: 0.75rem;
    color: #a8a29e;
}

.upload-item-withdraw {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #c4bdb4;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.upload-item-withdraw:hover {
    color: #6b2c2c;
}

/* ===== HELP & FAQ ===== */
.help-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.help-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.help-step-number {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #8a7a5a;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 50%;
    line-height: 1;
}

.help-step strong {
    display: block;
    font-size: 0.9375rem;
    color: #3d3929;
    margin-bottom: 0.25rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
}

.faq-item {
    border-bottom: 1px solid #ede9e3;
}

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

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #3d3929;
    text-align: left;
    font-family: inherit;
    line-height: 1.4;
}

.faq-toggle {
    font-size: 1.25rem;
    color: #8a7a5a;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 0;
}

.faq-item.open .faq-answer {
    max-height: 10rem;
    padding: 0 0 1rem 0;
}

/* ===== GALLERY ===== */
.gallery-section {
    margin-bottom: 1rem;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.photo-cell {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0.375rem;
    cursor: pointer;
    background: #ede9e3;
    position: relative;
    transition: transform 0.2s ease;
}

.photo-cell:hover {
    transform: scale(1.03);
}

.photo-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-cell-video {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2.5rem;
    background: #3d3929;
    color: #e2c57f;
}

.photo-cell-badge {
    position: absolute;
    bottom: 0.375rem;
    right: 0.375rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 0.1875rem;
    line-height: 1;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.25rem;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 10;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

/* ===== SLIDESHOW / TV MODE ===== */
.ss {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    color: #fff;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}
.ss[hidden] { display: none; }

/* Two stacked layers that crossfade */
.ss-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
    cursor: pointer;
}
.ss-slide.is-active { opacity: 1; z-index: 1; }

/* Blurred copy of the photo fills the letterbox (portrait photos on a 16:9 screen) */
.ss-backdrop {
    position: absolute;
    inset: -6%;
    background-size: cover;
    background-position: center;
    filter: blur(48px) brightness(0.45) saturate(1.15);
    transform: scale(1.1);
}

.ss-slide img {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.55);
    transform-origin: center;
}
/* Slow "Ken Burns" zoom while a slide is on screen */
.ss-slide.is-zoom img { animation: ss-zoom var(--zoom-ms, 8000ms) ease-out forwards; }
@keyframes ss-zoom { from { transform: scale(1); } to { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) {
    .ss-slide { transition-duration: 0.3s; }
    .ss-slide.is-zoom img { animation: none; }
}

/* Title bar and controls: fade out when idle; cursor hides too */
.ss-ui {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.ss.ui-visible .ss-ui,
.ss.is-paused .ss-ui { opacity: 1; pointer-events: auto; }
.ss:not(.ui-visible):not(.is-paused) { cursor: none; }
.ss:not(.ui-visible):not(.is-paused) .ss-slide { cursor: none; }

.ss-top {
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(env(safe-area-inset-top, 0px) + 1.25rem) 4.5rem 2.5rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
}
.ss-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.25rem, 2.4vw, 2.5rem);
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ss-exit {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
    right: 1.25rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}
.ss-exit:hover { background: rgba(255, 255, 255, 0.15); }

.ss-controls {
    bottom: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2.5rem 1rem calc(env(safe-area-inset-bottom, 0px) + 1.25rem);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}
.ss-controls button {
    min-width: 3rem;
    height: 3rem;
    padding: 0 1rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 1.125rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.ss-controls button:hover { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.6); }
#btnFullscreen { font-size: 0.875rem; letter-spacing: 0.04em; }
.ss-progress {
    min-width: 4.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.75);
}

/* Sub-event caption, bottom left; stays visible (it's part of the show) */
.ss-caption {
    position: absolute;
    left: clamp(1rem, 3vw, 3rem);
    bottom: clamp(1.25rem, 4vh, 3rem);
    z-index: 2;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: clamp(1rem, 1.8vw, 1.75rem);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
    transition: opacity 0.5s;
}
.ss-caption:empty { display: none; }
.ss.ui-visible .ss-caption, .ss.is-paused .ss-caption { opacity: 0; }

/* Thin progress bar for the current slide */
.ss-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 4; background: rgba(255, 255, 255, 0.08); }
.ss-bar-fill { height: 100%; width: 0; background: #c9a96e; opacity: 0.85; }

/* Phones: smaller chrome */
@media (max-width: 640px) {
    .ss-top { padding-left: 3.75rem; padding-right: 3.75rem; }
    .ss-controls { gap: 0.5rem; }
    .ss-controls button { height: 2.75rem; min-width: 2.75rem; padding: 0 0.75rem; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .page-container {
        padding: 1.5rem 1rem;
    }

    .heading-lg {
        font-size: 2.25rem;
    }

    .card {
        padding: 1.5rem 1.25rem;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.375rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
    }
}
