/* Quimika · Base global de marca. Reutilizable en toda la aplicación.
   Cambia los tokens aquí para actualizar la identidad en todas las pantallas. */
:root {
    color-scheme: light;
    --q-brand: #38bdf8;
    --q-action: #0075b4;
    --q-action-hover: #00649b;
    --q-soft: #eaf6ff;
    --q-background: #f5faff;
    --q-surface: #ffffff;
    --q-text: #14283f;
    --q-muted: #52677b;
    --q-border: #d6e4ef;
    --q-placeholder: #747a84;
    --q-danger: #b42336;
    --q-danger-soft: #fff1f3;
    --q-success: #176747;
    --q-success-soft: #edf8f2;
    --q-warning: #855117;
    --q-warning-soft: #fff5e7;
    --q-focus: #0075b4;
    --q-shadow: 0 16px 56px rgb(20 64 95 / 5%);
    --q-font: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --q-heading-font: "Outfit", var(--q-font);
    --q-font-size-text: 14px;
    --q-radius-input: 12px;
    --q-radius-card: 28px;
}

/* Los formularios públicos usan data-theme="light" de forma explícita.
   El tema oscuro queda disponible para futuras pantallas de la aplicación. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --q-brand: #7dd3fc;
    --q-action: #7dd3fc;
    --q-action-hover: #bae6fd;
    --q-soft: #142e40;
    --q-background: #101923;
    --q-surface: #172532;
    --q-text: #f7f8fa;
    --q-muted: #b1b7c1;
    --q-border: #3f5366;
    --q-placeholder: #a4abb6;
    --q-danger: #ffb3bd;
    --q-danger-soft: #3b2027;
    --q-success: #9ce0bd;
    --q-success-soft: #193329;
    --q-warning: #f2cd98;
    --q-warning-soft: #342b1d;
    --q-focus: #7dd3fc;
    --q-shadow: 0 16px 56px rgb(0 0 0 / 12%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    background: var(--q-background);
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
    color: var(--q-text);
    background: var(--q-background);
    font: 400 var(--q-font-size-text)/1.6 var(--q-font);
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}
button,
select,
input[type="checkbox"] {
    cursor: pointer;
}
button:disabled,
input:disabled,
select:disabled {
    cursor: not-allowed;
}
a {
    color: var(--q-action);
    text-underline-offset: 4px;
}
a:hover {
    text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--q-focus);
    outline-offset: 4px;
}
[hidden] {
    display: none !important;
}
::selection {
    color: var(--q-text);
    background: var(--q-soft);
}
.q-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.q-logo {
    display: block;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
}
.q-logo circle,
.q-logo path[stroke] {
    stroke: var(--q-text);
}
.q-logo path[fill] {
    fill: var(--q-brand);
}
.q-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: var(--q-text);
    text-decoration: none;
}
.q-brand:hover {
    text-decoration: none;
}
.q-wordmark {
    font: 600 34px/1 var(--q-heading-font);
    letter-spacing: -1.5px;
}
.q-wordmark > span {
    color: var(--q-brand);
}

.q-input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding: 13px 15px;
    border: 1px solid var(--q-border);
    border-radius: var(--q-radius-input);
    color: var(--q-text);
    background: var(--q-surface);
    font-size: 16px;
    line-height: 1.5;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}
.q-input::placeholder {
    color: var(--q-placeholder);
    opacity: 1;
}
.q-input:focus {
    border-color: var(--q-focus);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--q-focus) 15%, transparent);
}
.q-input[aria-invalid="true"] {
    border-color: var(--q-danger);
}
.q-input:disabled {
    background: var(--q-background);
    opacity: 0.8;
}
.q-input:-webkit-autofill {
    -webkit-text-fill-color: var(--q-text);
    box-shadow: 0 0 0 1000px var(--q-surface) inset;
}
select.q-input {
    padding-right: 32px;
}
.q-checkbox {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    accent-color: var(--q-action);
}
.q-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-radius: var(--q-radius-input);
    color: #ffffff;
    background: var(--q-action);
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.16s ease,
        box-shadow 0.16s ease;
}
.q-button:hover:not(:disabled) {
    color: #ffffff;
    background: var(--q-action-hover);
    text-decoration: none;
    box-shadow: 0 5px 16px color-mix(in srgb, var(--q-brand) 13%, transparent);
}
.q-button:disabled {
    opacity: 0.55;
    box-shadow: none;
    cursor: not-allowed;
}
.q-button[aria-busy="true"],
[aria-busy="true"] .q-button {
    cursor: wait;
}
:root[data-theme="dark"] .q-button {
    color: #14283f;
}
:root[data-theme="dark"] .q-button:hover:not(:disabled) {
    color: #14283f;
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

/* Tamaño de texto global: igual al de los intereses de Lo que disfruto.
   !important evita que los tamaños locales y las variantes móviles reaparezcan.
   Solo se normaliza font-size: familia, peso, colores y espaciado se conservan.
   Para títulos futuros sin h1-h6, usar data-q-type="title" en el elemento. */
