/* INFO PANEL
   Structured metadata panel. Wrap in .tt-card for the box treatment.
*/

.tt-info-panel {
    padding: 0.875rem;
}

/* When nested directly inside a card, the card already provides padding */
.tt-card > .tt-info-panel {
    padding: 0;
}

/* Header: optional icon + title/subtitle stack */
.tt-info-panel-header {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-muted);
}

.tt-info-panel-header-icon {
    color: var(--text-muted);
    padding-top: 0.15rem;
    flex-shrink: 0;
}

.tt-info-panel-header-text {
    min-width: 0;
}

.tt-info-panel-title {
    font-size: var(--step-1);
    line-height: 1.15;
    word-break: break-word;
}

.tt-info-panel-subtitle {
    font-size: var(--step--1);
}

/* A section of labeled items, separated by a border */
.tt-info-panel-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-muted);
}

.tt-info-panel-item {
    min-width: 100px;
}

.tt-info-panel-item--wide {
    min-width: 120px;
}

.tt-info-panel-section--fill > .tt-info-panel-item {
    flex: 1;
}

.tt-info-panel-label {
    font-size: var(--step--2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.1rem;
    color: var(--text-muted);
}

.tt-info-panel-value {
    font-size: var(--step--1);
}

/* Action buttons row — wrapping by default */
.tt-info-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    justify-content: space-between;
}


/* ─── SIDEBAR LAYOUT ──────────────────────────────────────────────────────────
   Two-column grid: fixed-width sidebar + fluid main content area.
   Stacked single-column by default; apply a breakpoint modifier to activate
   the split. When active, info-panel actions become stacked full-width buttons.

   Usage: <div class="tt-sidebar-layout tt-sidebar-layout--md">
   ────────────────────────────────────────────────────────────────────────── */

.tt-sidebar-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

/* 580px — compact sidebar (200px) */
@media (min-width: 580px) {
    .tt-sidebar-layout--sm {
        grid-template-columns: 200px 1fr;
    }

    .tt-sidebar-layout--sm .tt-info-panel-actions {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .tt-sidebar-layout--sm .tt-info-panel-actions .tt-btn {
        width: 100%;
        justify-content: center;
    }

    .tt-sidebar-layout--sm .tt-info-panel-actions .tt-btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.375rem;
    }

    .tt-sidebar-layout--sm .tt-info-panel-actions .tt-btn-group > .tt-btn {
        border-radius: var(--button-radius-sm);
    }
}

/* 720px — standard sidebar (240px) */
@media (min-width: 720px) {
    .tt-sidebar-layout--md {
        grid-template-columns: 240px 1fr;
    }

    .tt-sidebar-layout--md .tt-info-panel-actions {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .tt-sidebar-layout--md .tt-info-panel-actions .tt-btn {
        width: 100%;
        justify-content: center;
    }

    .tt-sidebar-layout--md .tt-info-panel-actions .tt-btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.375rem;
    }

    .tt-sidebar-layout--md .tt-info-panel-actions .tt-btn-group > .tt-btn {
        border-radius: var(--button-radius-sm);
    }
}

/* 960px — wide sidebar (280px) */
@media (min-width: 960px) {
    .tt-sidebar-layout--lg {
        grid-template-columns: 280px 1fr;
    }

    .tt-sidebar-layout--lg .tt-info-panel-actions {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .tt-sidebar-layout--lg .tt-info-panel-actions .tt-btn {
        width: 100%;
        justify-content: center;
    }

    .tt-sidebar-layout--lg .tt-info-panel-actions .tt-btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.375rem;
    }

    .tt-sidebar-layout--lg .tt-info-panel-actions .tt-btn-group > .tt-btn {
        border-radius: var(--button-radius-sm);
    }
}

/* 1200px — extra-wide sidebar (300px) */
@media (min-width: 1200px) {
    .tt-sidebar-layout--xl {
        grid-template-columns: 300px 1fr;
    }

    .tt-sidebar-layout--xl .tt-info-panel-actions {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .tt-sidebar-layout--xl .tt-info-panel-actions .tt-btn {
        width: 100%;
        justify-content: center;
    }

    .tt-sidebar-layout--xl .tt-info-panel-actions .tt-btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.375rem;
    }

    .tt-sidebar-layout--xl .tt-info-panel-actions .tt-btn-group > .tt-btn {
        border-radius: var(--button-radius-sm);
    }
}
