@import url('https://fonts.googleapis.com/css2?family=Gotu&family=Sirivennela&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Gotu', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 200;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.invitation-container {
    width: 100%;
    max-width: 600px;
}

.login-card,
.invitation-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

h1 {
    font-family: 'Sirivennela', sans-serif;
    color: #2c3e50;
    font-size: 4.25rem;
    margin-bottom: -1rem;
    text-align: center;
    font-weight: 300;
    letter-spacing: 1px;
}

h2 {
    color: #34495e;
    font-size: 1.35rem;
    margin-bottom: 0;
    font-weight: 400;
}

    h2.welcome {
        margin-bottom: 0;
        font-weight: 400;
    }

h3 {
    color: #34495e;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

    h3.welcome {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        font-weight: 300;
    }

h5 {
    font-family: 'Sirivennela', sans-serif;
    font-size: 1.75rem;
    text-align: center;
    font-weight: normal;
    margin-bottom: 1.75rem;
}

.language-switcher {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.lang-btn {
    padding: 8px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #7f8c8d;
}

    .lang-btn:hover {
        border-color: #3498db;
        color: #3498db;
    }

    .lang-btn.active {
        background: #3498db;
        border-color: #3498db;
        color: white;
    }

.code-input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

    .code-input-section label {
        color: #7f8c8d;
        font-size: 0.95rem;
        text-align: center;
    }

.code-input {
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: border-color 0.3s ease;
    margin-top: -10px;
}

    .code-input:focus {
        outline: none;
        border-color: #3498db;
    }

.event-details,
.rsvp-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
}

.event-details {
    margin-top: 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
}

    .detail-item:last-child {
        border-bottom: none;
    }

    .detail-item strong {
        color: #7f8c8d;
        font-weight: 400;
    }

    .detail-item span {
        color: #2c3e50;
        text-align: right;
    }

.detail-value {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: right;
}

.icon-link {
    display: inline-block;
    width: 22px;
    height: 22px;
    color: #2c3e50;
    text-decoration: none;
    vertical-align: middle;
    padding: 6px;
    border-radius: 6px;
    line-height: 0;
    background: none;
    border: 0;
    appearance: none;
    cursor: pointer;
}

    .icon-link:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 2px;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.5);
    }

.map-link,
.info-link {
    background-color: currentColor;
}

.map-link {
    -webkit-mask: url("/images/icon-map.svg") no-repeat center / contain;
    mask: url("/images/icon-map.svg") no-repeat center / contain;
}

.info-link {
    background-color: currentColor;
    -webkit-mask: url("/images/icon-info.svg") no-repeat center / contain;
    mask: url("/images/icon-info.svg") no-repeat center / contain;
}

    .map-link:hover,
    .info-link:hover {
        color: #7f8c8d;
    }

.rsvp-buttons {
    display: flex;
    gap: 10px;
}

.rsvp-btn {
    flex: 1;
    padding: 5px 15px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Gotu', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: #7f8c8d;
}

    .rsvp-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

.yes-btn.active {
    background: #2ecc71;
    border-color: #2ecc71;
    color: white;
}

.no-btn.active {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        color: #7f8c8d;
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

    .form-input:focus {
        outline: none;
        border-color: #3498db;
    }

.btn {
    width: 100%;
    padding: 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Gotu', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
}

    .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .btn:active {
        transform: translateY(0);
        box-shadow: none;
    }

    .btn:hover,
    .add-to-calendar-btn:hover,
    .update-btn:hover {
        background: #2980b9;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }

.add-to-calendar-btn,
.update-btn {
    background: #95a5a6;
    margin-top: 15px;
}

    .add-to-calendar-btn:hover,
    .update-btn:hover {
        background: #7f8c8d;
    }

    .add-to-calendar-btn::before {
        content: "";
        width: 20px;
        height: 20px;
        display: inline-block;
        -webkit-mask: url("/images/icon-calendar-add.svg") no-repeat center / contain;
        mask: url("/images/icon-calendar-add.svg") no-repeat center / contain;
        background-color: currentColor;
        flex: 0 0 20px;
    }

.thank-you {
    text-align: center;
}

    .thank-you h2 {
        color: #2ecc71;
        margin-bottom: 5px;
    }

    .thank-you p {
        color: #7f8c8d;
        font-size: 1rem;
    }

.deadline-info {
    text-align: center;
    color: #7f8c8d;
    margin-top: 5px;
    font-size: 0.8rem;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    padding: 10px;
    background: #fadbd8;
    border-radius: 8px;
    font-size: 0.95rem;
}

.deadline-passed-message {
    text-align: center;
    padding: 15px;
    background: #fff3cd;
    border-radius: 12px;
    margin-top: 15px;
}

    .deadline-passed-message p {
        color: #856404;
        font-size: 1.1rem;
    }

.fade-in {
    animation: fadeIn 0.5s ease-in;
}


.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: grid;
    place-items: center;
    padding: 16px;
    outline: none;
}

.modal-dialog {
    background: #fff;
    color: #2c3e50;
    width: 100%;
    max-width: 520px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header,
.modal-footer {
    padding: 14px 16px;
    background: transparent;
}

.modal-body {
    padding: 14px 16px;
    background: transparent;
    font-size: 0.95rem;
}

    .modal-body p {
        margin-top: 1rem;
    }

        .modal-body p:first-child {
            margin-top: 0;
        }

        .modal-body p.title {
            font-weight: 600;
        }

.modal-header {
    border-bottom: 1px solid #ecf0f1;
}

.modal-footer {
    border-top: 1px solid #ecf0f1;
}

    .modal-footer .btn {
        background-color: #95a5a6;
    }

        .modal-footer .btn:hover {
            background: #7f8c8d;
        }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .modal-header h3 {
        margin: 0;
        font-size: 1.0rem;
        font-weight: 600;
        color: #34495e;
    }

.modal-close {
    font-size: 1.4rem;
    line-height: 1;
    background: none;
    border: 0;
    color: #7f8c8d;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
}

    .modal-close:hover {
        background: #f1f3f5;
    }

.modal-list {
    margin: 0 0 0 30px;
    color: #2c3e50;
}

.modal-link {
    margin-top: 12px;
}

    .modal-link a {
        color: #3498db;
        text-decoration: underline;
    }

.modal :focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .login-card,
    .invitation-card {
        padding: 25px;
    }

    h1 {
        font-size: 2.75rem;
        margin-bottom: -0.6rem
    }

    h2 {
        font-size: 1.1rem;
        font-weight: 500;
    }

    h5 {
        font-size: 1.55rem;
        margin-bottom: 1.0rem
    }

    h3.welcome {
        font-size: 0.8rem;
    }

    .detail-item {
        flex-direction: column;
        align-items: flex-start;
    }

        .detail-item span {
            text-align: left;
        }

    .detail-value {
        flex-direction: row-reverse;
        justify-content: space-between;
        gap: 0;
        width: 100%;
    }

        .detail-value:has(>:only-child) {
            justify-content: flex-end;
        }

    .btn {
        padding: 15px;
        font-size: 1rem;
        gap: 10px;
    }

    .rsvp-btn {
        padding: 5px 8px;
        font-size: 0.95rem;
    }

    .deadline-info {
        font-size: 0.7rem;
    }

    .modal-dialog {
        border-radius: 10px;
    }
}


:where(button, [role="button"], a[href], input, select, textarea):focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
}

:where(.login-card, h1, h2, h3, h4, h5, h6):focus,
:where(.login-card, h1, h2, h3, h4, h5, h6):focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.lang-btn:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}
