/* Shared UI
 * Split from application.css to keep page-specific styles maintainable.
 */

.toast {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 1000;

    transform: translateX(-50%);

    border-radius: 9999px;
    background: #0f172a;
    color: white;

    padding: 10px 16px;

    font-size: 14px;
    font-weight: 700;

    box-shadow: 0 12px 30px rgba(15,23,42,0.18);

    transition:
            opacity 300ms ease,
            transform 300ms ease;
}

.toast-hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    /*margin-bottom: 10px;*/

    text-decoration: none;
    color: inherit;
}

.app-brand-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
}

.app-brand-text {
    font-size: 18px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: -0.04em;
    color: #0f172a;
}
.legal-page {
    margin: 0 auto;
    max-width: 680px;
    padding: 8px 0 24px;
}

.legal-page h1 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 32px;
    line-height: 1.1;
    font-weight: 800;
}

.legal-page h2 {
    margin: 28px 0 10px;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 800;
}

.legal-page p {
    margin: 0 0 14px;
    color: #475569;
    font-size: 16px;
    line-height: 1.6;
}

.legal-page a {
    color: #2563eb;
    font-weight: 700;
}

.app-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 18px;

    margin-top: 36px;
    padding: 24px 0 8px;

    color: #94a3b8;
    font-size: 13px;
}

.app-footer a {
    color: inherit;
    text-decoration: none;
}

.app-footer a:hover {
    color: #475569;
}

.cookie-banner {
    position: fixed;
    right: 16px;
    bottom: 16px;
    left: 16px;
    z-index: 60;

    max-width: 760px;
    margin: 0 auto;
    padding: 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.cookie-banner-text {
    color: #475569;
    font-size: 14px;
    line-height: 1.45;
}

.cookie-banner-text a {
    color: #2563eb;
    font-weight: 800;
    text-decoration: none;
}

.cookie-banner-button {
    min-height: 42px;
    border: 0;
    border-radius: 9999px;
    padding: 0 18px;

    flex: 0 0 auto;

    background: #2563eb;
    color: #ffffff;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;
}
    .cookie-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .cookie-banner-button {
        width: 100%;
    }

/* One shared appearance for every item in the application header. */
.user-nav .user-nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.user-nav .user-nav-item:hover {
    background: #e2e8f0;
}

.user-nav .user-nav-item:active {
    background: #cbd5e1;
}

.user-nav .user-nav-item:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.user-nav-links > form {
    margin: 0;
}

/* Keep the existing horizontal navigation on tablet and desktop. */
.user-nav-toggle {
    display: none;
}

@media (max-width: 767px) {
    .app-brand {
        flex-shrink: 0;
    }

    .user-nav {
        position: relative;
        flex-shrink: 0;
    }

    .user-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
        color: #334155;
        cursor: pointer;
    }

    .user-nav .user-nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 50;
        width: min(240px, calc(100vw - 28px));
        padding: 8px;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    }

    .user-nav.is-open .user-nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .user-nav .user-nav-item {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }

    .user-nav-toggle:focus-visible {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }
}
