/* payment-system.css */

.payment-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.payment-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.price-display {
    text-align: center;
    margin: 20px 0;
    font-size: 1.5em;
    font-weight: bold;
    color: #4a87ee;
}

.discount-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.discount-section input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.discount-section button {
    padding: 10px 20px;
    background-color: #4a87ee;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.discount-section button:hover {
    background-color: #3a77de;
}

.discount-message {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.discount-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.discount-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.payment-methods {
    margin-bottom: 20px;
}

.payment-method-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.payment-method-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #4a87ee;
    background: white;
    color: #4a87ee;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.payment-method-btn.active {
    background: #4a87ee;
    color: white;
}

.payment-method-btn i {
    font-size: 18px;
}

.payment-method-content {
    display: none;
}

.payment-method-content.active {
    display: block;
}

#card-payment-form {
    margin-top: 20px;
}

#card-element {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

#card-errors {
    color: #dc3545;
    margin-top: 10px;
    font-size: 14px;
}

#card-button {
    width: 100%;
    padding: 12px;
    background: #4a87ee;
    color: white;
    border: none;
    border-radius: 6px;
    margin-top: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#card-button:hover {
    background: #3a77de;
}

.cancel-payment {
    width: 100%;
    padding: 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    margin-top: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cancel-payment:hover {
    background: #c82333;
}

/* Responsive styles */
@media (max-width: 480px) {
    .payment-content {
        padding: 20px;
        width: 95%;
    }

    .payment-method-selector {
        flex-direction: column;
    }

    .payment-method-btn {
        width: 100%;
    }

    .discount-section {
        flex-direction: column;
    }

    .discount-section button {
        width: 100%;
    }
}

/* Loading indicator */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.discount-message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
}

.discount-message.loading {
    background-color: #e9ecef;
    color: #495057;
}

.discount-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.discount-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.payment-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.payment-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.payment-content h2 {
    margin: 0 0 1.5rem;
    text-align: center;
    color: #333;
}

.price-display {
    text-align: center;
    font-size: 1.25rem;
    color: #4a87ee;
    margin-bottom: 1.5rem;
}

.discount-section {
    margin: 1rem 0;
    display: flex;
    gap: 0.5rem;
}

.discount-section input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.discount-section button {
    padding: 0.75rem 1.5rem;
    background: #4a87ee;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.discount-section button:hover {
    background: #357abd;
}

.payment-divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.payment-divider::before,
.payment-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background-color: #ddd;
}

.payment-divider::before {
    left: 0;
}

.payment-divider::after {
    right: 0;
}

.payment-divider span {
    background: white;
    padding: 0 10px;
    color: #666;
    font-size: 0.875rem;
}

#paypal-button-container {
    margin: 1.5rem 0;
}

#card-payment-container {
    margin-top: 1.5rem;
}

.stripe-button {
    width: 100%;
    padding: 0.75rem;
    background: #5469d4;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
}

.stripe-button:hover {
    background: #4255bd;
}

.cancel-payment {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cancel-payment:hover {
    background: #c82333;
}

.discount-message {
    margin: 0.625rem 0;
    padding: 0.75rem;
    border-radius: 4px;
}

.discount-message.success {
    background: #d4edda;
    color: #155724;
}

.discount-message.error {
    background: #f8d7da;
    color: #721c24;
}
/* In payment-system.css */
.apple-pay-button {
    width: 100%;
    padding: 0.75rem;
    background: #000;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    transition: background-color 0.3s ease;
}

.apple-pay-button:hover {
    background: #1a1a1a;
}

.stripe-button {
    display: flex !important; /* Forza la visualizzazione */
    width: 100%;
    padding: 0.75rem;
    background: #5469d4;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
    transition: background-color 0.3s ease;
}

.stripe-button:hover {
    background: #4255bd;
}

#card-payment-form {
    margin-top: 1rem;
}
.payment-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Valore alto per essere sopra altri elementi */
}

/* Nascondi elementi non necessari dell'interfaccia PayPal */
.paypal-button-card {
    display: none !important;
}

.paypal-button-tagline {
    display: none !important;
}

.stripe-button {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #5469d4;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.stripe-button:hover {
    background: #4255bd;
}

#card-element {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    margin-bottom: 16px;
}

#card-errors {
    color: #dc3545;
    margin-bottom: 16px;
    font-size: 14px;
}

.stripe-submit-button {
    width: 100%;
    padding: 12px;
    background: #5469d4;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: background-color 0.3s ease;
}

.stripe-submit-button:hover {
    background: #4255bd;
}

#card-payment-container {
    margin-top: 16px;
}