/**
 * CSS para el formulario de contacto autónomo
 * Estilos independientes para el formulario de contacto del plugin
 */
/* Labels del formulario */
.apis-contact-form .form-label
{
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
}

/* Inputs y textarea */
.apis-contact-form .form-control
{
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.apis-contact-form .form-control:focus
{
    outline: none;
    border-color: #8E2C3B;
    box-shadow: 0 0 0 0.2rem rgba(176, 150, 83, 0.25);
}

.apis-contact-form .form-control::placeholder
{
    color: #adb5bd;
    opacity: 1;
}

/* Textarea específico */
.apis-contact-form textarea.form-control
{
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Botón de envío */
.apis-contact-form .btn-submit
{
    background: #000000;
    color: #fff;
    border: none;
    padding: 0.875rem 2.5rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.apis-contact-form .btn-submit:hover
{
    background: #333333;
    opacity: 0.9;
}

.apis-contact-form .btn-submit:disabled
{
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Grupo de formulario */
.apis-contact-form .form-group
{
    margin-bottom: 1rem;
}

/* Mensajes de éxito */
.apis-form-message.success
{
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: block;
}

/* Mensajes de error */
.apis-form-message.error
{
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: block;
}

/* Mensaje de error específico del checkbox de términos */
#apis-accept-legal-error
{
    color: #dc3545;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    display: none;
}

#apis-accept-legal-error.visible
{
    display: block;
}

/* Campos con error */
.apis-contact-form .form-control.error
{
    border-color: #dc3545;
}

.apis-contact-form .form-control.error:focus
{
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Checkbox de términos y privacidad - Estilo moderno personalizado */
.apis-privacy-checkbox-wrapper
{
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Ocultar checkbox nativo */
.apis-privacy-checkbox-wrapper input[type="checkbox"]
{
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Checkbox personalizado */
.apis-privacy-checkbox-wrapper .apis-checkbox-custom
{
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    background: #ffffff;
    border: 2px solid #ced4da;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 2px;
}

/* Hover del checkbox */
.apis-privacy-checkbox-wrapper:hover .apis-checkbox-custom
{
    border-color: #333333;
}

/* Checkbox marcado */
.apis-privacy-checkbox-wrapper input[type="checkbox"]:checked ~ .apis-checkbox-custom
{
    background: #000000;
    border-color: #000000;
}

/* Checkmark */
.apis-privacy-checkbox-wrapper .apis-checkbox-custom::after
{
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Mostrar checkmark cuando está marcado */
.apis-privacy-checkbox-wrapper input[type="checkbox"]:checked ~ .apis-checkbox-custom::after
{
    display: block;
}

/* Focus para accesibilidad */
.apis-privacy-checkbox-wrapper input[type="checkbox"]:focus ~ .apis-checkbox-custom
{
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

/* Label del checkbox */
.apis-privacy-checkbox-wrapper .apis-checkbox-label
{
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #495057;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

/* Enlace de términos */
.apis-privacy-checkbox-wrapper .apis-checkbox-label a
{
    color: #0073aa;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.apis-privacy-checkbox-wrapper .apis-checkbox-label a:hover
{
    color: #005a87;
}

/* Asterisco requerido */
.apis-privacy-checkbox-wrapper .apis-checkbox-label .apis-required
{
    color: #dc3545;
    margin-left: 2px;
}

/* Checkbox antiguo - compatibilidad hacia atrás */
.apis-contact-form input[type="checkbox"]
{
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.apis-contact-form label[for*="accept-legal"]
{
    font-weight: normal;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.apis-contact-form label[for*="accept-legal"] a
{
    color: #0073aa;
    text-decoration: underline;
}

.apis-contact-form label[for*="accept-legal"] a:hover
{
    color: #005a87;
}

/* Responsive para móviles */
@media (max-width: 768px)
{
    .apis-contact-form .form-control
    {
        padding: 0.625rem 0.875rem;
        font-size: 0.95rem;
    }
    
    .apis-contact-form .btn-submit
    {
        padding: 0.75rem 2rem;
        font-size: 0.95rem;
    }
}
