.invitation-card {
    background: rgba(248, 245, 240, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 15px 50px rgba(122, 97, 83, 0.3);
    border: 2px solid var(--color-dorado);
}

.invitation-card h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--color-nogal);
    font-weight: 500;
}

.invitation-card p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: var(--color-nogal);
}

.couple-names {
    font-size: 2.5rem;
    font-family: "Playfair Display", serif;
    margin: 30px 0;
    color: var(--color-nogal);
    font-weight: 500;
}

.wedding-date {
    font-size: 1.4rem;
    margin: 25px 0;
    color: var(--color-nogal);
}

.btn-open-modal {
    background: linear-gradient(to right, var(--color-nogal) 0%, #6b4c3a 100%);
    color: var(--color-marfil);
    border: none;
    padding: 18px 35px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    box-shadow: 0 8px 25px rgba(122, 97, 83, 0.4);
}

.btn-open-modal:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(122, 97, 83, 0.5);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(122, 97, 83, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background: var(--color-marfil);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    background: linear-gradient(to right, var(--color-nogal) 0%, #6b4c3a 100%);
    padding: 28px 20px;
    text-align: center;
    color: var(--color-marfil);
    position: relative;
}

.modal-header h2 {
    font-weight: 500;
    font-size: 1.6rem;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.modal-header p {
    font-size: 0.95rem;
    opacity: 0.9;
    max-width: 280px;
    margin: 0 auto;
}

.modal-header::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--color-dorado);
    border-radius: 2px;
}

.modal-body {
    padding: 30px 20px;
    transition: opacity 0.5s ease;
}

.modal-body.saving {
    opacity: 0.6;
    pointer-events: none;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--color-nogal);
    font-size: 1rem;
    text-align: left;
}

.form-control {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid var(--color-dorado);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.7);
}

.form-control:focus {
    border-color: var(--color-nogal);
    outline: none;
    box-shadow: 0 0 0 3px rgba(122, 97, 83, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%237a6153' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    padding-right: 50px;
}

.guests-container {
    margin: 25px 0;
    /* font-family: var(--fuente-acento3); */
    font-family: "Nunito Sans", sans-serif;
}

.guest-item {
    display: flex;
    flex-wrap: wrap;
    padding: 18px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    border: 2px solid var(--color-dorado);
    transition: all 0.3s;
}

.guest-item:active {
    transform: scale(0.98);
}

.guest-item.selected {
    background: linear-gradient(
        to right,
        rgba(203, 185, 148, 0.2) 0%,
        rgba(255, 255, 255, 0.5) 100%
    );
    border-color: var(--color-nogal);
    box-shadow: 0 5px 15px rgba(122, 97, 83, 0.1);
}

.guest-checkbox-container {
    display: flex;
    align-items: flex-start;
    margin-right: 16px;
}

.guest-checkbox {
    transform: scale(1.4);
    accent-color: var(--color-nogal);
    margin-top: 4px;
}

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

.guest-name-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    /* bold */
    /* font-weight: 800; */
}

.guest-name {
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--color-nogal);
    margin-right: 10px;
    font-family: var(--fuente-acento3);
    /* font-family: "Nunito Sans", sans-serif; */
}

.guest-price {
    font-weight: 600;
    color: var(--color-nogal);
    font-size: 1.1rem;
    white-space: nowrap;
    font-family: var(--fuente-acento3);
}

.menu-selection {
    width: 100%;
    margin-top: 0;
    padding-top: 0;
    border-top: 1px dashed var(--color-dorado);
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    text-align: left;
}

.guest-item.selected .menu-selection {
    max-height: 150px;
    margin-top: 12px;
    padding-top: 12px;
}

.menu-selection label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-nogal);
}

.total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding: 20px;
    background: linear-gradient(
        to right,
        rgba(203, 185, 148, 0.2) 0%,
        rgba(255, 255, 255, 0.5) 100%
    );
    border-radius: 16px;
    font-size: 1.2rem;
    border: 2px solid var(--color-nogal);
}

.total-label {
    font-weight: 600;
    color: var(--color-nogal);
}

