/* LifeTools Lab: reusable shell for desktop-first tool pages */

.ltl-toolbar {
    display: none;
}

.ltl-tool-footer {
    flex-shrink: 0;
    margin-top: 16px;
    padding: 16px 0 calc(16px + var(--safe-bottom, 0px));
    border-top: 1px solid var(--border, #e5e7eb);
    color: var(--text-muted, #6b7280);
    text-align: center;
}

.ltl-tool-footer__note {
    margin: 0 0 8px;
    font-size: 0.6875rem;
    line-height: 1.5;
}

.ltl-tool-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
}

.ltl-tool-footer__links a,
.ltl-tool-footer__links button {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.75rem;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
}

.ltl-tool-footer__links a:hover,
.ltl-tool-footer__links button:hover {
    color: var(--accent, #2563eb);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ltl-tool-footer__links a:focus-visible,
.ltl-tool-footer__links button:focus-visible {
    outline: 2px solid var(--accent, #2563eb);
    outline-offset: 3px;
    border-radius: 3px;
}

.ltl-tool-footer__copyright {
    display: block;
    margin-top: 12px;
    font-size: 0.6875rem;
    font-weight: 500;
}

@media (min-width: 1024px) {
    .ltl-toolbar {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 22px;
        min-height: 72px;
        padding: 0 clamp(24px, 3vw, 44px);
        border-bottom: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 88%, transparent);
        background: color-mix(in srgb, var(--surface, #fff) 96%, transparent);
        color: var(--text, #111827);
        box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
        backdrop-filter: blur(16px);
    }

    .ltl-toolbar__brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        color: inherit;
        text-decoration: none;
    }

    .ltl-toolbar__mark {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 11px;
        background: var(--accent, #2563eb);
        color: #fff;
        font-size: 0.625rem;
        font-weight: 900;
        letter-spacing: 0.04em;
        box-shadow: 0 8px 20px color-mix(in srgb, var(--accent, #2563eb) 20%, transparent);
    }

    .ltl-toolbar__brand-name {
        font-size: 0.9375rem;
        font-weight: 650;
        letter-spacing: -0.01em;
        white-space: nowrap;
    }

    .ltl-toolbar__brand-name strong {
        font-weight: 850;
    }

    .ltl-toolbar__tool {
        display: flex;
        align-items: center;
        min-width: 0;
        gap: 11px;
        padding-left: 22px;
        border-left: 1px solid var(--border, #e5e7eb);
    }

    .ltl-toolbar__tool-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex: 0 0 auto;
        border-radius: 11px;
        background: color-mix(in srgb, var(--accent, #2563eb) 12%, var(--surface, #fff));
        color: var(--accent, #2563eb);
    }

    .ltl-toolbar__tool-icon svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .ltl-toolbar__tool-copy {
        display: flex;
        align-items: baseline;
        min-width: 0;
        gap: 12px;
    }

    .ltl-toolbar__tool-copy--with-lead {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 12px;
        row-gap: 2px;
    }

    .ltl-toolbar__tool-heading {
        grid-column: 1 / -1;
        display: flex;
        align-items: baseline;
        min-width: 0;
        gap: 0;
        margin: 0;
        font: inherit;
    }

    .ltl-toolbar__tool-name {
        flex: 0 0 auto;
        margin: 0;
        font-size: 1rem;
        font-weight: 800;
        letter-spacing: -0.01em;
    }

    .ltl-toolbar__tool-heading-separator {
        flex: 0 0 auto;
        color: var(--text-muted, #6b7280);
        font-size: 0.75rem;
        font-weight: 500;
    }

    .ltl-toolbar__tool-description {
        overflow: hidden;
        color: var(--text-muted, #6b7280);
        font-size: 0.75rem;
        font-weight: 500;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ltl-toolbar__tool-lead {
        grid-column: 1 / -1;
        min-width: 0;
        margin: 0;
        overflow: hidden;
        color: var(--text-muted, #6b7280);
        font-size: 0.6875rem;
        font-weight: 500;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ltl-toolbar__nav {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .ltl-toolbar__nav-item,
    .ltl-toolbar__action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 40px;
        padding: 0 11px;
        border: 1px solid transparent;
        border-radius: 11px;
        background: transparent;
        color: var(--text-muted, #6b7280);
        font: inherit;
        font-size: 0.75rem;
        font-weight: 650;
        text-decoration: none;
        cursor: pointer;
        transition:
            transform 0.16s ease,
            color 0.16s ease,
            background-color 0.16s ease,
            border-color 0.16s ease;
    }

    .ltl-toolbar__nav-item svg,
    .ltl-toolbar__action svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .ltl-toolbar__nav-item:hover,
    .ltl-toolbar__action:hover {
        transform: translateY(-1px);
        border-color: var(--border, #e5e7eb);
        background: var(--surface, #fff);
        color: var(--text, #111827);
    }

    .ltl-toolbar__nav-item:focus-visible,
    .ltl-toolbar__action:focus-visible {
        outline: 2px solid var(--accent, #2563eb);
        outline-offset: 2px;
    }

    .ltl-tool-footer {
        padding: 18px 0 0;
    }

    .ltl-tool-footer__links {
        gap: 6px 12px;
    }
}


@media (min-width: 1024px) {
    .ltl-toolbar__theme-moon {
        display: none;
    }

    html[data-theme='dark'] .ltl-toolbar__theme-sun {
        display: none;
    }

    html[data-theme='dark'] .ltl-toolbar__theme-moon {
        display: inline-flex;
    }

    .ltl-toolbar__theme-sun,
    .ltl-toolbar__theme-moon {
        align-items: center;
        justify-content: center;
    }
}
