/* =========================================================
   INICIO DE SESIÓN CON GOOGLE - formulario de contacto
   ========================================================= */
.gl-box {
    border: 2px dashed #bfdbfe;
    background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
    border-radius: var(--radius-xl, 1rem);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    transition: border-color .2s ease, background .2s ease;
}
.gl-box.gl-ok {
    border-style: solid;
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.gl-texto {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.gl-num {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary, #2563eb);
    color: #fff;
    font-weight: 800;
}
.gl-texto strong { color: var(--text-primary, #0f172a); font-size: 1.05rem; }
.gl-texto p { margin: .25rem 0 0; color: var(--text-secondary, #475569); font-size: .92rem; line-height: 1.5; }
.gl-boton { min-height: 44px; display: flex; justify-content: center; }
.gl-aviso {
    margin: .75rem 0 0;
    padding: .6rem .9rem;
    border-radius: .6rem;
    background: #fff7ed;
    color: #9a3412;
    font-size: .9rem;
    text-align: center;
}

/* Lo que tiene el atributo hidden no se muestra (aunque tenga display propio) */
.gl-box [hidden], .gl-error[hidden], .gl-aviso[hidden] { display: none !important; }

/* Sesión iniciada */
.gl-usuario {
    display: flex;
    align-items: center;
    gap: .9rem;
}
.gl-usuario img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.gl-inicial {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary, #2563eb);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
}
.gl-datos { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.gl-datos span { font-size: .78rem; color: #15803d; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.gl-datos strong { color: var(--text-primary, #0f172a); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-datos small { color: var(--text-secondary, #475569); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-salir {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    border-radius: 999px;
    padding: .45rem .9rem;
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.gl-salir:hover { border-color: var(--primary, #2563eb); color: var(--primary, #2563eb); }

/* Formulario bloqueado hasta iniciar sesión */
.gl-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.gl-fieldset:disabled { opacity: .5; }
.gl-fieldset:disabled * { cursor: not-allowed; }
.contact-form input[readonly] { background: #f1f5f9; color: #475569; }

/* Campo trampa para bots */
.gl-trampa {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Casilla de promociones */
.gl-check {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    padding: .9rem 1rem;
    border-radius: .75rem;
    background: var(--bg-light, #f8fafc);
    border: 1px solid #e2e8f0;
    font-size: .92rem;
    color: var(--text-secondary, #475569);
    line-height: 1.5;
    cursor: pointer;
}
.gl-check input {
    width: 18px;
    height: 18px;
    margin-top: .15rem;
    accent-color: var(--primary, #2563eb);
    flex: 0 0 auto;
    cursor: pointer;
}
.gl-check strong { color: var(--text-primary, #0f172a); }

.gl-error {
    width: 100%;
    margin: 0;
    padding: .75rem 1rem;
    border-radius: .6rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: .92rem;
    text-align: center;
}
.form-note a { color: var(--primary, #2563eb); }

/* Mensaje de éxito */
.gl-wsp { margin-top: 1.25rem; display: inline-flex; align-items: center; gap: .5rem; }
.gl-otra {
    display: block;
    margin: 1rem auto 0;
    background: none;
    border: 0;
    color: var(--primary, #2563eb);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 480px) {
    .gl-box { padding: 1rem; }
    .gl-usuario { flex-wrap: wrap; }
    .gl-salir { margin-left: auto; }
}
