/* Contact Forms CRM - Estilos Frontend */

.cfcrm-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
    background: #fff;
    width: 100%;
}

/* Grupo de formularios: centrados con separación */
.cfcrm-forms-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
}

.cfcrm-forms-group > .cfcrm-form-container {
    margin: 0;
    flex: 0 1 600px;
}

@media (min-width: 980px) {
    .cfcrm-form-container {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1rem;
    }

    .cfcrm-forms-group > .cfcrm-form-container {
        margin-bottom: 0;
    }
}

.cfcrm-form-themed {
    overflow: hidden;
    border-radius: 8px;
}

.cfcrm-form-header {
    background: var(--cfcrm-header-bg, #fd6500);
    padding: 20px 20px 10px;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

.cfcrm-form-header-title {
    margin: 0 0 0px;
    padding-bottom: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--cfcrm-header-title-color, #ffffff);
}

.cfcrm-form-header-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--cfcrm-header-paragraph-color, #ffffff);
    font-weight: 500;
}

/* Cabecera interactiva (toggle) */
.cfcrm-form-container.cfcrm-header-toggle .cfcrm-form-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 44px;
    transition: filter 0.2s ease;
}

.cfcrm-form-container.cfcrm-header-toggle .cfcrm-form-header:hover,
.cfcrm-form-container.cfcrm-header-toggle .cfcrm-form-header:focus {
    filter: brightness(0.96);
    outline: none;
}

