/* Shared modal tab bar component.
 *
 * This is the single visual contract for entity modal tabs across Events,
 * Timelines, Artifacts, People, and Keepsakes. Legacy classes remain in the
 * markup only as behavior hooks; dimensions and active styling belong here.
 */

.yrh-modal-tabs {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 1px !important;
    width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 var(--panel-space-6, 24px) !important;
    border-bottom: 1px solid var(--panel-border-subtle, var(--color-border-light, rgba(0, 0, 0, 0.08))) !important;
    background: transparent !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

/* Timeline create/edit/info still keep legacy title-as-content placeholders
 * before the tab row for the iPhone full-page sheet. On tablet and desktop
 * those placeholders must not participate in layout; otherwise the Timeline
 * tab area appears taller than Event/Artifact/People/Keepsakes even when the
 * tab row itself has identical computed dimensions.
 */
html:not(.yrh-shell-phone) #timelineModalContentTitle,
html:not(.yrh-shell-phone) #editTimelineModalContentTitle,
html:not(.yrh-shell-phone) #timelineInfoContentTitle {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

.yrh-modal-tabs::-webkit-scrollbar {
    display: none;
}

.yrh-modal-tab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 47px !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 3px solid transparent !important;
    border-radius: var(--panel-radius-sm, 6px) var(--panel-radius-sm, 6px) 0 0 !important;
    color: var(--panel-text-muted, var(--color-text-muted)) !important;
    font-size: var(--panel-font-body-size, 1rem) !important;
    font-weight: var(--font-weight-semibold) !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.yrh-modal-tab.active,
.yrh-modal-tab.tm-tab-active,
.yrh-modal-tab.tm-edit-tab-active {
    color: var(--panel-text, var(--color-text-primary)) !important;
    border-bottom-color: var(--panel-accent, var(--color-primary)) !important;
}

.yrh-modal-tab.disabled,
.yrh-modal-tab:disabled,
.yrh-modal-tab[aria-disabled="true"] {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    color: var(--panel-text-muted, var(--color-text-muted)) !important;
}

@media (hover: hover) and (pointer: fine) {
    .yrh-modal-tab:hover:not(:disabled):not(.disabled):not([aria-disabled="true"]) {
        color: var(--panel-text, var(--color-text-primary)) !important;
        background: var(--panel-surface-muted, var(--color-surface-4)) !important;
    }
}