/* Contact Forms CRM - Estilos Frontend */

.cfcrm-form-container {
    max-width: 600px;
    margin: 0;
    padding: 0px;
    background: #fff;
}

.cfcrm-form {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cfcrm-form-fields {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.cfcrm-field {
    margin-bottom: 0;
}

.cfcrm-field-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
    color: #003a70;
    font-size: 16px;
	line-height: 19px;
}

.cfcrm-required-mark {
    color: #e74c3c;
    margin-left: 2px;
}
.textarea{
    resize: none !important;
	padding: 5px !important;
}
.cfcrm-field-input,
.cfcrm-field-textarea,
.cfcrm-field-select {
    width: 100%;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
	color: #003a70;
}
input[type="text"], input[type="email"], input[type="number"], input[type="tel"]{
    padding: 12px 5px !important;
}
.cfcrm-field-select{
    padding: 0;
}
select {
    padding: 11px 0 !important;
}
.cfcrm-field-input:focus,
.cfcrm-field-textarea:focus,
.cfcrm-field-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cfcrm-field-textarea {
    resize: vertical;
    min-height: 100px;
}

.cfcrm-field-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cfcrm-radio-option,
.cfcrm-checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.cfcrm-radio-option:hover,
.cfcrm-checkbox-option:hover {
    background-color: #f8f9fa;
}

.cfcrm-radio-option input[type="radio"],
.cfcrm-checkbox-option input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

input[type="radio"], input[type="checkbox"] {
	accent-color: #003a70;
}

span.cfcrm-legal-label {
    font-weight: 500;
}
.cfcrm-radio-label,
.cfcrm-checkbox-label {
    font-size: 14px;
    color: #555;
}

.cfcrm-field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.cfcrm-field.error .cfcrm-field-error {
    display: block;
}

.cfcrm-field.error .cfcrm-field-input,
.cfcrm-field.error .cfcrm-field-textarea,
.cfcrm-field.error .cfcrm-field-select {
    border-color: #e74c3c;
}

.cfcrm-form-actions {
    text-align: left;
}

.cfcrm-submit-button {
    background: #fd6500;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.cfcrm-submit-button:hover {
    background: #fd6500;
    transform: translateY(-2px);
}

.cfcrm-submit-button:active {
    transform: translateY(0);
}

.cfcrm-submit-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cfcrm-button-loading {
    display: none;
}

.cfcrm-submit-button.loading .cfcrm-button-text {
    display: none;
}

.cfcrm-submit-button.loading .cfcrm-button-loading {
    display: inline;
}

.cfcrm-form-messages {
    margin-top: 20px;
    text-align: center;
}

.cfcrm-success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    font-weight: 500;
}

.cfcrm-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    font-weight: 500;
}

/* Formulario de dos columnas */
.cfcrm-form.two-columns .cfcrm-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cfcrm-form.two-columns .cfcrm-field.full-width {
    grid-column: 1 / -1;
}

/* Sistema de columnas */
/* 1 columna = 100% (span 6) */
.cfcrm-field.cfcrm-col-1 {
    grid-column: span 6;
}

/* 2 columnas = 50% cada una (span 3) */
.cfcrm-field.cfcrm-col-2 {
    grid-column: span 3;
}

/* 3 columnas = 33.33% cada una (span 2) */
.cfcrm-field.cfcrm-col-3 {
    grid-column: span 2;
}

/* Responsive */
@media (max-width: 768px) {
    .cfcrm-form-container {
        padding: 0;
        margin: 0;
    }
    
    .cfcrm-form-fields {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .cfcrm-field.cfcrm-col-1,
    .cfcrm-field.cfcrm-col-2,
    .cfcrm-field.cfcrm-col-3 {
        grid-column: span 1 !important;
    }
    
    .cfcrm-form.two-columns .cfcrm-form-fields {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cfcrm-field-input,
    .cfcrm-field-textarea,
    .cfcrm-field-select {
        font-size: 16px; /* Evita zoom en iOS */
    }
}

/* Animaciones */
.cfcrm-form {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cfcrm-field {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Estados de carga */
.cfcrm-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.cfcrm-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* reCAPTCHA */
.cfcrm-field-captcha {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Mejoras de accesibilidad */
.cfcrm-field-input:focus,
.cfcrm-field-textarea:focus,
.cfcrm-field-select:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.cfcrm-submit-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Estilos para campos requeridos 
.cfcrm-field.cfcrm-required .cfcrm-field-label::after {
    content: ' *';
    color: #e74c3c;
}
 */