.cfcrm-form-container.cfcrm-header-toggle .cfcrm-form-header:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.cfcrm-form-header-indicator {
    position: absolute;
    right: 16px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-right: 2px solid var(--cfcrm-header-title-color, #ffffff);
    border-bottom: 2px solid var(--cfcrm-header-title-color, #ffffff);
    transform: rotate(45deg);
    transition: transform 0.25s ease;
}

.cfcrm-form-container.cfcrm-header-toggle:not(.cfcrm-form-collapsed) .cfcrm-form-header-indicator {
    transform: rotate(-135deg);
    margin-top: -2px;
}

.cfcrm-form-container.cfcrm-header-toggle.cfcrm-form-collapsed .cfcrm-form-header {
    border-radius: 8px;
}

.cfcrm-form-container.cfcrm-header-toggle.cfcrm-form-collapsed > .cfcrm-form-body {
    display: none;
}

.cfcrm-form-container.cfcrm-header-toggle .cfcrm-form {
    animation: none;
}

.cfcrm-form-container.cfcrm-header-toggle > .cfcrm-form-body.cfcrm-panel-opening {
    animation: cfcrmPanelFadeIn 0.4s ease-out;
}

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

.cfcrm-form-body {
    padding: 20px;
    text-align: left;
    border-left: 1px solid var(--cfcrm-border-color, #d9d9d9);
    border-right: 1px solid var(--cfcrm-border-color, #d9d9d9);
    border-bottom: 1px solid var(--cfcrm-border-color, #d9d9d9);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: #fff;
}

.cfcrm-form-themed:not(:has(.cfcrm-form-header)) .cfcrm-form-body {
    border-radius: 8px;
}

.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-conditional-group {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.cfcrm-conditional-group[hidden] {
    display: none !important;
}

.cfcrm-field {
    margin-bottom: 0;
}

.cfcrm-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--cfcrm-label-color, #003a70);
    font-size: 14px;
    line-height: 1.3;
    text-align: left;
}

.cfcrm-label-inner {
    display: inline-block;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--cfcrm-label-underline-color, #fd6500);
    text-align: left;
}

.cfcrm-required-mark {
    color: var(--cfcrm-required-mark-color, #fd6500);
}

.cfcrm-placeholder-wrapper {
    position: relative;
}

.cfcrm-placeholder-overlay {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 20px);
}

.cfcrm-ph-text {
    color: #003a70;
}

.cfcrm-ph-accent {
    color: var(--cfcrm-email-at-color, #fd6500);
}

.cfcrm-placeholder-wrapper.cfcrm-has-value .cfcrm-placeholder-overlay,
.cfcrm-placeholder-wrapper.cfcrm-is-focused .cfcrm-placeholder-overlay {
    display: none;
}

input.cfcrm-field-input::placeholder,
textarea.cfcrm-field-textarea::placeholder {
    color: #003a70;
    opacity: 1;
}

input.cfcrm-field-input::-webkit-input-placeholder,
textarea.cfcrm-field-textarea::-webkit-input-placeholder {
    color: #003a70;
    opacity: 1;
}

input.cfcrm-field-input::-moz-placeholder,
textarea.cfcrm-field-textarea::-moz-placeholder {
    color: #003a70;
    opacity: 1;
}
.textarea{
    resize: none !important;
	padding: 5px !important;
}
input.cfcrm-field-input,
textarea.cfcrm-field-textarea,
select.cfcrm-field-select {
    width: 100%;
    border-radius: 5px;
    font-size: 12px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    color: #003a70;
}

input.cfcrm-field-input,
textarea.cfcrm-field-textarea,
select.cfcrm-field-select {
    background-color: #f7f7f7 !important;
    border: none;
}

input.cfcrm-field-input {
    padding: 7px 10px !important;
}

select.cfcrm-field-select {
    padding: 7px 10px !important;
}

textarea.cfcrm-field-textarea {
    padding: 10px !important;
}
input.cfcrm-field-input:focus,
textarea.cfcrm-field-textarea:focus,
select.cfcrm-field-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cfcrm-textarea-wrapper {
    position: relative;
    display: block;
}

textarea.cfcrm-field-textarea {
    resize: vertical;
    display: block;
    line-height: 1.4;
    height: auto !important;
    min-height: calc(var(--cfcrm-textarea-rows, 4) * 1.4em + 20px) !important;
    max-height: none !important;
}

/* Grip fino: dos líneas diagonales (corta en esquina + larga hacia adentro) */
.cfcrm-form-themed .cfcrm-textarea-wrapper::after {
    content: '';
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 12px;
    height: 12px;
    pointer-events: none;
    z-index: 2;
    background-color: var(--cfcrm-accent-color, #fd6500);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cline x1='11' y1='3.5' x2='3.5' y2='11' stroke='%23000' stroke-width='1.25' stroke-linecap='round'/%3E%3Cline x1='11' y1='7.5' x2='7.5' y2='11' stroke='%23000' stroke-width='1.25' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cline x1='11' y1='3.5' x2='3.5' y2='11' stroke='%23000' stroke-width='1.25' stroke-linecap='round'/%3E%3Cline x1='11' y1='7.5' x2='7.5' y2='11' stroke='%23000' stroke-width='1.25' stroke-linecap='round'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* WebKit: zona de arrastre sin icono nativo */
.cfcrm-form-themed .cfcrm-field-textarea::-webkit-resizer {
    width: 16px;
    height: 16px;
    background: transparent;
    border: 0;
}

.cfcrm-field-options {
    display: grid;
    grid-template-columns: repeat(var(--cfcrm-options-per-row, 1), minmax(0, 1fr));
    gap: 2px 14px;
    align-items: start;
}

.cfcrm-otros-wrap {
    grid-column: 1 / -1;
    margin-top: 4px;
    margin-left: 0;
}

.cfcrm-otros-wrap[hidden] {
    display: none !important;
}

.cfcrm-otros-label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cfcrm-label-color, #003a70);
}

.cfcrm-otros-input {
    width: 100%;
    max-width: 420px;
}

.cfcrm-radio-option,
.cfcrm-checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    margin: 0;
    min-height: 28px;
}

.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);
}

.cfcrm-form-themed input[type="radio"],
.cfcrm-form-themed input[type="checkbox"]:not(.cfcrm-legal-input) {
    accent-color: var(--cfcrm-accent-color, #fd6500);
}

input[type="radio"], input[type="checkbox"] {
    accent-color: #003a70;
}

.cfcrm-form-themed .cfcrm-legal-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.cfcrm-form-themed .cfcrm-legal-text {
    flex: 1;
    line-height: 1.4;
    font-size: 12px;
}

.cfcrm-form-themed .cfcrm-legal-label {
    font-weight: 500;
    font-size: 12px;
    color: var(--cfcrm-label-color, #003a70);
}

.cfcrm-form-container.cfcrm-form-themed .cfcrm-legal-label a,
.cfcrm-form-container.cfcrm-form-themed .cfcrm-legal-label a:link,
.cfcrm-form-container.cfcrm-form-themed .cfcrm-legal-label a:visited,
.cfcrm-form-container.cfcrm-form-themed .cfcrm-legal-label a:hover,
.cfcrm-form-container.cfcrm-form-themed .cfcrm-legal-label a:focus,
.cfcrm-form-container.cfcrm-form-themed .cfcrm-legal-label a:active {
    color: var(--cfcrm-accent-color, #fd6500) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

.cfcrm-form-themed .cfcrm-legal-required-mark {
    color: var(--cfcrm-label-color, #003a70);
    font-weight: 500;
}

.cfcrm-form-themed .cfcrm-legal-input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 2px 0 0;
    padding: 0;
    border: 2px solid var(--cfcrm-checkbox-border-color, #fd6500);
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    box-sizing: border-box;
}

.cfcrm-form-themed .cfcrm-legal-input:checked {
    background-color: var(--cfcrm-checkbox-border-color, #fd6500);
    border-color: var(--cfcrm-checkbox-border-color, #fd6500);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 5l3.5 3.5L11 1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px 9px;
}

.cfcrm-form-themed .cfcrm-legal-input:focus {
    outline: 2px solid var(--cfcrm-checkbox-border-color, #fd6500);
    outline-offset: 1px;
}

span.cfcrm-legal-label {
    font-weight: 500;
}
.cfcrm-radio-label,
.cfcrm-checkbox-label {
    font-size: 14px;
    color: #555;
}
#cfcrm-legal-label {
    font-weight: 500;
    font-size: 12px;
    color: #003a70 !important;
}

#cfcrm-legal-label a{
    color: #fd6500 !important;
}

.cfcrm-field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.cfcrm-field.error .cfcrm-field-error {
    display: block;
}

.cfcrm-field.error input.cfcrm-field-input,
.cfcrm-field.error textarea.cfcrm-field-textarea,
.cfcrm-field.error select.cfcrm-field-select {
    border-color: #e74c3c;
}

.cfcrm-form-actions {
    text-align: left;
}

.cfcrm-form-themed .cfcrm-submit-button,
.cfcrm-submit-button {
    display: inline-block;
    width: auto;
    min-width: 0;
    max-width: none;
    background: var(--cfcrm-button-color, #fd6500);
    color: #fff;
    border: none;
    padding: 6px 14px !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-radius: 5px;
    cursor: pointer;
    transition: filter 0.2s ease, background-color 0.2s ease;
    position: relative;
    box-shadow: none;
}

.cfcrm-submit-button:hover {
    background: var(--cfcrm-button-color, #fd6500);
    filter: brightness(0.92);
}

.cfcrm-submit-button:active {
    filter: brightness(0.85);
}

.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: left;
}

.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-body {
        padding: 16px;
    }
    
    .cfcrm-form-fields {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    /* Misma regla para la rama condicional: 1 campo por fila en mobile */
    .cfcrm-conditional-group {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .cfcrm-form-fields > .cfcrm-field.cfcrm-col-1,
    .cfcrm-form-fields > .cfcrm-field.cfcrm-col-2,
    .cfcrm-form-fields > .cfcrm-field.cfcrm-col-3,
    .cfcrm-conditional-group > .cfcrm-field.cfcrm-col-1,
    .cfcrm-conditional-group > .cfcrm-field.cfcrm-col-2,
    .cfcrm-conditional-group > .cfcrm-field.cfcrm-col-3 {
        grid-column: 1 / -1 !important;
    }
    
    .cfcrm-form.two-columns .cfcrm-form-fields {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    input.cfcrm-field-input,
    textarea.cfcrm-field-textarea,
    select.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: left;
    margin: 20px 0;
}

/* Mejoras de accesibilidad */
input.cfcrm-field-input:focus,
textarea.cfcrm-field-textarea:focus,
select.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;
}
 */
 
 
 
 /* Oculta el select real sin eliminarlo del formulario */
select.cfcrm-field-select.cfcrm-select-hidden {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
}

/* Botón visible */
.cfcrm-select-ui {
    width: 100% !important;
    padding: 7px 30px 7px 10px !important;
    background-color: #f7f7f7 !important;
    color: #003a70 !important;
    border: none !important;
    border-radius: 5px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    text-align: left !important;
    font-size: 12px !important;
    position: relative !important;
    line-height: normal !important;
}

/* Flecha */
.cfcrm-select-ui::after {
    content: "" !important;
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    border-left: 5px solid transparent !important;
    border-right: 5px solid transparent !important;
    border-top: 6px solid #003a70 !important;
}

.cfcrm-select-ui:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0, 58, 112, 0.25) !important;
}

/* Menú flotante, se manda al body para evitar problemas de overflow */
.cfcrm-select-menu {
    position: fixed !important;
    display: none !important;
    background-color: #f7f7f7 !important;
    border-radius: 5px !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18) !important;
    z-index: 999999999 !important;
    max-height: 230px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

.cfcrm-select-menu.is-open {
    display: block !important;
}

.cfcrm-select-option {
    padding: 8px 10px !important;
    font-size: 12px !important;
    color: #003a70 !important;
    cursor: pointer !important;
    background-color: #f7f7f7 !important;
}

/* ESTE ES EL COLOR QUE QUERÍAS */
.cfcrm-select-option:hover,
.cfcrm-select-option.is-active {
    background-color: #4ca9ff50 !important;
    color: #003a70 !important;
}

.cfcrm-select-option.is-disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}