/* ========================================= */
/* MODAL REDESIGN - PROFISSIONAL & MODERNO */
/* ========================================= */

/* Variáveis CSS para Glass Morphism */
:root {
    --glass-surface: rgba(255, 255, 255, 0.85); /* Fundo branco translúcido para glass morphism */
    --glass-border: rgba(255, 255, 255, 0.3); /* Borda sutil para definição */
    --text-primary: #333;
    --text-secondary: #666;
}

/* Modal Redesign - Professional & Modern */
.modal-content-redesign {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(40px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 24px !important;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.25),
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
    max-width: 90vw !important;
    width: 680px !important;
    max-height: 95vh !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Header redesenhado */
.modal-header-redesign {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

.modal-header-redesign::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.modal-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.booking-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.modal-header-redesign h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-header-redesign .subtitle {
    margin: 4px 0 0 0;
    opacity: 0.8;
    font-size: 14px;
    font-weight: 400;
}

.modal-close-redesign {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.modal-close-redesign:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Body com scroll suave */
.modal-body-redesign {
    padding: 32px;
    max-height: 60vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Cards modernos */
.summary-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: relative;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.card-header i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 6px;
    font-size: 12px;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

/* Grid de informações */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item .label {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-item .value {
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
}

/* Select moderno */
.duration-selector-wrapper {
    position: relative;
}

.modern-select {
    width: 100%;
    padding: 16px 48px 16px 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: white;
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #718096;
}

.contract-preview-modern {
    margin-top: 16px;
    padding: 16px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.contract-info {
    margin: 0;
    color: #2d3748;
    line-height: 1.6;
}

/* Seção de preços destacada */
.pricing-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.price-breakdown {
    margin-bottom: 20px;
}

.total-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(102, 126, 234, 0.2);
}

.total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.total-label {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
}

.total-amount {
    font-size: 32px;
    font-weight: 800;
    color: #667eea;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.gst-notice, .recurring-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #718096;
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.gst-notice i, .recurring-notice i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Input de desconto moderno */
.discount-input-modern {
    margin-top: 16px;
}

.input-group-modern {
    display: flex;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group-modern:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.discount-input-field {
    flex: 1;
    padding: 16px;
    border: none;
    background: white;
    font-size: 16px;
    color: #2d3748;
    outline: none;
}

.discount-input-field::placeholder {
    color: #a0aec0;
}

.apply-discount-btn {
    padding: 16px 24px;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.apply-discount-btn:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateX(-2px);
}

.discount-status {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.discount-status.success {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.discount-status.error {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
    border: 1px solid rgba(245, 101, 101, 0.2);
}

/* Footer redesenhado */
.modal-footer-redesign {
    padding: 32px;
    background: rgba(249, 250, 251, 0.8);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0 0 24px 24px;
}

/* Checkbox customizado */
.terms-section-modern {
    margin-bottom: 24px;
}

.terms-checkbox-modern {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    line-height: 1.5;
}

.terms-checkbox-modern input[type="checkbox"] {
    display: none;
}

.checkmark-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.terms-checkbox-modern input:checked + .checkmark-custom {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.terms-checkbox-modern input:checked + .checkmark-custom::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.terms-text {
    color: #4a5568;
    font-size: 14px;
}

.terms-link-modern {
    background: none;
    border: none;
    color: #667eea;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.terms-link-modern:hover {
    color: #5a67d8;
}

/* Botão principal premium */
.confirm-button-modern {
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    text-transform: none;
    letter-spacing: 0.02em;
}

.confirm-button-modern:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

.confirm-button-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.button-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.confirm-button-modern:hover .button-shine {
    left: 100%;
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-content-redesign {
        width: 95vw !important;
        margin: 20px !important;
        border-radius: 20px !important;
    }
    
    .modal-header-redesign,
    .modal-body-redesign,
    .modal-footer-redesign {
        padding: 20px;
    }
    
    .modal-header-redesign {
        border-radius: 20px 20px 0 0;
    }
    
    .modal-footer-redesign {
        border-radius: 0 0 20px 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .total-amount {
        font-size: 28px;
    }
    
    .input-group-modern {
        flex-direction: column;
    }
    
    .apply-discount-btn {
        border-radius: 0 0 12px 12px;
        justify-content: center;
    }
    
    .booking-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .modal-header-redesign h2 {
        font-size: 20px;
    }
}

/* Animações de entrada */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-overlay:not(.hidden) .modal-content-redesign {
    animation: modalFadeIn 0.3s ease-out;
}

/* Modal de Termos específico */
.modal-terms {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    max-width: 600px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
}

.close-terms-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    transition: all 0.3s ease;
}

.close-terms-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.terms-content {
    margin-top: 16px;
    line-height: 1.6;
    color: #333;
}

.terms-content ul {
    padding-left: 20px;
}

.terms-content li {
    margin-bottom: 8px;
}
