/*
 * Site chrome: top bar, header, mobile drawer, notifications, account menu and footer.
 * Markup: resources/views/frontend/partials/{header,footer,social-icons}.blade.php
 * Behaviour: public/assets/js/site-header.js
 *
 * Note: no <span> inside links here on purpose, style.css has global `a > span` rules.
 */

:root {
    --site-primary: #8145d8;
    --site-primary-dark: #6a34bd;
    --site-pink: #e894e6;
    --site-deep: #5a3591;
    --site-tint: #f6f1fe;
    --site-line: #ebe5f5;
    --site-text: #1e1e1e;
    --site-muted: #6e6a7c;
    --site-danger: #d12a45;
}

/* Sticky footer: short pages keep the footer at the bottom of the window. */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1 0 auto;
}

.site-topbar [hidden],
.site-header [hidden],
.site-drawer [hidden] {
    display: none !important;
}

.site-logo {
    display: inline-flex;
    flex-shrink: 0;
}

.site-logo img {
    display: block;
    width: auto;
    height: 52px;
}

/* ---------- Buttons ---------- */

.site-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    font-size: 19px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    border: 1.5px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.site-btn i {
    font-size: 18px;
}

.site-btn--primary {
    color: #fff;
    background: var(--site-primary);
}

.site-btn--primary:hover {
    color: #fff;
    background: var(--site-primary-dark);
}

.site-btn--soft {
    color: var(--site-primary);
    background: var(--site-tint);
}

.site-btn--soft:hover {
    color: var(--site-primary-dark);
    background: #ece2fb;
}

.site-btn--ghost {
    color: var(--site-text);
    border-color: var(--site-line);
}

.site-btn--ghost:hover {
    color: var(--site-primary);
    border-color: var(--site-primary);
}

.site-btn--block {
    width: 100%;
    height: 52px;
}

.site-icon-btn {
    position: relative;
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--site-text);
    font-size: 24px;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.site-icon-btn:hover,
.site-icon-btn[aria-expanded="true"] {
    color: var(--site-primary);
    background: var(--site-tint);
}

.site-badge {
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: -2px;
    box-sizing: border-box;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    background: var(--site-danger);
    border: 2px solid #fff;
    border-radius: 999px;
    pointer-events: none;
}

/* ---------- Social links (header, drawer, footer) ---------- */

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--site-primary);
    font-size: 18px;
    background: #fff;
    border: 1px solid var(--site-line);
    border-radius: 50%;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.social-links a:hover {
    color: #fff;
    background: var(--site-primary);
    border-color: var(--site-primary);
}

/* ---------- Top bar (desktop only) ---------- */

.site-topbar {
    display: none;
    padding-block: 6px;
    font-size: 17px;
    background: var(--site-tint);
}

.site-topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-topbar__contact {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-topbar__contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--site-muted);
}

.site-topbar__contact a:hover {
    color: var(--site-primary);
}

.site-topbar__contact i {
    color: var(--site-primary);
}

.site-topbar .social-links a {
    width: 32px;
    height: 32px;
    font-size: 15px;
}

/* ---------- Header ---------- */

.site-header {
    position: relative;
    z-index: 1030;
    background: #fff;
    border-bottom: 1px solid var(--site-line);
    transition: box-shadow 0.2s;
}

.site-header.is-stuck {
    box-shadow: 0 6px 20px rgba(48, 22, 92, 0.08);
}

.site-header__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding-block: 10px;
}

.site-header__burger {
    margin-inline-start: -8px;
}

.site-header .site-logo img {
    height: 46px;
}

.site-nav {
    display: none;
}

.site-nav ul {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    display: block;
    padding: 8px 14px;
    white-space: nowrap;
    color: var(--site-text);
    font-size: 20px;
    font-weight: 400;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--site-primary);
    background: var(--site-tint);
}

/* Plain text after a link label, e.g. the commission percentage */
.site-pill {
    display: inline;
    margin-inline-start: 0;
    color: inherit;
    font: inherit;
}

/* Search: its own row on phones, inline from the desktop breakpoint. */
.site-search {
    display: flex;
    flex: 1 1 100%;
    align-items: center;
    gap: 10px;
    order: 10;
    height: 46px;
    margin: 0;
    padding-inline: 16px;
    background: #f5f3f9;
    border: 1.5px solid transparent;
    border-radius: 999px;
    transition: border-color 0.15s, background 0.15s;
}

.site-search:focus-within {
    background: #fff;
    border-color: var(--site-primary);
}

.site-search i {
    color: var(--site-muted);
    font-size: 17px;
}

.site-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    color: var(--site-text);
    font-size: 19px;
    background: transparent;
    border: 0;
    outline: none;
}

.site-search input::placeholder {
    color: #a29eb2;
}

/* Search suggestions dropdown (assets/js/search-suggest.js) */
.site-search {
    position: relative;
}

