/**
 * File: /booking/css/booking-payment.css
 * Stili per il componente pagamento nel booking engine
 */

/* Container principale */
.deposit-payment-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Riepilogo prenotazione */
.booking-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.booking-summary h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.highlight {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    margin: 10px -15px;
    border-radius: 8px;
    border: none;
}

.summary-row span {
    font-size: 16px;
}

.summary-row strong {
    font-size: 20px;
    font-weight: 600;
}

.summary-row .deposit-amount {
    font-size: 28px;
    color: #ffd700;
}

/* Sezione selezione pagamento */
.payment-selection {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.payment-selection h3 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.payment-selection .info-text {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 14px;
}

/* Grid metodi di pagamento */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.payment-method-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.payment-method-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.2);
}

.payment-method-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.payment-method-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.method-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.method-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

/* Selezione Gateway */
.gateway-selection {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.gateway-selection h4 {
    font-size: 18px;
    color: #495057;
    margin-bottom: 20px;
}

#gateways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gateway-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gateway-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.gateway-card.selected {
    border-color: #007bff;
    background: #f0f8ff;
}

.gateway-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.gateway-logo {
    margin-bottom: 15px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gateway-logo img {
    max-height: 40px;
    max-width: 100%;
}

.gateway-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.gateway-desc {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

/* Azioni pagamento */
.payment-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back {
    background: #e9ecef;
    color: #495057;
}

.btn-back:hover {
    background: #dee2e6;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5568d3 0%, #65408b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

/* Notice sicurezza */
.security-notice {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.security-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.security-icons span {
    font-size: 14px;
    color: #28a745;
    font-weight: 500;
}

.security-notice p {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
}

/* Pagamento non richiesto */
.payment-not-required {
    max-width: 600px;
    margin: 0 auto;
}

.info-box {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-box h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.info-box p {
    color: #7f8c8d;
    font-size: 16px;
    margin-bottom: 25px;
}

.total-amount {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-amount span {
    font-size: 16px;
    color: #495057;
}

.total-amount strong {
    font-size: 28px;
    color: #28a745;
}

/* Loading overlay */
#payment-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.loading-content p {
    font-size: 14px;
    color: #7f8c8d;
}

/* Responsive */
@media (max-width: 768px) {
    .deposit-payment-section {
        padding: 15px;
    }

    .booking-summary,
    .payment-selection {
        padding: 20px;
    }

    .payment-methods-grid,
    #gateways-grid {
        grid-template-columns: 1fr;
    }

    .payment-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .security-icons {
        flex-direction: column;
        gap: 10px;
    }

    .summary-row strong {
        font-size: 18px;
    }

    .summary-row .deposit-amount {
        font-size: 24px;
    }
}