﻿body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #f8f6f2;
    color: #333;
}

.main-layout {
    display: flex;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
}

.hero {
    text-align: center;
    padding: 100px 20px 60px 20px;
    background-color: #ffffff;
}

    .hero h1 {
        font-size: 3.5rem;
        font-weight: 300;
        letter-spacing: 3px;
        margin: 0;
    }

.date {
    margin-top: 20px;
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: #777;
}

.section {
    text-align: center;
    padding: 60px 20px;
}

    .section h2 {
        font-weight: 400;
        font-size: 2rem;
        margin-bottom: 10px;
    }

.time {
    font-style: italic;
    color: #666;
}

.btn-map {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    text-decoration: none;
    border: 1px solid #333;
    border-radius: 30px;
    color: #333;
    transition: all 0.3s ease;
}

    .btn-map:hover {
        background-color: #333;
        color: #fff;
    }


.guest-card {
    border: 1px solid #ddd;
    padding: 20px;
    margin: 20px auto;
    max-width: 500px;
    border-radius: 12px;
    background-color: #fff;
}

.food-box {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.success {
    color: green;
    margin-top: 20px;
}

.radio-group {
    margin: 10px 0;
}

    .radio-group label {
        margin-right: 15px;
    }

.input-field {
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.validation-message {
    color: red;
}

.welcome {
    margin-top: 30px;
    font-size: 1.2rem;
    color: #666;
}

.rsvp-container {
    max-width: 700px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 0 auto; /* centra il contenitore */
}

.guest-card {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #fff;
}

.radio-group label {
    margin-right: 15px;
}

.btn-map {
    display: block;
    margin: 20px auto 0 auto;
}

.admin-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
}

.family-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.guest-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

    .guest-table th,
    .guest-table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }

    .guest-table th {
        background-color: #f2f2f2;
    }

.family-header {
    display: flex;
    gap: 10px;
    align-items: center;
}

.guest-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

    .guest-row select {
        padding: 6px;
        border-radius: 6px;
    }

.gallery-title {
    text-align: center;
    margin-top: 20px;
}

.gallery-actions {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.upload-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    color: white;
    font-size: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

    .gallery-item.selected {
        outline: 4px solid #007bff;
    }

        .gallery-item.selected::after {
            content: "✔";
            position: absolute;
            top: 5px;
            right: 5px;
            background: white;
            border-radius: 50%;
            padding: 3px 6px;
        }

    .gallery-item img,
    .gallery-item video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* 🔥 blocca interazioni sotto */
    pointer-events: all;
    backdrop-filter: blur(3px);
}

.lightbox-inner {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
}

/* 🔥 blocca scroll pagina sotto */
body.lightbox-open {
    overflow: hidden;
}

.download-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: black;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    z-index: 1000;
    padding: 0 20px;
}

.content {
    margin-top: 60px; /* stessa altezza della topbar */
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px;
}

.nav-item {
    margin-right: 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

    .nav-item:last-child {
        margin-right: 0;
    }

    .nav-item.active {
        border-bottom: 2px solid #333;
    }

.toast-success {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    opacity: 0.95;
}

.selection-bar {
    position: sticky;
    top: 0;
    background: white;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    z-index: 10;
}

.gallery-item {
    position: relative;
}

.select-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 18px;
    height: 18px;
}

.nav-left,
.nav-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    background: rgba(255,255,255,0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.nav-left {
    left: 20px;
}

.nav-right {
    right: 20px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
}

.btn-outline-primary {
    border-radius: 25px;
    padding: 10px 20px;
}

.calendar-dropdown {
    position: relative;
    display: inline-block;
}

.calendar-menu {
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 10px;
    z-index: 1000;
}

    .calendar-menu button {
        display: block;
        width: 100%;
        padding: 10px;
        border: none;
        background: none;
        text-align: left;
        border-radius: 8px;
    }

        .calendar-menu button:hover {
            background: #f2f2f2;
        }

.gift-container {
    max-width: 700px;
    margin: 60px auto;
    padding: 20px;
    text-align: center;
}

    .gift-container h1 {
        margin-bottom: 30px;
        font-weight: 300;
    }

.gift-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.iban-box {
    margin: 40px auto;
    padding: 30px 20px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.iban-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.iban-value {
    font-size: 1.3rem;
    font-weight: 600;
    word-break: break-all;
    margin-bottom: 30px;
}

.copy-btn {
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    background: #333;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

    .copy-btn:hover {
        opacity: 0.9;
    }

.closing {
    margin-top: 40px;
}

.gift-signatures {
    margin-top: 30px;
    font-size: 1.2rem;
    font-style: italic;
}

.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 22px;
    border-radius: 30px;
    z-index: 9999;
    animation: fadeInOut 2.5s ease;
}

@keyframes fadeInOut {

    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    10% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}