body {
    font-size: var(--q-font-size-text) !important;
}
html[data-theme] :is(body.q-app, body.q-auth, body) :where(*):not(:where(
        h1, h1 *,
        h2, h2 *,
        h3, h3 *,
        h4, h4 *,
        h5, h5 *,
        h6, h6 *,
        [role="heading"], [role="heading"] *,
        [data-q-type="title"], [data-q-type="title"] *,
        .q-text-title, .q-text-title *,
        .q-title, .q-title *,
        .q-wordmark, .q-wordmark *,
        .brand:not(.q-brand), .brand:not(.q-brand) *,
        .marca:not(.q-brand), .marca:not(.q-brand) *,
        .profile-name, .profile-name *,
        .card-name, .card-name *,
        .member-name, .member-name *,
        .user-name, .user-name *,
        .q-chat-title, .q-chat-title *,
        .q-chat-name, .q-chat-name *,
        .q-chat-window-name, .q-chat-window-name *,
        .chat-title, .chat-title *,
        .chat-header-name, .chat-header-name *,
        body[data-q-screen="mi_perfil"] .q-inline-3, body[data-q-screen="mi_perfil"] .q-inline-3 *,
        body[data-q-screen="mi_perfil"] .q-inline-4, body[data-q-screen="mi_perfil"] .q-inline-4 *,
        svg, svg *,
        math, math *,
        [data-lucide], [data-lucide] *,
        .lucide, .lucide *,
        .icon, .icon *,
        .logo, .logo *,
        .q-logo, .q-logo *,
        .bi, .bi *,
        .material-icons, .material-icons *,
        .material-symbols-outlined, .material-symbols-outlined *,
        [data-q-type="icon"], [data-q-type="icon"] *,
        .q-chat-emojis, .q-chat-emojis *,
        .q-chat-icon-button, .q-chat-icon-button *,
        script, script *,
        style, style *,
        template, template *
    )),
/* Los contadores de sección son texto auxiliar aunque estén dentro de un h2. */
html[data-theme] body :is(.mp-count, .pv-interest-total, .q-count, .intereses-contador) {
    font-size: var(--q-font-size-text) !important;
}

/* Con 14px, los nombres del menú móvil necesitan poder ocupar varias líneas. */
@media (max-width: 768px) {
    html[data-theme] body.q-app:has(nav.bottom-nav) {
        padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px)) !important;
    }
    html[data-theme] body.q-app nav.bottom-nav {
        height: auto;
        align-items: stretch;
    }
    html[data-theme] body.q-app nav.bottom-nav > a,
    html[data-theme]
        body.q-app
        nav.bottom-nav
        > a
        > span:not([data-likes-nuevos]):not([data-chat-unread]) {
        white-space: normal;
        overflow-wrap: anywhere;
        text-overflow: clip;
        line-height: 1.25;
    }
}

/* Logo horizontal compartido: usar las mismas clases en cualquier pantalla.
   El alto automático conserva la proporción de los archivos PNG originales. */
.q-brand.q-brand--image {
    gap: 0;
    text-decoration: none;
}
.q-brand-image {
    display: block;
    flex: 0 1 auto;
    width: var(--q-brand-logo-width, 170px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: left center;
}
.q-brand-image--dark {
    display: none;
}
html[data-theme="dark"] .q-brand-image--light {
    display: none;
}
html[data-theme="dark"] .q-brand-image--dark {
    display: block;
}
.q-brand--loading {
    --q-brand-logo-width: 190px;
    max-width: 100%;
}

/* Cabecera de marca compartida por las pantallas de la aplicación. */
.q-brandbar {
    display: flex;
    align-items: center;
    min-width: 0;
    margin-bottom: 20px;
}

/* Sobre fotografías se usa la variante clara del dibujo para fondo oscuro. */
.q-brand.q-brand--on-photo {
    --q-brand-logo-width: 150px;
    margin-bottom: 8px;
}
.q-brand--on-photo .q-brand-image--light {
    display: none;
}
.q-brand--on-photo .q-brand-image--dark {
    display: block;
}

/* La membresía y el logo comparten cabecera sin forzar una sola línea. */
.pd-topbar:has(.q-brand--image) {
    flex-wrap: wrap;
    height: auto;
    min-height: 96px;
    padding-block: 18px;
}