.total-amount {
    font-weight: 700;
    color: var(--color-nogal);
    font-size: 1.4rem;
}

.bank-info {
    /* background: linear-gradient(
        to right,
        rgba(203, 185, 148, 0.1) 0%,
        rgba(255, 255, 255, 0.3) 100%
    ); */
    border-radius: 16px;
    padding: 20px;
    margin: 25px 0;
    border: 2px dashed var(--color-nogal);
    font-family: var(--fuente-acento3);
    background-color: var(--color-beige);
    color: var(--color-marfil);
}

.bank-info h3 {
    text-align: center;
    margin-bottom: 18px;
    color: var(--color-nogal);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--fuente-acento3);
}

.bank-info h3 i {
    color: var(--color-nogal);
}

.bank-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    font-family: var(--fuente-acento3);
}

.bank-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-dorado);
    align-items: center;
    color: #3c3c3c;
}

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

.bank-detail-label {
    font-weight: 600;
    color: var(--color-nogal);
}

.bank-detail-value {
    font-weight: 500;
    /* color: var(--color-oliva); */
    color: #3c3c3c;
    text-align: right;
    word-break: break-all;
    text-align: center;
}

.copy-btn {
    background: var(--color-nogal);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #6b4c3a;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-cancel {
    background: transparent;
    color: var(--color-nogal);
    border: 2px solid var(--color-oliva);
    padding: 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background: rgba(168, 159, 145, 0.1);
}

.btn-submit {
    background: linear-gradient(to right, var(--color-nogal) 0%, #6b4c3a 100%);
    color: var(--color-marfil);
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    flex: 2;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(122, 97, 83, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit:active:not(:disabled) {
    transform: translateY(3px);
    box-shadow: 0 2px 10px rgba(122, 97, 83, 0.4);
}

.confirmation-message {
    text-align: center;
    padding: 25px;
    margin: 20px 0;
    background: rgba(168, 159, 145, 0.15);
    border-radius: 16px;
    border: 2px solid var(--color-oliva);
    color: var(--color-nogal);
    font-weight: 500;
    display: none;
    animation: fadeIn 0.8s ease-out;
}

.confirmation-message i {
    font-size: 3rem;
    color: #5a8c52;
    margin-bottom: 15px;
    display: block;
}

.confirmation-message h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-nogal);
}

.wedding-icon {
    text-align: center;
    margin-bottom: 15px;
    color: var(--color-dorado);
}

.wedding-icon i {
    font-size: 2.5rem;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--color-marfil);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.close-button:hover {
    transform: rotate(90deg);
    color: var(--color-dorado);
}

.saving-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 245, 240, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.saving-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.saving-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(203, 185, 148, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-nogal);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

.saving-text {
    font-size: 1.2rem;
    color: var(--color-nogal);
    font-weight: 600;
}

@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 1.4rem;
    }

    .guest-name {
        font-size: 1rem;
    }

    .guest-price {
        font-size: 1rem;
    }

    .total-amount {
        font-size: 1.2rem;
    }

    .btn-submit,
    .btn-cancel {
        padding: 16px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .bank-detail-item {
        flex-direction: column;
        gap: 5px;
    }

    .bank-detail-value {
        text-align: left;
    }

    .guest-checkbox {
        transform: scale(1.3);
    }

    .guest-name-price {
        flex-direction: row;
        align-items: center;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 150px;
        opacity: 1;
    }
}

.guest-item {
    animation: fadeIn 0.4s ease-out;
}

.guest-item:nth-child(1) {
    animation-delay: 0.1s;
}
.guest-item:nth-child(2) {
    animation-delay: 0.15s;
}
.guest-item:nth-child(3) {
    animation-delay: 0.2s;
}
.guest-item:nth-child(4) {
    animation-delay: 0.25s;
}

.copy-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-nogal);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.copy-notification.show {
    opacity: 1;
}

.menu-selection select.form-control {
    transition: none !important;
}

.menu-selection select.form-control:focus {
    transition: none !important;
    box-shadow: none !important;
}

.menu-selection select.form-control:active {
    transform: none !important;
}
