.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 25px 20px;
    max-width: 400px !important; /* Forzamos un valor más estrecho con !important */
    width: 85%;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
}

.close-btn:hover {
    color: #333;
}

.amount-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.amount-option {
    padding: 10px 15px;
    border: 2px solid #ddd;
    background: #f9f9f9;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    min-width: 60px;
}

.amount-option.selected {
    background: #f5a623;
    color: white;
    border-color: #f5a623;
}

.custom-amount-input {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
}

#payment-form {
    margin-top: 30px;
}

#payment-element {
    margin-bottom: 24px;
}

.payment-button {
    background: #f5a623;
    color: white;
    border: none;
    padding: 12px 16px;
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.payment-button:hover {
    background: #e67e22;
}

.payment-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#payment-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
}

.hidden {
    display: none;
}


@media (max-width: 480px) {
    .modal-content {
        margin: 10% 5%;
        max-width: 100% !important;
        padding: 20px 15px;
    }

    .amount-options {
        flex-direction: column;
        gap: 10px;
    }

    .amount-option {
        flex: none;
        width: 100%;
        text-align: center;
    }

    .payment-button {
        font-size: 15px;
        padding: 10px 14px;
    }

    .custom-amount-input {
        font-size: 14px;
        padding: 8px;
    }

    .close-btn {
        top: 10px;
        right: 10px;
        font-size: 22px;
    }
}