/**
 * Hoffmann - Contacto Propietarios
 * Frontend styles — bloque compacto azul #3c5180
 */

.widget_hcp,
.hcp-shortcode-wrap {
    --hcp-bg: #3c5180;
    --hcp-white: #ffffff;
    --hcp-text-on-blue: #ffffff;
    --hcp-text-soft: rgba(255, 255, 255, 0.82);
    --hcp-input-bg: #ffffff;
    --hcp-input-text: #1f2a44;
    --hcp-accent: #ffffff;
    --hcp-accent-text: #3c5180;
    --hcp-error: #ffd9d4;
    --hcp-error-bg: rgba(192, 57, 43, 0.95);
    --hcp-success-bg: rgba(39, 174, 96, 0.95);
    --hcp-radius: 10px;
    --hcp-radius-sm: 6px;

    background: var(--hcp-bg);
    border-radius: var(--hcp-radius);
    padding: 18px 16px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 3px 14px rgba(60, 81, 128, 0.18);
    color: var(--hcp-text-on-blue);
    font-family: inherit;
    box-sizing: border-box;
}

.widget_hcp *,
.hcp-shortcode-wrap * {
    box-sizing: border-box;
}

/* Título del widget */
.widget_hcp .widget-title,
.widget_hcp .widgettitle,
.widget_hcp h2,
.widget_hcp h3,
.widget_hcp h4,
.hcp-shortcode-wrap .hcp-title {
    color: var(--hcp-white) !important;
    margin: 0 0 4px 0;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.widget_hcp .hcp-subtitle,
.hcp-shortcode-wrap .hcp-subtitle {
    font-size: 12px;
    color: var(--hcp-text-soft);
    margin: 0 0 12px 0;
    line-height: 1.45;
}

/* Form */
.hcp-form {
    margin: 0;
    padding: 0;
    background: transparent;
}

.hcp-field {
    margin-bottom: 8px;
}

.hcp-field label {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--hcp-text-on-blue);
    margin-bottom: 3px;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.hcp-required {
    color: var(--hcp-text-soft);
    font-weight: 400;
    margin-left: 2px;
}

/* Inputs */
.hcp-field input[type="text"],
.hcp-field input[type="email"],
.hcp-field input[type="tel"],
.hcp-field select,
.hcp-field textarea {
    width: 100%;
    padding: 7px 10px;
    font-size: 12.5px;
    font-family: inherit;
    color: var(--hcp-input-text);
    background: var(--hcp-input-bg);
    border: 1px solid transparent;
    border-radius: var(--hcp-radius-sm);
    transition: box-shadow 0.2s ease;
    line-height: 1.3;
    appearance: none;
    -webkit-appearance: none;
}

.hcp-field input::placeholder,
.hcp-field textarea::placeholder {
    color: #9aa3b3;
    opacity: 1;
    font-size: 12px;
}

.hcp-field input[type="text"]:focus,
.hcp-field input[type="email"]:focus,
.hcp-field input[type="tel"]:focus,
.hcp-field select:focus,
.hcp-field textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.hcp-field textarea {
    resize: vertical;
    min-height: 60px;
}

.hcp-field select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233c5180' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px;
    cursor: pointer;
}

/* Consent checkbox */
.hcp-consent {
    margin-top: 10px;
    margin-bottom: 10px;
}

.hcp-consent label {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-weight: 400;
    cursor: pointer;
    margin-bottom: 0;
}

.hcp-consent input[type="checkbox"] {
    margin: 2px 0 0 0;
    flex-shrink: 0;
    width: 13px;
    height: 13px;
    accent-color: var(--hcp-white);
    cursor: pointer;
}

.hcp-consent span {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--hcp-text-soft);
}

/* Honeypot */
.hcp-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Botón */
.hcp-submit {
    display: block;
    width: 100%;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--hcp-accent-text);
    background: var(--hcp-accent);
    border: none;
    border-radius: var(--hcp-radius-sm);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    margin-top: 2px;
}

.hcp-submit:hover:not(:disabled) {
    background: #f5f7fc;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.hcp-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.hcp-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Mensajes de respuesta */
.hcp-response {
    margin-top: 10px;
    padding: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--hcp-white);
}

.hcp-response.hcp-response--success {
    padding: 9px 11px;
    background: var(--hcp-success-bg);
    border-radius: var(--hcp-radius-sm);
}

.hcp-response.hcp-response--error {
    padding: 9px 11px;
    background: var(--hcp-error-bg);
    border-radius: var(--hcp-radius-sm);
}

/* Estado de error en campos */
.hcp-field input.hcp-invalid,
.hcp-field select.hcp-invalid,
.hcp-field textarea.hcp-invalid {
    box-shadow: 0 0 0 2px var(--hcp-error);
}

/* Responsive */
@media (max-width: 480px) {
    .widget_hcp,
    .hcp-shortcode-wrap {
        padding: 16px 14px;
        max-width: 100%;
    }

    .hcp-field input[type="text"],
    .hcp-field input[type="email"],
    .hcp-field input[type="tel"],
    .hcp-field select,
    .hcp-field textarea {
        font-size: 16px;
        padding: 8px 10px;
    }
}
