/* The navbar and the footer (layouts/navbar.blade.php, layouts/footer.blade.php).
   Navbar: Dashboard and four groups (Decks, Play, Prepare, Community) with a short line under every link, a
   "Log a match" menu and the account. On a phone a player has the bar at the bottom (mobile-bar.css), so the top bar
   keeps only the brand, the name of the page and the account.
   Footer: the brand and four short columns, which fold on a phone. */

/* ---------- navbar ---------- */
@media (min-width: 1400px) {
    /* the row is shorter now (four groups instead of eight links): on a wide screen the name comes back next to the icon */
    .custom-navbar .navbar-brand-text { display: inline; }
    .custom-navbar .navbar-brand i { margin-right: 0.5rem !important; font-size: inherit; }
}

.navbar-cluster { display: flex; align-items: center; gap: 0.5rem; }
/* the account: a button you can see opens a menu (picture, name, plan, arrow) */
.navbar-account { position: relative; }
.navbar-account__button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.9rem;
    padding: 0.2rem 0.9rem 0.2rem 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.navbar-account__button:hover,
.navbar-account__button[aria-expanded="true"] { background: rgba(143, 92, 255, 0.18); border-color: rgba(143, 92, 255, 0.6); }
.navbar-account__button:focus-visible { outline: 2px solid var(--accent-secondary, #d998ff); outline-offset: 2px; }
.navbar-account__button .user-avatar { width: 2.35rem; height: 2.35rem; font-size: 0.95rem; }
.navbar-account__name { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbar-account__chevron { font-size: 0.7rem; color: var(--text-muted, #9aa7bb); transition: transform 0.15s ease; }
.navbar-account__button[aria-expanded="true"] .navbar-account__chevron { transform: rotate(180deg); color: #fff; }
@media (max-width: 991.98px) { .navbar-account__button { gap: 0.4rem; padding-right: 0.7rem; } }

.dropdown-menu.account-menu { min-width: 17rem; padding: 0.5rem; }
.account-menu__head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.35rem; padding: 0.6rem 0.6rem 0.8rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.user-avatar--lg { flex: none; width: 2.9rem; height: 2.9rem; font-size: 1.15rem; }
.account-menu__who { display: flex; flex-direction: column; min-width: 0; }
.account-menu__who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; color: #fff; }
.account-menu__plan { font-size: 0.78rem; font-weight: 700; color: var(--text-muted, #9aa7bb); }
.account-menu__plan.is-premium { color: #ffd666; }
.account-menu__plan.is-supporter { color: #c4a1ff; }
.account-menu__item { display: flex; align-items: center; gap: 0.8rem; min-height: 2.9rem; padding: 0.4rem 0.7rem; font-weight: 600; }
.account-menu__item i { width: 1.2rem; text-align: center; color: var(--accent-secondary, #d998ff); }
.account-menu__item--logout, .account-menu__item--logout i { color: #fda4af; }

.navbar-page-title {
    flex: 1;
    min-width: 0;
    padding-left: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.navbar-log__button {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 1.1rem;
    border-radius: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.dropdown-menu.nav-menu { min-width: 19rem; padding: 0.5rem; }
.nav-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0.4rem 0.6rem;
    white-space: normal;
}
.nav-menu-item__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 10px;
    background: #2a1c52;
    color: #fff;
}
.nav-menu-item__text { display: flex; flex-direction: column; min-width: 0; }
.nav-menu-item__text b { font-size: 0.9rem; }
.nav-menu-item__text small { font-size: 0.75rem; line-height: 1.3; color: var(--text-muted, #9aa7bb); }
.nav-menu-item.is-primary { background: rgba(143, 92, 255, 0.18); }

@media (max-width: 991.98px) {
    /* the groups open inside the folded menu: no floating box */
    .navbar-collapse .dropdown-menu.nav-menu { min-width: 0; box-shadow: none; }
}

/* ---------- footer ---------- */
.site-footer { padding: 3rem 0 1.75rem; }

.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr));
    gap: 2rem;
}

.site-footer__brand { display: flex; flex-direction: column; gap: 0.85rem; }
.site-footer__logo { display: flex; align-items: center; gap: 0.65rem; margin: 0; font-size: 1.1rem; font-weight: 800; color: #fff; }
.site-footer__mark {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9px;
    background: linear-gradient(135deg, #7a42ee, #d998ff);
    color: #fff;
    font-size: 0.9rem;
}
.site-footer__about { margin: 0; max-width: 19rem; font-size: 0.85rem; line-height: 1.55; color: var(--text-muted, #9aa7bb); }
.site-footer__social { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.site-footer__social a {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: #c4d1e3;
    text-decoration: none;
}

.footer-col summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.4rem;
    list-style: none;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f8f9fa;
    cursor: default;
}
.footer-col summary::-webkit-details-marker { display: none; }
.footer-col summary i { display: none; font-size: 0.8rem; transition: transform 0.15s ease; }
.footer-col ul { margin: 0; padding: 0; }
.footer-col li a { display: block; padding: 0.22rem 0; font-size: 0.875rem; font-weight: 600; color: var(--text-muted, #9aa7bb); text-decoration: none; }

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: #7d8aa0;
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom a { color: #c4d1e3; text-decoration: none; }

@media (max-width: 991.98px) {
    .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
    .site-footer { padding-top: 2rem; }
    .site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .site-footer__brand { padding-bottom: 1.25rem; }
    .footer-col { border-top: 1px solid rgba(255, 255, 255, 0.1); }
    .footer-col summary { min-height: 3.25rem; padding: 0; font-size: 0.85rem; cursor: pointer; }
    .footer-col summary i { display: inline-block; }
    .footer-col[open] summary i { transform: rotate(180deg); }
    .footer-col li a { display: flex; align-items: center; min-height: 2.75rem; padding: 0; font-size: 0.95rem; }
    .site-footer__social a { width: 2.75rem; height: 2.75rem; }
    .site-footer__bottom { flex-direction: column; margin-top: 1.25rem; }
}

/* the little arrow of a group sits beside its name (the underline of a link would put it under the name) */
.custom-navbar .nav-item.dropdown > .nav-link.dropdown-toggle::after {
    position: static;
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.4em;
    vertical-align: 0.2em;
    transform: none;
    transition: none;
    background: none;
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}
.custom-navbar .nav-item.dropdown > .nav-link.dropdown-toggle.active::before {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 0;
    height: 2px;
    background: currentColor;
}
