/* assets/css/form-styles.css */

/* Estilos para validaciones */
.form-control.valid {
    border-color: #28a745 !important;
    background-color: rgba(40, 167, 69, 0.05);
}

.form-control.invalid {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.05);
}

/* Estilos para captcha */
.captcha-group {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.captcha-text {
    flex: 1;
    background: white;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 3px;
    text-align: center;
    border-radius: 6px;
    color: #2c3e50;
    border: 2px solid #ddd;
}

.btn-refresh-captcha {
    background: #3ab09e;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.btn-refresh-captcha:hover {
    background: #2d8b7d;
    transform: rotate(180deg);
}

/* Estilos para el resultado */
.resultado-popup .swal2-popup {
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
}

.resultado-container {
    max-width: 100%;
}

.resultado-header {
    background: #28a745;
    color: white;
    padding: 20px;
    text-align: center;
}

.resultado-header h2 {
    margin: 0;
    font-size: 18px;
}

.resultado-body {
    padding: 20px;
}

.info-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table td {
    padding: 8px 5px;
    vertical-align: top;
}

.info-table td:first-child {
    width: 130px;
    font-weight: 600;
    color: #555;
}

.total-amount {
    font-size: 20px;
    font-weight: bold;
    color: #28a745;
}

.estado-sunat {
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    margin: 10px 0;
}

.estado-sunat.activo {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid #28a745;
}

.estado-sunat.anulado {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid #dc3545;
}

.acciones-section {
    text-align: center;
    margin-top: 25px;
}

.btn-nuevo {
    background: #3ab09e;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-nuevo:hover {
    background: #2d8b7d;
    transform: translateY(-2px);
}

/* Estilos para el formulario footer */
.form-footer {
    margin-top: 30px;
}

.disclaimer {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #1976d2;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Estilos para info-box */
.info-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid #3ab09e;
}

.info-box h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box ol {
    margin-left: 20px;
    color: #555;
}

.info-box li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Mejoras responsive */
@media (max-width: 768px) {
    .serie-numero-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .serie-input {
        max-width: 100%;
    }
    
    .separator {
        display: none;
    }
    
    .resultado-popup .swal2-popup {
        width: 95% !important;
        margin: 10px;
    }
}

/* Estados SUNAT */
.estado-sunat {
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
    font-weight: bold;
}

.estado-sunat.activo {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.estado-sunat.anulado {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.estado-sunat.observado {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.estado-sunat.nota-venta {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.estado-sunat.desconocido {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Colores para el header */
.resultado-header {
    padding: 20px;
    color: white;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

.total-amount {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1em;
}
