/* ── Tools & resources side sheet (right only) ── */
.bc-tools-trigger {
    --ts-ocean: #e8822a;
    --ts-midnight: #1c1e24;
    --ts-ice: var(--bc-light, #e8e2d9);

    position: fixed;
    top: 50%;
    right: 0;
    z-index: 1210;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 3.5rem;
    padding: 0;
    border: 1px solid rgba(232, 226, 217, 0.55);
    border-right: none;
    border-radius: 0.75rem 0 0 0.75rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(40, 34, 28, 0.45);
    box-shadow: 0 4px 18px rgba(40, 34, 28, 0.08);
    cursor: pointer;
    opacity: 0.38;
    transform: translateY(-50%);
    transition:
        opacity 0.32s ease,
        color 0.32s ease,
        background 0.32s ease,
        border-color 0.32s ease,
        box-shadow 0.32s ease,
        transform 0.32s ease;
}

.bc-tools-trigger svg {
    width: 1rem;
    height: 1rem;
}

.bc-tools-trigger:hover,
.bc-tools-trigger:focus-visible {
    opacity: 0.96;
    color: var(--ts-ocean);
    background: rgba(255, 253, 250, 0.96);
    border-color: rgba(232, 130, 42, 0.28);
    box-shadow: 0 8px 24px rgba(232, 130, 42, 0.14);
    outline: none;
}

.bc-tools-trigger.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(0.92);
}

.bc-tools-sheet {
    position: fixed;
    inset: 0;
    z-index: 1220;
    pointer-events: none;
    visibility: hidden;
}

.bc-tools-sheet.is-open {
    pointer-events: auto;
    visibility: visible;
}

.bc-tools-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(40, 34, 28, 0.08);
    opacity: 0;
    transition: opacity 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

.bc-tools-sheet.is-open .bc-tools-sheet__backdrop {
    opacity: 1;
}

.bc-tools-sheet__panel {
    position: fixed;
    top: 50%;
    right: 0;
    width: min(23.5rem, calc(100% - 1.5rem));
    max-height: min(calc(100dvh - 2rem), 38rem);
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-right: none;
    border-radius: 1.5rem 0 0 1.5rem;
    background:
        radial-gradient(120% 60% at 100% 0%, rgba(245, 166, 35, 0.16) 0%, transparent 62%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 250, 243, 0.98) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        -18px 0 48px rgba(60, 50, 40, 0.16),
        0 0 0 1px rgba(255, 255, 255, 0.7) inset;
    opacity: 0;
    transform: translate(calc(100% + 0.75rem), -50%);
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.32s ease;
    will-change: transform, opacity;
}

.bc-tools-sheet.is-open .bc-tools-sheet__panel {
    opacity: 1;
    transform: translate(0, -50%);
}

.bc-tools-sheet__head {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1.125rem;
    background: linear-gradient(180deg, rgba(255, 244, 232, 0.9) 0%, rgba(255, 255, 255, 0) 100%);
    flex-shrink: 0;
}

.bc-tools-sheet__head::after {
    content: '';
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(232, 130, 42, 0.35), rgba(232, 226, 217, 0.15));
}

.bc-tools-sheet__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.5rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b3610f;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.2) 0%, rgba(232, 130, 42, 0.12) 100%);
    border: 1px solid rgba(232, 130, 42, 0.25);
    border-radius: 999px;
}

.bc-tools-sheet__title {
    margin: 0 0 0.3rem;
    font-size: 1.1875rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1c1e24;
    line-height: 1.2;
}

.bc-tools-sheet__desc {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #6b7280;
}

.bc-tools-sheet__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    border: 1px solid rgba(232, 226, 217, 0.9);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #6b7280;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.bc-tools-sheet__close svg {
    width: 1rem;
    height: 1rem;
}

.bc-tools-sheet__close:hover {
    color: #b3610f;
    border-color: rgba(232, 130, 42, 0.45);
    background: rgba(255, 244, 232, 0.95);
    transform: rotate(90deg);
}

.bc-tools-sheet__body {
    padding: 1rem 1.25rem 0.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 130, 42, 0.35) transparent;
}

.bc-tools-sheet__body::-webkit-scrollbar {
    width: 6px;
}

.bc-tools-sheet__body::-webkit-scrollbar-thumb {
    background: rgba(232, 130, 42, 0.3);
    border-radius: 999px;
}

.bc-tools-sheet__body::-webkit-scrollbar-track {
    background: transparent;
}

.bc-tools-sheet__search {
    position: relative;
    margin-bottom: 1rem;
}

.bc-tools-sheet__search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a3a09b;
    pointer-events: none;
}

.bc-tools-sheet__search-icon svg {
    width: 1rem;
    height: 1rem;
}

