/**
 * Solicitudes Corporativas Form Styles
 * Responsive design for desktop and mobile
 */

/* Importar fuente Nunito Sans */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700;800&display=swap');

/* Container */
.solicitudes-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Nunito Sans', sans-serif;
}

/* Form Title */
.form-title {
    font-size: 20px;
    font-weight: 800;
    color: #00239C;
    margin-bottom: 30px;
    text-align: left;
    font-family: 'Nunito Sans', sans-serif;
}

/* Messages */
.solicitudes-form-messages {
    margin-bottom: 20px;
}

.solicitudes-alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    animation: slideIn 0.3s ease;
    font-family: 'Nunito Sans', sans-serif;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.solicitudes-alert-icon {
    font-size: 20px;
}

/* Form */
.solicitudes-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-of-type {
    margin-bottom: 0;
}

/* Full width column */
.form-col.full-width {
    grid-column: 1 / -1;
}

/* Labels */
.solicitudes-form label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    font-family: 'Nunito Sans', sans-serif;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 12px 15px !important;
    font-size: 14px;
    border: 1px solid #d0d5dd;
    border-radius: 4px !important;
    background-color: #f9fafb;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: 'Nunito Sans', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #0066cc;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-control.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Select */
select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Textarea */
.textarea-control {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

/* Phone Group */
.phone-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.area-input {
    width: 70px;
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #d0d5dd;
    border-radius: 5px;
    background-color: #e9ecef;
    color: #495057;
    cursor: not-allowed;
    font-family: 'Nunito Sans', sans-serif;
}

.phone-input {
    flex: 1;
}

/* Submit Button */
.btn-submit {
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #0066cc;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    font-family: 'Nunito Sans', sans-serif;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.text-center {
    text-align: center;
}

/* Error state */
.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Success Message After Submit */
.solicitudes-success-message {
    text-align: center;
    padding: 40px 20px;
}

.solicitudes-success-message h3 {
    color: #28a745;
    font-size: 28px;
    margin-bottom: 15px;
}

.solicitudes-success-message p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* Loading State */
.solicitudes-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error Display */
.solicitudes-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

/* Responsive Design - Tablet */
@media (max-width: 768px) {
    .solicitudes-form-container {
        padding: 15px;
    }
    
    .solicitudes-form {
        padding: 25px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-col.full-width {
        grid-column: 1;
    }
    
    .btn-submit {
        width: 100%;
        min-width: unset;
    }
}

/* Modal de Éxito */
.solicitudes-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.solicitudes-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.solicitudes-modal {
    background: #ffffff;
    border-radius: 12px;
    padding: 60px 40px 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease;
    text-align: center;
    font-family: 'Nunito Sans', sans-serif;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.solicitudes-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.solicitudes-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.solicitudes-modal-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #00d4aa 0%, #00c6ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.solicitudes-modal-icon svg {
    width: 50px;
    height: 50px;
    stroke: #ffffff;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.solicitudes-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

.solicitudes-modal-message {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Responsive modal */
@media (max-width: 768px) {
    .solicitudes-modal {
        padding: 50px 30px 30px;
        width: 95%;
    }
    
    .solicitudes-modal-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 25px;
    }
    
    .solicitudes-modal-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .solicitudes-modal-title {
        font-size: 24px;
    }
    
    .solicitudes-modal-message {
        font-size: 15px;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 480px) {
    .solicitudes-form-container {
        padding: 10px;
    }
    
    .solicitudes-form {
        padding: 20px 15px;
        border-radius: 5px;
    }
    
    .form-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .phone-group {
        gap: 8px;
    }
    
    .area-input {
        width: 65px;
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .btn-submit {
        padding: 12px 30px;
        font-size: 15px;
    }
    
    .solicitudes-alert {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 2px;
    }
    
    .btn-submit {
        border: 2px solid currentColor;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .solicitudes-form {
        background: #2d2d2d;
        color: #f0f0f0;
    }

    .form-title {
        color: #e0e0e0;
    }
    
    .solicitudes-form label {
        color: #e0e0e0;
    }
    
    .form-control {
        background-color: #3a3a3a;
        border-color: #555 !important;
        color: #f0f0f0 !important;
    }
    
    .form-control:focus {
        background-color: #404040;
        border-color: #4d94ff;
    }
    
    .area-input {
        background-color: #4a4a4a;
        border-color: #555;
        color: #e0e0e0 !important;
    }
}

/* Focus Visible for Accessibility */
.form-control:focus-visible,
.btn-submit:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .btn-submit {
        display: none;
    }
    
    .solicitudes-form {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
