/* HASKARI Academy — Work continuation UX v1
   Final ownership for calm prompts, compact floating actions and mobile app navigation. */

#google-one-tap-wrapper.hk-google-dismissed {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-80px) !important;
}
#google-one-tap-wrapper { overflow: visible !important; }

.hk-google-one-tap-close {
    position: absolute;
    z-index: 8;
    top: -9px;
    right: -9px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,184,0,.30);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(28,29,35,.98), rgba(9,10,14,.99));
    color: #e8edf5;
    box-shadow: 0 9px 24px rgba(0,0,0,.34), 0 0 0 1px rgba(255,255,255,.025) inset;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.hk-google-one-tap-close:hover,
.hk-google-one-tap-close:focus-visible {
    transform: scale(1.06);
    border-color: rgba(255,184,0,.62);
    color: #ffd35a;
    box-shadow: 0 10px 27px rgba(0,0,0,.38), 0 0 18px rgba(255,184,0,.10);
    outline: none;
}
.hk-google-one-tap-close svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
}
html.light .hk-google-one-tap-close {
    background: linear-gradient(145deg,#fff,#f3eee4);
    color: #354052;
    box-shadow: 0 8px 22px rgba(46,36,18,.14);
}

/* The legacy reminder is retired in favor of a single idle auto-open. */
#haskari-ai-dock.is-reminding:not(:hover) { width: 48px !important; }
#haskari-ai-dock.is-reminding:not(:hover) .haskari-ai-dock__wrapper { width: 48px !important; }
#haskari-ai-dock.is-reminding:not(:hover) .haskari-ai-dock__text,
#haskari-ai-dock.is-reminding:not(:hover) .haskari-ai-dock__nucleus {
    opacity: 0 !important;
    pointer-events: none !important;
}

.hk-mobile-bottom-nav,
.hk-mobile-theme-toggle { display: none; }

@media (max-width: 860px) {
    body.hk-mobile-app-nav {
        padding-bottom: calc(82px + env(safe-area-inset-bottom));
    }

    /* Mobile header = brand + theme + hamburger only. */
    .navbar .navbar__actions > .profile-dropdown-container,
    .navbar .navbar__actions > #nav-cta-login,
    .navbar .navbar__actions > #nav-cta-contact {
        display: none !important;
    }

    .navbar #theme-toggle-header,
    .hk-mobile-theme-toggle {
        display: inline-grid !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        place-items: center !important;
        padding: 0 !important;
        border: 1px solid rgba(255,255,255,.09) !important;
        border-radius: 12px !important;
        background: rgba(255,255,255,.035) !important;
        color: #dbe3ee !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
    }

    .navbar #theme-toggle-header svg,
    .hk-mobile-theme-toggle svg {
        width: 17px;
        height: 17px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    html.light .navbar #theme-toggle-header,
    html.light .hk-mobile-theme-toggle {
        border-color: rgba(54,46,31,.11) !important;
        background: linear-gradient(145deg,#fff,#f4efe6) !important;
        color: #263041 !important;
        box-shadow: 0 6px 16px rgba(54,42,20,.08), inset 0 1px 0 #fff;
    }

    .navbar .navbar__actions {
        gap: 8px !important;
        flex: 0 0 auto;
    }

    .navbar__logo-premium {
        min-width: 0;
        max-width: calc(100vw - 116px);
    }

    .navbar__logo-premium > span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hk-mobile-bottom-nav {
        position: fixed;
        z-index: 9994;
        left: 50%;
        bottom: max(10px, env(safe-area-inset-bottom));
        display: grid;
        width: min(430px, calc(100vw - 24px));
        grid-template-columns: repeat(3, minmax(0,1fr));
        gap: 5px;
        padding: 7px;
        border: 1px solid rgba(255,255,255,.09);
        border-radius: 22px;
        background: linear-gradient(145deg,rgba(18,19,25,.93),rgba(7,8,12,.96));
        -webkit-backdrop-filter: blur(22px) saturate(1.2);
        backdrop-filter: blur(22px) saturate(1.2);
        box-shadow: 0 18px 48px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.045);
        transform: translateX(-50%);
        opacity: 1;
        transition: transform .36s cubic-bezier(.16,1,.3,1), opacity .22s ease;
    }

    .hk-mobile-bottom-nav.is-hidden,
    body.ai-panel-open .hk-mobile-bottom-nav {
        transform: translate(-50%, calc(100% + 28px));
        opacity: 0;
        pointer-events: none;
    }

    .hk-mobile-bottom-nav__item {
        position: relative;
        display: flex;
        min-width: 0;
        min-height: 54px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        padding: 5px 4px;
        border: 1px solid transparent;
        border-radius: 16px;
        color: #8f9aab;
        font: 750 9px/1.1 Inter, system-ui, sans-serif;
        text-decoration: none;
        letter-spacing: .01em;
        transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .hk-mobile-bottom-nav__item:active { transform: scale(.97); }

    .hk-mobile-bottom-nav__item:hover,
    .hk-mobile-bottom-nav__item:focus-visible,
    .hk-mobile-bottom-nav__item.is-active {
        color: #ffe08a;
        border-color: rgba(255,184,0,.14);
        background: rgba(255,184,0,.055);
        outline: none;
    }

    .hk-mobile-bottom-nav__icon {
        display: grid;
        width: 23px;
        height: 23px;
        place-items: center;
    }

    .hk-mobile-bottom-nav__icon svg {
        width: 19px;
        height: 19px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    html.light .hk-mobile-bottom-nav {
        border-color: rgba(70,58,34,.12);
        background: linear-gradient(145deg,rgba(255,254,250,.96),rgba(244,239,230,.96));
        box-shadow: 0 15px 38px rgba(58,44,20,.16), inset 0 1px 0 #fff;
    }

    html.light .hk-mobile-bottom-nav__item { color: #657184; }

    html.light .hk-mobile-bottom-nav__item:hover,
    html.light .hk-mobile-bottom-nav__item:focus-visible,
    html.light .hk-mobile-bottom-nav__item.is-active {
        color: #9b6800;
        border-color: rgba(188,123,0,.17);
        background: rgba(255,184,0,.07);
    }

    #origin-engine,
    #haskari-ai-dock {
        scroll-margin-bottom: 100px;
    }
}

@media (max-width: 390px) {
    .navbar__logo-premium img {
        width: 34px !important;
        height: 34px !important;
    }

    .navbar__logo-premium > span { font-size: .98rem !important; }

    .hk-mobile-bottom-nav {
        width: calc(100vw - 16px);
        border-radius: 20px;
        padding: 6px;
    }
}

@media (max-width: 330px) {
    .navbar__logo-premium > span { font-size: .86rem !important; }

    .navbar #theme-toggle-header,
    .hk-mobile-theme-toggle,
    .hamburger {
        transform: scale(.92);
        transform-origin: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hk-google-one-tap-close,
    .hk-mobile-bottom-nav,
    .hk-mobile-bottom-nav__item {
        transition: none !important;
    }
}