.bc-tools-sheet__input {
    width: 100%;
    height: 2.75rem;
    padding: 0 0.875rem 0 2.5rem;
    font-size: 0.8125rem;
    line-height: 2.75rem;
    color: #1c1e24;
    background: #fff;
    border: 1px solid rgba(232, 226, 217, 0.95);
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(40, 34, 28, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bc-tools-sheet__input::placeholder {
    color: #a3a09b;
}

.bc-tools-sheet__input:focus {
    outline: none;
    border-color: rgba(232, 130, 42, 0.45);
    box-shadow: 0 0 0 3px rgba(232, 130, 42, 0.12);
}

.bc-tools-sheet__search:focus-within .bc-tools-sheet__search-icon {
    color: #e8822a;
}

.bc-tools-sheet__results {
    display: none;
    margin-top: 0.5rem;
    max-height: 10rem;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e8e2d9;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(40, 34, 28, 0.08);
}

.bc-tools-sheet__results.is-visible {
    display: block;
}

.bc-tools-sheet__result {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    text-decoration: none;
    color: #1c1e24;
    border-bottom: 1px solid rgba(232, 226, 217, 0.65);
    transition: background 0.18s ease;
}

.bc-tools-sheet__result:last-of-type:not(.bc-tools-sheet__view-all) {
    border-bottom: none;
}

.bc-tools-sheet__result-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.bc-tools-sheet__result-copy small {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #e8822a;
}

.bc-tools-sheet__result-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    background: rgba(232, 130, 42, 0.08);
    color: #e8822a;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.bc-tools-sheet__view-all {
    display: block;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #e8822a;
    text-decoration: none;
    border-top: 1px solid rgba(232, 226, 217, 0.65);
    background: rgba(232, 130, 42, 0.04);
}

.bc-tools-sheet__view-all:hover {
    background: rgba(232, 130, 42, 0.08);
}

.bc-tools-sheet__result:hover,
.bc-tools-sheet__result.is-active {
    background: rgba(232, 130, 42, 0.06);
}

.bc-tools-sheet__result img {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
    border-radius: 0.375rem;
    border: 1px solid #e8e2d9;
    background: #fff;
}

.bc-tools-sheet__result span {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
}

.bc-tools-sheet__empty {
    padding: 0.75rem;
    font-size: 0.8125rem;
    color: #6b7280;
    text-align: center;
}

.bc-tools-sheet__section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.625rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8177;
}

.bc-tools-sheet__section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(232, 226, 217, 0.9), transparent);
}

.bc-tools-sheet__links {
    display: grid;
    gap: 0.5rem;
}

.bc-tools-sheet__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6875rem 2rem 0.6875rem 0.75rem;
    text-decoration: none;
    color: #1c1e24;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(232, 226, 217, 0.85);
    border-radius: 0.875rem;
    box-shadow: 0 1px 3px rgba(60, 50, 40, 0.04);
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        background 0.22s ease;
}

/* chevron hint, revealed on hover */
.bc-tools-sheet__link::after {
    content: '';
    position: absolute;
    right: 0.9rem;
    top: 50%;
    width: 0.4rem;
    height: 0.4rem;
    border-right: 2px solid rgba(232, 130, 42, 0.9);
    border-bottom: 2px solid rgba(232, 130, 42, 0.9);
    opacity: 0;
    transform: translate(-0.25rem, -50%) rotate(-45deg);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.bc-tools-sheet__link:hover {
    transform: translateX(-3px);
    border-color: rgba(232, 130, 42, 0.4);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 244, 232, 0.96) 100%);
    box-shadow: 0 10px 22px rgba(232, 130, 42, 0.12);
}

.bc-tools-sheet__link:hover::after {
    opacity: 1;
    transform: translate(0, -50%) rotate(-45deg);
}

.bc-tools-sheet__link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f5a623 0%, #e8822a 100%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    font-size: 0.8125rem;
    box-shadow: 0 4px 10px rgba(232, 130, 42, 0.28);
}

.bc-tools-sheet__link-icon--warn {
    background: linear-gradient(135deg, #ef6a5e 0%, #b42318 100%);
    box-shadow: 0 4px 10px rgba(180, 35, 24, 0.26);
    color: #fff;
}

.bc-tools-sheet__link-text strong {
    display: block;
    font-size: 0.8375rem;
    font-weight: 700;
    line-height: 1.3;
}

.bc-tools-sheet__link-text small {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.6875rem;
    color: #6b7280;
    line-height: 1.35;
}

/* pinned footer so the CTA stays visible while the list scrolls */
.bc-tools-sheet__foot {
    position: relative;
    flex-shrink: 0;
    padding: 0.875rem 1.25rem 1.125rem;
    background: linear-gradient(180deg, rgba(255, 250, 243, 0) 0%, rgba(255, 250, 243, 0.98) 45%);
}

.bc-tools-sheet__foot::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(232, 130, 42, 0.28), rgba(232, 226, 217, 0.12));
}

.bc-tools-sheet__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8125rem 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1c1e24;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(232, 130, 42, 0.32);
    border-radius: 999px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 8px 24px rgba(60, 50, 40, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.bc-tools-sheet__cta:hover {
    color: #1c1e24;
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(232, 130, 42, 0.55);
    transform: translateY(-1px);
    box-shadow:
        0 12px 28px rgba(232, 130, 42, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.bc-tools-sheet__cta svg {
    transition: transform 0.22s ease;
}

.bc-tools-sheet__cta:hover svg {
    transform: translateX(3px);
}

@media (max-width: 767px) {
    .bc-tools-trigger {
        width: 1.75rem;
        height: 2.75rem;
        opacity: 0.28;
    }

    .bc-tools-trigger svg {
        width: 0.875rem;
        height: 0.875rem;
    }

    .bc-tools-sheet__panel {
        top: auto;
        bottom: 0;
        max-height: min(88dvh, 36rem);
        width: 100%;
        border-radius: 1.5rem 1.5rem 0 0;
        border-right: 1px solid rgba(255, 255, 255, 0.85);
        transform: translateY(calc(100% + 1rem));
    }

    .bc-tools-sheet.is-open .bc-tools-sheet__panel {
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bc-tools-trigger,
    .bc-tools-sheet__panel,
    .bc-tools-sheet__backdrop,
    .bc-tools-sheet__link,
    .bc-tools-sheet__cta {
        transition: none;
    }

    .bc-tools-sheet__link:hover,
    .bc-tools-sheet__cta:hover {
        transform: none;
    }
}
