/* Swipeclock projects index (chips layout) */

.sc-index-intro {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 1.5rem;
    color: #5a6570;
    font-size: 1.05rem;
    line-height: 1.5;
    font-weight: 400;
}

/* Brand-tinted MDB primary buttons */
.sc-index .btn-primary {
    --mdb-btn-bg: #003C5E;
    --mdb-btn-border-color: #003C5E;
    --mdb-btn-hover-bg: #00527f;
    --mdb-btn-hover-border-color: #00527f;
    --mdb-btn-focus-bg: #00527f;
    --mdb-btn-focus-border-color: #00527f;
    --mdb-btn-active-bg: #00527f;
    --mdb-btn-active-border-color: #00527f;
    background-color: #003C5E;
    border-color: #003C5E;
}

.sc-index .btn-primary:hover,
.sc-index .btn-primary:focus,
.sc-index .btn-primary:active {
    background-color: #00527f;
    border-color: #00527f;
}

/*
 * Per-product palette - shared by badges + chip filters.
 * --sc-prod: solid accent · --sc-prod-soft: tinted background · --sc-prod-ink: text on soft bg
 */
.vc-chip-btn--all { --sc-prod: #003C5E; --sc-prod-soft: rgba(0, 60, 94, 0.12); --sc-prod-ink: #003C5E; }
.vc-chip-btn--utilities,
.sc-prod-badge--utilities { --sc-prod: #0284c7; --sc-prod-soft: rgba(2, 132, 199, 0.22); --sc-prod-ink: #0369a1; }
.vc-chip-btn--support,
.sc-prod-badge--support { --sc-prod: #d97706; --sc-prod-soft: rgba(217, 119, 6, 0.2); --sc-prod-ink: #b45309; }
.vc-chip-btn--twp,
.sc-prod-badge--twp { --sc-prod: #0087c4; --sc-prod-soft: rgba(0, 135, 196, 0.18); --sc-prod-ink: #005f8a; }
.vc-chip-btn--ts,
.sc-prod-badge--ts { --sc-prod: #3b5bdb; --sc-prod-soft: rgba(59, 91, 219, 0.16); --sc-prod-ink: #2741a8; }
.vc-chip-btn--as,
.sc-prod-badge--as { --sc-prod: #0e7490; --sc-prod-soft: rgba(14, 116, 144, 0.16); --sc-prod-ink: #0a5569; }
.vc-chip-btn--hub,
.sc-prod-badge--hub { --sc-prod: #0f766e; --sc-prod-soft: rgba(15, 118, 110, 0.16); --sc-prod-ink: #0a564f; }
.vc-chip-btn--wfh,
.sc-prod-badge--wfh { --sc-prod: #15803d; --sc-prod-soft: rgba(21, 128, 61, 0.2); --sc-prod-ink: #0a5c28; }
.vc-chip-btn--fun,
.sc-prod-badge--fun { --sc-prod: #7c3aed; --sc-prod-soft: rgba(124, 58, 237, 0.16); --sc-prod-ink: #5b21b6; }
.vc-chip-btn--archived,
.sc-prod-badge--archived { --sc-prod: #6b7280; --sc-prod-soft: rgba(107, 114, 128, 0.18); --sc-prod-ink: #3f4654; }


.sc-index .vc-chip-btn {
    font-weight: 600;
    background-color: transparent;
    border: 1px solid var(--sc-prod, #003C5E);
    color: var(--sc-prod, #003C5E);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sc-index .vc-chip-btn:hover,
.sc-index .vc-chip-btn:focus {
    background-color: var(--sc-prod-soft, rgba(0, 60, 94, 0.1));
    border-color: var(--sc-prod, #003C5E);
    color: var(--sc-prod, #003C5E);
    box-shadow: none;
}

.sc-index .vc-chip-btn.active,
.sc-index .vc-chip-btn.active:hover,
.sc-index .vc-chip-btn.active:focus,
.sc-index .vc-chip-btn.active:focus-visible,
.sc-index .vc-chip-btn.active:active {
    background-color: var(--sc-prod, #003C5E) !important;
    border-color: var(--sc-prod, #003C5E) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.vc-toolbar {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: 0 auto 1.5rem;
    max-width: 56rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 60, 94, 0.1);
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 20px rgba(0, 40, 70, 0.06);
}

.vc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

/* QA index: section chips + product chips as two rows */
.vc-chips--rows {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.55rem;
}

.vc-chips__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.vc-toolbar .form-outline {
    max-width: 22rem;
    margin: 0.75rem auto 0;
}

.vc-meta {
    text-align: center;
    font-size: 0.82rem;
    color: #7a8691;
    margin: 0 0 1rem;
}

.vc-list {
    max-width: 56rem;
    margin: 0 auto 3.5rem;
    min-height: 28rem;
}

.vc-cat { margin-bottom: 1.75rem; }
.vc-list.is-all .vc-cat { margin-bottom: 2.75rem; }
.vc-list.is-all .vc-cat:last-of-type { margin-bottom: 1.75rem; }
.vc-cat.is-hidden { display: none; }

.vc-cat__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid rgba(0, 60, 94, 0.12);
}

.vc-cat__head h5 {
    margin: 0;
    text-transform: none;
    text-align: left;
    font-weight: 700;
    font-size: 1.1rem;
    color: #003C5E;
}

.vc-cat__head span { font-size: 0.8rem; color: #7a8691; }

.vc-tiles {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.vc-tile-wrap.is-hidden { display: none; }

.vc-empty {
    display: none;
    text-align: center;
    padding: 2.5rem 1rem;
    color: #8893a0;
}

.vc-empty.is-visible { display: block; }

/* Project tiles */
.sc-tile {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(0, 60, 94, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    isolation: isolate;
}

.sc-tile__hit {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.sc-tile__related {
    position: relative;
    z-index: 2;
}

.sc-tile:hover,
.sc-tile:has(.sc-tile__hit:focus-visible) {
    transform: translateY(-2px);
    border-color: rgba(0, 60, 94, 0.35);
    box-shadow: 0 8px 22px rgba(0, 40, 70, 0.1);
    background: #fff;
}

.sc-tile:has(.sc-tile__hit:focus-visible) {
    box-shadow: 0 0 0 3px rgba(0, 150, 200, 0.35), 0 8px 22px rgba(0, 40, 70, 0.1);
}

.sc-tile.is-disabled {
    cursor: default;
    opacity: 0.78;
}

.sc-tile.is-disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(0, 60, 94, 0.1);
}

.sc-tile__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.sc-tile__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #003C5E;
}

.sc-tile__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.sc-prod-badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.35em 0.65em;
    line-height: 1.2;
    background: var(--sc-prod-soft);
    color: var(--sc-prod-ink);
    border: 1px solid color-mix(in srgb, var(--sc-prod) 24%, transparent);
}

.sc-tile__desc {
    margin: 0;
    color: #5a6570;
    font-size: 0.9rem;
    line-height: 1.4;
}

.sc-tile__note {
    margin: 0.3rem 0 0;
    color: #6b7280;
    font-size: 0.82rem;
    font-style: italic;
}

.sc-tile__meta {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.sc-tile__open {
    position: relative;
    z-index: 2;
}

.sc-tile__open.is-muted {
    background: transparent !important;
    border: 0 !important;
    color: #777;
    box-shadow: none !important;
    font-style: italic;
    font-weight: 600;
    padding: 0.5rem 0;
    pointer-events: none;
}

.sc-tile:hover .sc-tile__open:not(.is-muted) .fa-arrow-right,
.sc-tile:has(.sc-tile__hit:focus-visible) .sc-tile__open:not(.is-muted) .fa-arrow-right {
    transform: translateX(3px);
}

.sc-tile__open .fa-arrow-right {
    display: inline-block;
    transition: transform 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
    .sc-tile,
    .sc-tile__open .fa-arrow-right {
        transition: none;
    }
}

@media (max-width: 767.98px) {
    /* Filters/search take too much viewport when sticky on small screens */
    .vc-toolbar {
        position: static;
        top: auto;
        z-index: auto;
        backdrop-filter: none;
    }

    .sc-tile {
        grid-template-columns: auto 1fr;
    }
    .sc-tile__meta {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

/* Dark mode */
html[data-theme="dark"] .sc-index-intro,
html[data-theme="dark"] .sc-tile__desc,
html[data-theme="dark"] .sc-tile__note {
    color: rgba(232, 238, 244, 0.72);
}

html[data-theme="dark"] .sc-tile {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .sc-tile:hover,
html[data-theme="dark"] .sc-tile:has(.sc-tile__hit:focus-visible) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(103, 186, 234, 0.55);
}

html[data-theme="dark"] .sc-tile.is-disabled:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .sc-tile__title {
    color: #f1f5f9;
}

html[data-theme="dark"] .sc-tile__open.is-muted {
    color: #9aa6b2;
}

html[data-theme="dark"] .sc-tile__related {
    color: #67BAEA;
}

html[data-theme="dark"] .sc-index .form-outline .trailing {
    color: #9aa6b2;
}

html[data-theme="dark"] .sc-index .btn-primary {
    --mdb-btn-bg: #2a7aa8;
    --mdb-btn-border-color: #2a7aa8;
    --mdb-btn-hover-bg: #3a8fb8;
    --mdb-btn-hover-border-color: #3a8fb8;
    --mdb-btn-focus-bg: #3a8fb8;
    --mdb-btn-focus-border-color: #3a8fb8;
    --mdb-btn-active-bg: #3a8fb8;
    --mdb-btn-active-border-color: #3a8fb8;
    background-color: #2a7aa8;
    border-color: #2a7aa8;
}

html[data-theme="dark"] .sc-index .btn-primary:hover,
html[data-theme="dark"] .sc-index .btn-primary:focus,
html[data-theme="dark"] .sc-index .btn-primary:active {
    background-color: #3a8fb8;
    border-color: #3a8fb8;
}

html[data-theme="dark"] .vc-chip-btn--all { --sc-prod: #67BAEA; --sc-prod-soft: rgba(103, 186, 234, 0.16); --sc-prod-ink: #9ad0f3; }
html[data-theme="dark"] .vc-chip-btn--utilities,
html[data-theme="dark"] .sc-prod-badge--utilities { --sc-prod: #38bdf8; --sc-prod-soft: rgba(56, 189, 248, 0.22); --sc-prod-ink: #7dd3fc; }
html[data-theme="dark"] .vc-chip-btn--support,
html[data-theme="dark"] .sc-prod-badge--support { --sc-prod: #fbbf24; --sc-prod-soft: rgba(251, 191, 36, 0.2); --sc-prod-ink: #fcd34d; }
html[data-theme="dark"] .vc-chip-btn--twp,
html[data-theme="dark"] .sc-prod-badge--twp { --sc-prod: #38bdf8; --sc-prod-soft: rgba(56, 189, 248, 0.18); --sc-prod-ink: #7dd3fc; }
html[data-theme="dark"] .vc-chip-btn--ts,
html[data-theme="dark"] .sc-prod-badge--ts { --sc-prod: #818cf8; --sc-prod-soft: rgba(129, 140, 248, 0.18); --sc-prod-ink: #a5b4fc; }
html[data-theme="dark"] .vc-chip-btn--as,
html[data-theme="dark"] .sc-prod-badge--as { --sc-prod: #22d3ee; --sc-prod-soft: rgba(34, 211, 238, 0.16); --sc-prod-ink: #67e8f9; }
html[data-theme="dark"] .vc-chip-btn--hub,
html[data-theme="dark"] .sc-prod-badge--hub { --sc-prod: #2dd4bf; --sc-prod-soft: rgba(45, 212, 191, 0.16); --sc-prod-ink: #5eead4; }
html[data-theme="dark"] .vc-chip-btn--wfh,
html[data-theme="dark"] .sc-prod-badge--wfh { --sc-prod: #4ade80; --sc-prod-soft: rgba(74, 222, 128, 0.22); --sc-prod-ink: #bbf7d0; }
html[data-theme="dark"] .vc-chip-btn--fun,
html[data-theme="dark"] .sc-prod-badge--fun { --sc-prod: #c084fc; --sc-prod-soft: rgba(192, 132, 252, 0.18); --sc-prod-ink: #d8b4fe; }
html[data-theme="dark"] .vc-chip-btn--archived,
html[data-theme="dark"] .sc-prod-badge--archived { --sc-prod: #9ca3af; --sc-prod-soft: rgba(156, 163, 175, 0.18); --sc-prod-ink: #d1d5db; }

html[data-theme="dark"] .sc-index .vc-chip-btn.active,
html[data-theme="dark"] .sc-index .vc-chip-btn.active:hover,
html[data-theme="dark"] .sc-index .vc-chip-btn.active:focus,
html[data-theme="dark"] .sc-index .vc-chip-btn.active:focus-visible,
html[data-theme="dark"] .sc-index .vc-chip-btn.active:active {
    color: #0f1c26 !important;
}

html[data-theme="dark"] .vc-toolbar {
    background: rgba(15, 28, 38, 0.94);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .vc-meta,
html[data-theme="dark"] .vc-empty,
html[data-theme="dark"] .vc-cat__head span {
    color: #9aa6b2;
}

html[data-theme="dark"] .vc-cat__head {
    border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .vc-cat__head h5 {
    color: #f1f5f9;
}