.site-suggest {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-start: 0;
    z-index: 1040;
    width: max(100%, 360px);
    max-width: calc(100vw - 24px);
    max-height: min(60vh, 420px);
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;
    background: #fff;
    border: 1px solid var(--site-line);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(48, 22, 92, 0.16);
}

.site-suggest[hidden] {
    display: none;
}

.site-suggest li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: var(--site-text);
    font-size: 16px;
    cursor: pointer;
}

.site-suggest li + li {
    border-top: 1px solid #f1ecf8;
}

.site-suggest li i {
    flex-shrink: 0;
    color: var(--site-primary);
    font-size: 15px;
}

.site-suggest li span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-suggest li mark {
    padding: 0;
    color: var(--site-primary-dark);
    background: transparent;
    font-weight: 700;
}

.site-suggest li:hover,
.site-suggest li.is-active {
    background: var(--site-tint);
}

.site-suggest__empty {
    color: var(--site-muted);
    cursor: default;
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
}

.site-actions__ask {
    display: none;
}

/* ---------- Account menu ---------- */

.site-account__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 6px;
    color: var(--site-text);
    font-size: 19px;
    background: var(--site-tint);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.site-account__toggle:hover,
.site-account__toggle[aria-expanded="true"] {
    background: #ece2fb;
}

.site-avatar {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #fff;
    font-size: 18px;
    font-weight: 400;
    background: var(--site-primary);
    border-radius: 50%;
}

.site-account__name,
.site-account__caret {
    display: none;
}

.site-account__name {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-account__caret {
    margin-inline-end: 8px;
    font-size: 12px;
}

.site-menu {
    min-width: 220px;
    margin-top: 10px !important;
    padding: 8px;
    border: 1px solid var(--site-line);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(48, 22, 92, 0.14);
}

.site-menu__head {
    padding: 8px 14px 10px;
    margin-bottom: 4px;
    color: var(--site-muted);
    font-size: 17px;
    border-bottom: 1px solid var(--site-line);
}

.site-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 19px;
    border-radius: 10px;
}

.site-menu .dropdown-item i {
    color: var(--site-primary);
    font-size: 18px;
}

.site-menu .dropdown-item:hover {
    color: var(--site-primary);
    background: var(--site-tint);
}

/* ---------- Notifications ---------- */

.site-notifs__panel {
    position: absolute;
    inset-inline: 12px;
    inset-block-start: 100%;
    z-index: 1040;
    max-height: min(70vh, 520px);
    margin-top: 6px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--site-line);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(48, 22, 92, 0.16);
}

.site-notifs__head {
    position: sticky;
    inset-block-start: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--site-line);
}

.site-notifs__title {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
}

.site-notifs__all {
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    background: var(--site-tint);
    color: var(--site-primary);
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

.site-notifs__all:hover {
    background: #ece3fb;
}

.site-notifs ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-notifs li + li {
    border-top: 1px solid var(--site-line);
}

.site-notifs li a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-inline-start: 3px solid transparent;
    cursor: pointer;
}

.site-notifs li a:hover {
    background: #faf7ff;
}

.site-notifs li > a > i {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--site-tint);
    color: var(--site-primary);
    font-size: 17px;
}

.site-notifs li > a > span {
    min-width: 0;
}

.site-notifs li.is-unread a {
    background: var(--site-tint);
    border-inline-start-color: var(--site-primary);
}

.site-notifs li.is-unread > a > i {
    background: var(--site-primary);
    color: #fff;
}

.site-notifs li strong {
    display: block;
    color: var(--site-text);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.site-notifs li small {
    display: block;
    margin-top: 2px;
    color: var(--site-muted);
    font-size: 13px;
}

.site-notifs__empty {
    margin: 0;
    padding: 32px 18px;
    color: var(--site-muted);
    font-size: 18px;
    text-align: center;
}

/* ---------- Mobile drawer ---------- */

.offcanvas.site-drawer {
    width: min(86vw, 340px);
}

.site-drawer .offcanvas-header {
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--site-line);
}

.site-drawer .offcanvas-body {
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.site-drawer__links {
    display: grid;
    gap: 4px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.site-drawer__links a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    color: var(--site-text);
    font-size: 21px;
    font-weight: 400;
    border-radius: 14px;
}

.site-drawer__links i {
    color: var(--site-primary);
    font-size: 22px;
}

.site-drawer__links a:hover,
.site-drawer__links a.is-active {
    color: var(--site-primary);
    background: var(--site-tint);
}

.site-drawer__foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 20px;
}

.site-drawer__contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 16px;
}

.site-drawer__contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--site-muted);
}

.site-drawer__contact i {
    color: var(--site-primary);
}

/* ---------- Footer ---------- */

.site-footer {
    position: relative;
    margin-top: 48px;
    background: var(--site-tint);
}

