/* Custom Styles for OneSource Webapp */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* Slightly denser Bootstrap defaults app-wide */
    --bs-card-spacer-y: 0.75rem;
    --bs-card-spacer-x: 0.75rem;
    --bs-table-cell-padding-y: 0.4rem;
    --bs-table-cell-padding-x: 0.5rem;
    --bs-nav-link-padding-y: 0.4rem;
    --bs-border-radius: 0.35rem;
}

/* Page chrome */
.page-content {
    margin-top: 1rem !important;
}

.page-header-actions,
.page-title-row {
    margin-bottom: 0.75rem !important;
    row-gap: 0.5rem;
}

/* Common title+actions rows that omit page-header-actions */
.page-content > .row > .col-12 > .d-flex.justify-content-between.mb-4 {
    margin-bottom: 0.75rem !important;
}

.page-header-actions .btn {
    min-height: 2.25rem;
}

/* Page titles: keep hierarchy without eating viewport */
.page-content > .row > .col-12 > h1,
.page-content > .row > .col-12 > .d-flex > h1,
.page-content h1.mb-0,
.page-content h1.mb-4 {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.75rem !important;
}

.page-content .page-header-actions h1,
.page-content .page-title-row h1 {
    margin-bottom: 0 !important;
}

/* Section headings inside cards */
.card-body > h5,
.card-body > .row > [class*="col"] > h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-header {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.card-header h5,
.card-header .h5 {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Stacked section cards: pull mt-4 / mb-4 chrome down one step */
.page-content .card.mt-4 {
    margin-top: 1rem !important;
}

.page-content .card.mb-4 {
    margin-bottom: 1rem !important;
}

/* Detail field tables (label/value pairs) */
.table.table-borderless > :not(caption) > * > * {
    padding-top: 0.28rem;
    padding-bottom: 0.28rem;
    padding-left: 0;
    padding-right: 0.75rem;
}

.table.table-borderless th {
    width: 9.5rem;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

/* Compact empty-state card bodies */
.card-body > p.text-muted.mb-0:only-child {
    margin: 0;
}

.navbar-brand {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.brand-logo {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: contain;
}

.login-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    display: block;
    margin: 0 auto 1rem;
}

.min-vh-100 {
    min-height: 100vh;
}

.line-add-form .form-control,
.line-add-form .form-select,
.line-add-form .btn {
    min-height: 2.5rem;
}

@media (max-width: 767px) {
    .line-add-form [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .page-header-actions {
        position: sticky;
        top: var(--os-header-offset, 48px);
        z-index: 1020;
        background: #fff;
        padding: 0.5rem 0;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        border-bottom: 1px solid #dee2e6;
    }

    .cv-toolbar .input-group {
        width: 100%;
        max-width: none !important;
    }

    .cv-toolbar .btn-group {
        width: 100%;
    }

    .cv-toolbar .btn-group .btn {
        flex: 1;
    }
}

.table-responsive {
    overflow-x: auto;
}

/* Session lock overlay */
#onesourceSessionLock {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(15, 23, 42, 0.72);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
#onesourceSessionLock.is-visible {
    display: flex;
}
body.os-session-locked {
    overflow: hidden;
}
.os-lock-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
}
.os-lock-brand {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.os-lock-hint {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.os-lock-seats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    max-height: 220px;
    overflow-y: auto;
}
.os-lock-seat {
    text-align: left;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
}
.os-lock-seat.is-selected {
    border-color: #0d6efd;
    background: #e7f1ff;
}
.os-lock-seat-name {
    display: block;
    font-weight: 600;
}
.os-lock-seat-meta {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Custom button styles */
.btn {
    border-radius: 0.375rem;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .navbar-nav .dropdown-menu {
        border: 1px solid rgba(0, 0, 0, 0.15);
    }
}

