/* Dashboard — white directory page (billwurtz-style list) */

:root {
    --dash-ink: #000000;
    --dash-hover: #0000ee;
    --dash-muted: #222222;
}

body {
    margin: 0;
    background: #fff;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Times New Roman', Times, serif;
    color: var(--dash-ink);
}

/* Login overlay */
.login {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    background: #fff;
}

.firebaseui-idp-button:hover {
    background: #000 !important;
}

.firebaseui-idp-button:hover .firebaseui-idp-text {
    color: #fff !important;
    transition: .5s;
}

.login .firebaseui-idp-icon,
.login .firebaseui-idp-favicon {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.login .firebaseui-idp-button[data-provider-id='twitter.com'] .firebaseui-idp-icon,
.login .firebaseui-idp-button[data-provider-id='twitter.com'] .firebaseui-idp-favicon {
    background-image: url('/icons/auth-twitter.svg') !important;
    filter: none !important;
}

.login .firebaseui-idp-button[data-provider-id='apple.com'] .firebaseui-idp-icon,
.login .firebaseui-idp-button[data-provider-id='apple.com'] .firebaseui-idp-favicon {
    background-image: url('/icons/auth-apple.svg') !important;
    filter: none !important;
}

/* Full-bleed directory */
.dashboard-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 18px 20px 88px;
    box-sizing: border-box;
}

.dashboard-heading {
    margin: 0 0 1rem;
    text-transform: uppercase;
    font-weight: bold;
    font-family: 'Impact', sans-serif;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1;
    text-align: left;
    color: var(--dash-ink);
    -webkit-text-fill-color: var(--dash-ink);
}

.dashboard-heading::before {
    content: none;
}

.blogs-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    border-top: 1px solid #d0d0d0;
}

/* Homepage POST card parity — red outline, red fill on hover */
.dashboard-new-post-wrap {
    margin-top: clamp(1.25rem, 4vw, 2rem);
    padding-top: clamp(0.75rem, 2vw, 1.25rem);
    border-top: 1px solid #d0d0d0;
}

.dashboard-new-post {
    display: inline-block;
    font-family: 'Impact', Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: clamp(44px, 11vw, 96px);
    font-weight: bold;
    line-height: 0.95;
    text-decoration: none;
    text-transform: lowercase;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    -webkit-text-stroke: 1px #dc2626;
    text-shadow: none;
    background-image: none;
    position: relative;
    z-index: 1;
}

.dashboard-new-post::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow:
        0 4px 5px rgba(0, 0, 0, 0.7),
        0 0 3px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    z-index: -1;
}

.dashboard-new-post:hover {
    color: #dc2626;
    -webkit-text-fill-color: #dc2626;
    -webkit-text-stroke: 0;
    text-shadow: none;
    filter: none;
    background-image: none;
}

.dashboard-new-post:hover::before {
    display: block;
}

.blog-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1.25rem;
    width: 100%;
    line-height: 1.2;
    padding: 0.45rem 0;
    border-bottom: 1px solid #d0d0d0;
}

.blog-actions .notes-toggle-btn.is-open {
    color: #007acc;
    border-color: #007acc;
}

.blog-actions .edit-locked {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    user-select: none;
}

.blog-date {
    /* Fixed slot so titles share one left edge (widest form: 31.12.99). */
    box-sizing: border-box;
    width: 8ch;
    min-width: 8ch;
    font-family: 'Times New Roman', Times, serif;
    font-size: clamp(18px, 2.2vw, 26px);
    font-variant-numeric: tabular-nums;
    color: var(--dash-ink);
    white-space: nowrap;
    line-height: 1.1;
}

.blog-title {
    margin: 0;
    width: fit-content;
    max-width: 100%;
    font-family: 'Impact', sans-serif;
    font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    color: #fff;
    -webkit-text-fill-color: #fff;
    -webkit-text-stroke: 1.15px var(--dash-hover);
    paint-order: stroke fill;
    text-decoration: underline;
    text-decoration-color: var(--dash-hover);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.12em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.blog-title:hover {
    background: var(--dash-hover);
    color: #fff;
    -webkit-text-fill-color: #fff;
    -webkit-text-stroke-color: #fff;
    text-decoration-color: #fff;
}

.blog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.btn {
    padding: 3px 9px;
    border: 1px solid #808080;
    border-radius: 0;
    font-size: 11px;
    font-weight: 400;
    font-family: 'MS Sans Serif', 'Arial', sans-serif;
    cursor: pointer;
    transition: all 0.1s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 52px;
    background: linear-gradient(to bottom, #f0f0f0 0%, #d0d0d0 50%, #b8b8b8 100%);
    color: #000;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 0 rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background: linear-gradient(to bottom, #e8e8e8 0%, #c8c8c8 50%, #a8a8a8 100%);
    border-color: #606060;
}

.btn:active {
    background: linear-gradient(to bottom, #b8b8b8 0%, #d0d0d0 50%, #f0f0f0 100%);
    transform: translateY(1px);
}

.btn.danger {
    color: #b91c1c;
}

.btn.danger:hover {
    color: #911616;
}

/* Footer — bottom right; Wall stacked above Logout */
.dashboard-footer {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    z-index: 100;
}

/* Match reader Wall / Dashboard corner nav exactly */
.dashboard-footer .btn {
    padding: 0;
    border: none;
    min-width: 0;
    background: none !important;
    box-shadow: none;
    font-size: 25px;
    font-weight: 1200;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    text-transform: none;
    letter-spacing: normal;
    color: #fff !important;
    -webkit-text-fill-color: unset;
    -webkit-text-stroke: 0;
    paint-order: normal;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 0 2px #000;
}

.dashboard-footer .btn:hover {
    color: var(--dash-hover, #007acc) !important;
    -webkit-text-fill-color: unset;
    -webkit-text-stroke: 0;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 0 2px #000;
    transform: none;
}

.dashboard-footer .btn:active {
    transform: none;
}

.empty-state {
    padding: 1rem 0;
    text-align: left;
}

.empty-state h2 {
    margin: 0 0 0.4rem;
    font-family: 'Impact', sans-serif;
    font-size: 28px;
    text-transform: uppercase;
    color: #fff;
    -webkit-text-fill-color: #fff;
    -webkit-text-stroke: 1.15px #000;
    paint-order: stroke fill;
}

.empty-state p {
    margin: 0 0 0.85rem;
    font-size: 16px;
    color: var(--dash-muted);
}

@media (max-width: 640px) {
    .dashboard-container {
        padding: 14px 12px 80px;
    }

    .blog-row {
        grid-template-columns: max-content minmax(0, 1fr);
    }

    .blog-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 0;
    }
}
