/* CONTACTO FLOTANTE | Independiente del CSS de la página Contacto */
.deleg-floating-contact {
    position: fixed;
    right: clamp(16px, 2vw, 30px);
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 10050;
    color: #092652;
    font-family: Arial, Helvetica, sans-serif;
}

.deleg-floating-contact *,
.deleg-floating-contact *::before,
.deleg-floating-contact *::after { box-sizing: border-box; }

/* Botón flotante más grande, con teléfono y texto visible. */
.deleg-floating-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 176px;
    min-height: 74px;
    margin-left: auto;
    padding: 9px 17px 9px 10px;
    border-radius: 999px;
    border: 2px solid transparent;
    background: #0078d4;
    color: #fff;
    font: 700 16px/1.15 Arial, Helvetica, sans-serif;
    cursor: pointer;
}
.deleg-floating-toggle-icon {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: rgb(255 255 255 / 18%);
}
.deleg-floating-toggle-icon .material-symbols-rounded {
    font-size: 35px;
    line-height: 1;
}
.deleg-floating-toggle-label { white-space: nowrap; }
.deleg-floating-toggle:hover,
.deleg-floating-toggle[aria-expanded="true"] { background: #002b4d; border: 2px solid white; }


/* Panel y cabecera */
.deleg-floating-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 14px);
    display: flex;
    flex-direction: column;
    width: min(370px, calc(100vw - 32px));
    max-height: min(76dvh, 720px);
    overflow: hidden;
    border: 1px solid #d1e5f5;
    border-radius: 16px;
    background: #fff;
}
.deleg-floating-panel[hidden] { display: none !important; }
.deleg-floating-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex: 0 0 auto;
    padding: 17px;
    border-bottom: 1px solid #e0edf7;
    background: #f2f9ff;
}
.deleg-floating-eyebrow { color: #0078d4; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.deleg-floating-panel-header h2 { margin: 4px 0; color: #092652; font-size: 21px; line-height: 1.15; }
.deleg-floating-panel-header p { margin: 0; color: #45658b; font-size: 12px; line-height: 1.4; }
.deleg-floating-close {
    flex: 0 0 auto;
    padding: 6px 8px;
    border: 0;
    border-radius: 7px;
    background: #e4f3ff;
    color: #002b4d;
    font: 600 12px Arial, Helvetica, sans-serif;
    cursor: pointer;
}
.deleg-floating-close:hover { background: #cce9ff; }
.deleg-floating-panel-body { min-height: 0; padding: 17px; overflow-y: auto; overscroll-behavior: contain; }

/* Tres campos, uno por línea, aislados del formulario original. */
.deleg-floating-contact .contacto-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
}
.deleg-floating-contact .contacto-field { display: block; min-width: 0; }
.deleg-floating-contact .contacto-field--full { grid-column: 1 / -1; }
.deleg-floating-contact .contacto-sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}
.deleg-floating-contact .contacto-field :is(input, select, textarea) {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 43px;
    padding: 11px;
    border: 1px solid #cfdfeb;
    border-radius: 7px;
    background: #f1f7fc;
    color: #0e3a66;
    font: 13px/1.35 Arial, Helvetica, sans-serif;
}
.deleg-floating-contact .contacto-field :is(input, textarea)::placeholder { color: #597899; opacity: 1; }
.deleg-floating-contact .contacto-field select:invalid { color: #597899; }
.deleg-floating-contact .contacto-privacy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 14px 0;
    color: #45658b;
    font-size: 11px;
    line-height: 1.5;
}
.deleg-floating-contact .contacto-privacy input {
    flex: 0 0 15px; width: 15px; height: 15px;
    margin: 1px 0 0; accent-color: #0078d4;
}
.deleg-floating-contact .contacto-privacy a { color: #0078d4; }
.deleg-floating-contact .contacto-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 43px;
    padding: 10px 16px;
    border-radius: 8px;
    background: #0078d4;
    color: #fff;
    cursor: pointer;
}
    .deleg-floating-contact .contacto-btn:hover {
        background: #092952;
    }

@media (max-width: 480px) {
    .deleg-floating-panel { max-height: 72dvh; }
    .deleg-floating-toggle { min-width: 165px; min-height: 68px; font-size: 15px; }
    .deleg-floating-toggle-icon { flex-basis: 43px; width: 43px; height: 43px; }
    .deleg-floating-toggle-icon .material-symbols-rounded { font-size: 31px; }
}

/* Mensajes del flotante. No se depende del CSS de la página Contacto. */
.deleg-floating-contact .contacto-respuesta {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid #b6d9c0;
    border-radius: 8px;
    background: #f0faf3;
    color: #175b32;
    font: 12px/1.5 Arial, Helvetica, sans-serif;
}
.deleg-floating-contact .contacto-respuesta--error {
    border-color: #e9b6b6;
    background: #fff2f2;
    color: #912a2a;
}
