/* VR Planos - Assinatura Digital e Pagamento CSS */

/* === ASSINATURA DIGITAL === */

.contract-signature {
    background: #f8f9fa;
}

.contract-viewer {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.contract-header h3 {
    color: #0052dc;
    font-weight: 600;
}

.contract-controls .btn {
    margin-right: 0.5rem;
}

.pdf-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.signature-panel {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 120px;
}

.signature-header .fa-file-signature {
    color: #0052dc;
}

.signer-info .info-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem;
    border-left: 4px solid #0052dc;
}

.terms-acceptance {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.terms-acceptance .form-check {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.terms-acceptance .form-check:hover {
    border-color: #0052dc;
    box-shadow: 0 2px 10px rgba(0, 82, 220, 0.1);
}

.signature-area h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.signature-container {
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.signature-pad {
    display: block;
    border: none;
    cursor: crosshair;
    background: #ffffff;
}

.signature-controls {
    display: flex;
    gap: 1rem;
}

.signature-controls .btn {
    flex: 1;
}

.signature-status .alert {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

/* === PAGAMENTO === */

.payment-section {
    background: #f8f9fa;
}

.payment-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.signature-success .alert {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

.order-summary h4,
.payment-methods h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #0052dc;
    padding-bottom: 0.5rem;
}

.summary-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
}

.operadora-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 5px;
}

.beneficiaries-list ul li {
    border-bottom: 1px solid #dee2e6;
}

.beneficiaries-list ul li:last-child {
    border-bottom: none;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-option {
    position: relative;
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-label {
    display: block;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.payment-label:hover {
    border-color: #0052dc;
    box-shadow: 0 5px 15px rgba(0, 82, 220, 0.1);
}

.payment-option input[type="radio"]:checked + .payment-label {
    border-color: #0052dc;
    background: rgba(0, 82, 220, 0.05);
    box-shadow: 0 5px 15px rgba(0, 82, 220, 0.2);
}

.payment-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.payment-icon {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #0052dc;
    flex-shrink: 0;
}

.payment-option input[type="radio"]:checked + .payment-label .payment-icon {
    background: #0052dc;
    color: white;
}

.payment-info h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.payment-detail {
    display: none;
    margin-top: 1rem;
}

.payment-detail.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.payment-summary {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 120px;
}

.summary-header {
    background: #0052dc;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.summary-header h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.summary-body {
    padding: 2rem;
}

.price-breakdown {
    margin-bottom: 2rem;
}

.price-item {
    display: flex;
    justify-content: between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.price-item.discount {
    color: #28a745;
    font-weight: 600;
}

.price-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: bold;
    color: #0052dc;
    padding: 1rem 0;
}

.next-payments {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.next-payments h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.payment-action .btn {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem;
}

.security-info {
    margin-top: 1rem;
}

.additional-info {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.additional-info h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 1rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-list li:last-child {
    border-bottom: none;
}

/* Modal customizations */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header.bg-success {
    border-radius: 15px 15px 0 0;
}

.boleto-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.boleto-actions .btn {
    font-weight: 600;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.payment-container,
.payment-summary,
.additional-info {
    animation: fadeInUp 0.6s ease-out;
}

/* Estados dos botões */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-success {
    background: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background: #1e7e34;
    border-color: #1c7430;
}

/* CSS para documentos reprovados */
.timeline-item.rejected .timeline-icon {
    background: #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.rejection-details {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.rejection-details ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.rejection-details li {
    color: #856404;
    margin-bottom: 0.5rem;
}

.rejected-doc {
    border-color: #dc3545 !important;
    background: #f8d7da !important;
}

.rejected-doc label {
    color: #721c24 !important;
}

.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* Responsividade */
@media (max-width: 768px) {
    .contract-viewer,
    .signature-panel,
    .payment-container,
    .payment-summary {
        padding: 1rem;
    }
    
    .signature-panel {
        position: static;
        margin-top: 2rem;
    }
    
    .payment-summary {
        position: static;
        margin-top: 2rem;
    }
    
    .payment-content {
        flex-direction: column;
        text-align: center;
    }
    
    .payment-icon {
        margin: 0 auto;
    }
    
    .signature-controls {
        flex-direction: column;
    }
    
    .boleto-actions .row {
        margin: 0;
    }
    
    .boleto-actions .col-md-6 {
        padding: 0.25rem;
    }
}

/* Melhorias para telas pequenas */
@media (max-width: 576px) {
    .pdf-container iframe {
        height: 400px;
    }
    
    .signature-pad {
        width: 100% !important;
        height: 120px !important;
    }
    
    .price-item {
        font-size: 0.9rem;
    }
    
    .price-total {
        font-size: 1.1rem;
    }
}
