/**
 * Estilos para Formulario Toyota Standalone
 * Plugin independiente de Elementor
 */

/* Ocultar elementos del plugin anterior de Elementor */
#imagen-modelo-container,
.imagen-modelo-container,
#toyota-form-wrapper {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

.toyota-standalone-form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.toyota-standalone-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.toyota-form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 25px;
    gap: 20px;
}

.toyota-form-col {
    flex: 1;
    min-width: 250px;
}

.toyota-form-col-full {
    flex: 1 1 100%;
    width: 100%;
}

.toyota-standalone-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.toyota-standalone-form .required {
    color: #EB0A1E;
    margin-left: 3px;
}

.toyota-standalone-form input[type="text"],
.toyota-standalone-form input[type="email"],
.toyota-standalone-form input[type="tel"],
.toyota-standalone-form select,
.toyota-standalone-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.toyota-standalone-form input[type="text"]:focus,
.toyota-standalone-form input[type="email"]:focus,
.toyota-standalone-form input[type="tel"]:focus,
.toyota-standalone-form select:focus,
.toyota-standalone-form textarea:focus {
    outline: none;
    border-color: #161617;
    box-shadow: 0 0 0 3px rgba(0, 45, 114, 0.1);
}

.toyota-standalone-form select {
    background-color: #fff;
    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 15px center;
    padding-right: 40px;
}

.toyota-standalone-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Contenedor de imagen del vehículo */
.toyota-image-row {
    margin-top: 20px;
    margin-bottom: 30px;
}

.toyota-vehicle-image-wrapper {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.toyota-vehicle-image-wrapper:hover {
    border-color: #002D72;
    box-shadow: 0 4px 12px rgba(0, 45, 114, 0.15);
}

.toyota-vehicle-image-wrapper img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

.toyota-vehicle-image-wrapper img.loading {
    opacity: 0.5;
}

/* Botón de envío - Los colores se aplican dinámicamente desde PHP */
.toyota-submit-btn {
    color: #ffffff !important;
    border: none;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
    border-radius: 13px !important;
}

.toyota-submit-btn:hover {
    transform: translateY(-2px);
}

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

.toyota-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Mensajes */
.toyota-form-message {
    margin-top: 20px;
}

.toyota-message {
    padding: 18px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    animation: slideDown 0.4s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toyota-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
    border-left: 6px solid #28a745;
}

.toyota-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
    border-left: 6px solid #dc3545;
}

/* Animación de slide down */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .toyota-standalone-form {
        padding: 25px 20px;
    }
    
    .toyota-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .toyota-form-col {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .toyota-vehicle-image-wrapper img {
        max-height: 250px;
    }
    
    .toyota-submit-btn {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .toyota-standalone-form-container {
        padding: 15px 10px;
    }
    
    .toyota-standalone-form {
        padding: 20px 15px;
    }
    
    .toyota-vehicle-image-wrapper {
        padding: 15px;
    }
    
    .toyota-vehicle-image-wrapper img {
        max-height: 200px;
    }
}

/* Animación de carga */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toyota-image-row {
    animation: fadeIn 0.4s ease;
}

/* Estilos adicionales para mejor UX */
.toyota-standalone-form input:invalid:not(:placeholder-shown),
.toyota-standalone-form select:invalid:not(:placeholder-shown),
.toyota-standalone-form textarea:invalid:not(:placeholder-shown) {
    /* border-color: #EB0A1E; */
}

.toyota-standalone-form input:valid:not(:placeholder-shown),
.toyota-standalone-form select:valid:not(:placeholder-shown),
.toyota-standalone-form textarea:valid:not(:placeholder-shown) {
    /* border-color: #28a745; */
}