.site-footer::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 4px;
    background: linear-gradient(to left, var(--site-pink), var(--site-primary));
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
    padding-block: 48px 36px;
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 18px;
    grid-column: 1 / -1;
}

.site-footer__brand .site-logo img {
    height: 88px;
}

.site-footer__aside {
    grid-column: 1 / -1;
}

.site-footer__col h2 {
    position: relative;
    margin: 0 0 18px;
    padding-bottom: 12px;
    color: var(--site-deep);
    font-size: 22px;
    font-weight: 700;
}

.site-footer__col h2::after {
    content: "";
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    width: 36px;
    height: 3px;
    background: var(--site-pink);
    border-radius: 2px;
}

.site-footer__col ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__col a {
    color: #4a4660;
    font-size: 19px;
}

.site-footer__col a:hover {
    color: var(--site-primary);
}

.site-footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #4a4660;
    font-size: 19px;
}

.site-footer__contact i {
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--site-primary);
    font-size: 19px;
}

.site-footer__contact address {
    margin: 0;
}

.site-footer__bottom {
    padding-block: 16px;
    color: #e9e1f7;
    font-size: 17px;
    background: var(--site-deep);
}

.site-footer__bottom .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.site-footer__bottom p {
    margin: 0;
}

.site-footer__credit img {
    display: block;
    width: auto;
    max-width: 140px;
    height: 32px;
    object-fit: contain;
}

/* ---------- Tablet and up ---------- */

@media (min-width: 576px) {
    .site-notifs {
        position: relative;
    }

    .site-notifs__panel {
        inset-inline: auto 0;
        width: 360px;
        margin-top: 10px;
    }
}

@media (min-width: 768px) {
    .site-footer__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }

    .site-footer__aside {
        grid-column: auto;
    }

    .site-footer__bottom .container {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ---------- Desktop ---------- */

@media (min-width: 992px) {
    .site-topbar {
        display: block;
    }

    .site-header {
        position: sticky;
        top: 0;
    }

    .site-header__bar {
        flex-wrap: nowrap;
        gap: 16px;
    }

    .site-header__burger {
        display: none;
    }

    .site-header .site-logo img {
        height: 56px;
    }

    .site-nav {
        display: block;
    }

    .site-search {
        flex: 1 1 200px;
        order: 0;
        max-width: 340px;
        margin-inline: auto;
    }

    .site-actions {
        margin-inline-start: 0;
        gap: 10px;
    }

    .site-actions__ask {
        display: inline-flex;
    }

    .site-footer__grid {
        grid-template-columns: 1.3fr 1fr 1fr 1.3fr;
        gap: 32px 40px;
    }

    .site-footer__brand {
        grid-column: auto;
    }
}

/* Narrow desktop: keep one row by trimming the nav and shrinking secondary controls. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .site-nav a {
        padding: 8px 8px;
        font-size: 16px;
    }

    .site-header__bar {
        gap: 10px;
    }

    .site-search {
        flex: 1 1 150px;
        min-width: 110px;
        max-width: none;
        margin-inline: 0;
        padding-inline: 12px;
    }

    .site-search input {
        font-size: 16px;
    }

    .site-actions__ask {
        width: 44px;
        padding: 0;
    }

    .site-actions__ask bdi {
        display: none;
    }
}

@media (min-width: 1200px) {
    .site-account__toggle {
        padding-inline: 6px 8px;
    }

    .site-account__name,
    .site-account__caret {
        display: inline;
    }
}

/* ---------- Small phones ---------- */

@media (max-width: 575.98px) {
    .site-actions__login {
        width: 44px;
        padding: 0;
    }

    .site-actions__login bdi {
        display: none;
    }
}

@media (max-width: 379.98px) {
    .site-actions .site-btn--primary {
        width: 44px;
        padding: 0;
    }

    .site-actions .site-btn--primary bdi {
        display: none;
    }
}

/* ==========================================================================
   Footer: mobile app download (partials/app-download.blade.php)
   ========================================================================== */
.app-dl {
    margin-top: 22px;
}

.site-footer__contact + .app-dl {
    margin-top: 24px;
}

.app-dl__stores {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.site-footer .app-dl__store {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid var(--site-line);
    border-radius: 10px;
    background: #fff;
    color: var(--site-text);
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .15s;
}

.site-footer .app-dl__store:hover {
    border-color: var(--site-primary);
    box-shadow: 0 6px 14px -8px rgba(129, 69, 216, .6);
    color: var(--site-text);
    transform: translateY(-1px);
}

.app-dl__store i {
    flex: none;
    color: var(--site-primary);
    font-size: 1.2rem;
    line-height: 1;
}

.app-dl__store span {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    text-align: start;
}

.app-dl__store small {
    color: var(--site-muted);
    font-size: .62rem;
}

.app-dl__store b {
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
}
