/**
 * Estilos del formulario de contacto (Frontend)
 */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400&display=swap');

.tdc-contact-form-wrapper {
    max-width: 600px;
    margin: 50px auto;
    padding: 50px;
    background: #fff;
    border-radius: 0px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Raleway', sans-serif;
}

.tdc-cf-title {
    margin: 0 0 25px;
    font-size: 28px;
    color: #333;
    text-align: center;
}

.tdc-contact-form {
    width: 100%;
}

.tdc-cf-field {
    margin-bottom: 20px;
}

.tdc-cf-field.tdc-cf-submit-wrapper {
    display: flex;
    justify-content: flex-end;
}

.tdc-cf-row {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
}

.tdc-cf-field-half {
    flex: 1;
    margin-bottom: 0;
}

.tdc-cf-field label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    padding: 0px 20px 0px 2px;
    font-size: 16px;
}

.tdc-cf-field .required {
    color: #e74c3c;
}

.tdc-cf-field input[type="text"],
.tdc-cf-field input[type="email"],
.tdc-cf-field input[type="tel"],
.tdc-cf-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #000;
    border-radius: 0;
    font-size: 15px;
    transition: border-color 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.tdc-cf-field input:focus,
.tdc-cf-field textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.tdc-cf-field input:invalid:not(:focus):not(:placeholder-shown),
.tdc-cf-field textarea:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e74c3c;
}

.tdc-cf-field input.error,
.tdc-cf-field textarea.error {
    border-color: #e74c3c !important;
}

.tdc-cf-field textarea {
    resize: vertical;
    min-height: 120px;
}

.tdc-cf-submit {
    width: 150px;
    height: 35px;
    background: #000000;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.tdc-cf-submit:hover {
    background: #DEDEDE;
    color: #000000;
    border: #000000 1px solid;
    border-radius: 0;
}

.tdc-cf-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.tdc-cf-submit.loading {
    position: relative;
    color: transparent;
}

.tdc-cf-submit.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: tdc-cf-spinner 0.6s linear infinite;
}

@keyframes tdc-cf-spinner {
    to {
        transform: rotate(360deg);
    }
}

.tdc-cf-response {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: none;
}

.tdc-cf-response.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.tdc-cf-response.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

.tdc-cf-recaptcha-notice {
    margin-top: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-left: 3px solid #3498db;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.tdc-cf-recaptcha-notice a {
    color: #3498db;
    text-decoration: none;
}

.tdc-cf-recaptcha-notice a:hover {
    text-decoration: underline;
}

/* Layout para Consultas Técnicas (más compacto) */
.tdc-cf-technical .tdc-contact-form-technical {
    max-width: 100%;
}

.tdc-cf-technical .tdc-cf-grid-row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.tdc-cf-technical .tdc-cf-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.tdc-cf-technical .tdc-cf-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.tdc-cf-technical .tdc-cf-field {
    margin-bottom: 0;
}

.tdc-cf-technical .tdc-cf-field label {
    font-size: 15px;
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 700;
    display: block;
    text-align: center;
}

.tdc-cf-technical .tdc-cf-field input,
.tdc-cf-technical .tdc-cf-field textarea {
    padding: 12px 15px;
    font-size: 15px;
    height: auto;
    border: none;
    border-bottom: 1px solid #000;
    border-radius: 0;
    background: transparent;
}

.tdc-cf-technical .tdc-cf-field input:focus,
.tdc-cf-technical .tdc-cf-field textarea:focus {
    border-bottom: 2px solid #000;
    box-shadow: none;
}

.tdc-cf-technical .tdc-cf-field textarea {
    min-height: 60px;
    resize: none;
    border: none;
    border-bottom: 1px solid #000;
    border-radius: 0;
    padding: 12px 15px;
}

.tdc-cf-technical .tdc-cf-submit-center {
    justify-content: center;
    margin-top: 20px;
}

.tdc-cf-technical .tdc-cf-submit {
    width: auto;
    min-width: 150px;
    padding: 12px 40px;
    height: auto;
    background: #000;
    color: #fff;
    border: none;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tdc-cf-technical .tdc-cf-submit:hover {
    background: #333;
}

/* Formulario tradicional - mantener estilos existentes */
.tdc-cf-traditional .tdc-contact-form {
    max-width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .tdc-contact-form-wrapper {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .tdc-cf-title {
        font-size: 24px;
    }
    
    .tdc-cf-row {
        flex-direction: column;
        gap: 0;
    }
    
    .tdc-cf-field-half {
        margin-bottom: 20px;
    }
    
    .tdc-cf-technical .tdc-cf-grid-3,
    .tdc-cf-technical .tdc-cf-grid-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tdc-cf-technical .tdc-cf-submit {
        width: 100%;
        min-width: auto;
    }
}
