/* Order system web app custom styles (Tabler supplement) */

/* Detail-page cards the current role cannot interact with (e.g. resign
   for non-managers): transparent + greyed, form fully inert */
.card-disabled {
    opacity: 0.5;
}

.card-disabled form {
    pointer-events: none;
}

/* Tabler 1.0 renders .nav-tabs as a segmented control (gray track behind
   the labels + raised white active tab), which reads as stray color blocks
   inside cards. Flatten it back to classic underline tabs app-wide. */
.nav-tabs {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.nav-tabs .nav-link {
    background: transparent;
    border: 0;
    border-radius: 0;
    margin-bottom: -1px;
    padding: 0.5rem 0.75rem;
    color: var(--tblr-secondary);
}

.nav-tabs .nav-link:hover {
    color: var(--tblr-primary);
}

.nav-tabs .nav-link.active {
    background: transparent;
    color: var(--tblr-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--tblr-primary);
}

/* Primary top tabs: slightly larger touch area */
.ord-primary-tabs .nav-link {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
}

/* Keep page min height with footer-less layout */
.page > .navbar + header {
    z-index: 1;
}

/* List cell ellipsis: show at most ~8 CJK chars, full text via the
   native title tooltip (browser shows it after ~1s hover) */
.ellipsis-8 {
    max-width: 8em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hover tip: fully shows the placeholder hint of an empty input after a
   1.5-second hover (global, positioned by the script in base.html) */
.hint-tip {
    position: fixed;
    z-index: 3000;
    max-width: 360px;
    padding: 0.35rem 0.6rem;
    background: #232e3c;
    color: #fff;
    font-size: 0.765625rem;
    line-height: 1.4;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    white-space: normal;
    word-break: break-all;
    pointer-events: none;
}

/* ==========================================================================
   Schedule view (FR-P400-HR-7, employee list page): searchable dropdown
   filters + month calendar + person gantt
   ========================================================================== */

/* Searchable dropdown (trigger button + floating panel with a first-row
   search input and an option list) */
.filter-dd {
    position: relative;
    display: inline-block;
}

.filter-dd .dd-toggle {
    min-width: 150px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.4;
    text-align: left;
    color: inherit;
    background: var(--tblr-bg-forms, #fff);
    border: 1px solid var(--tblr-border-color, rgba(4, 32, 69, 0.2));
    border-radius: 4px;
}

.filter-dd .dd-toggle::after {
    content: '\25BE';
    opacity: 0.6;
}

.filter-dd .dd-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1055;
    display: flex;
    flex-direction: column;
    width: 300px;
    max-width: 90vw;
    background: var(--tblr-bg-surface, #fff);
    border: 1px solid var(--tblr-border-color, rgba(4, 32, 69, 0.12));
    border-radius: 6px;
    box-shadow: 0 4px 18px rgba(9, 32, 77, 0.14);
}

.dd-search-wrap {
    padding: 0.5rem;
    border-bottom: 1px solid var(--tblr-border-color, rgba(4, 32, 69, 0.12));
}

.dd-options {
    max-height: 280px;
    overflow-y: auto;
}

.dd-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    text-align: left;
    border: 0;
    background: none;
    cursor: pointer;
}

.dd-option:hover {
    background: rgba(var(--tblr-primary-rgb), 0.06);
}

.dd-option.active {
    background: rgba(var(--tblr-primary-rgb), 0.1);
    font-weight: 600;
}

.dd-empty {
    padding: 0.75rem;
    color: var(--tblr-secondary);
    font-size: 0.8125rem;
}

.dd-footer {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-top: 1px solid var(--tblr-border-color, rgba(4, 32, 69, 0.12));
}

/* Month calendar */
.cal-table {
    margin-bottom: 0;
    table-layout: fixed;
}

.cal-table th {
    text-align: center;
    font-size: 0.75rem;
    color: var(--tblr-secondary);
}

.cal-table td {
    height: 84px;
    padding: 0.35rem;
    vertical-align: top;
}

.cal-we {
    background: rgba(var(--tblr-secondary-rgb), 0.06);
}

.cal-today {
    box-shadow: inset 0 0 0 2px var(--tblr-primary);
}

.cal-daynum {
    font-size: 0.8rem;
    font-weight: 600;
}

.cal-chip {
    display: inline-block;
    min-width: 20px;
    margin: 2px 2px 0 0;
    padding: 0 4px;
    border-radius: 4px;
    color: #fff;
    font-size: 0.7rem;
    line-height: 18px;
    text-align: center;
}

/* Person gantt: sticky name column + colored day cells */
.gantt-table {
    margin-bottom: 0;
}

.gantt-table th,
.gantt-table td {
    padding: 0.25rem 0.2rem;
    font-size: 0.78rem;
    text-align: center;
    white-space: nowrap;
}

.gantt-table .g-name {
    position: sticky;
    left: 0;
    z-index: 5;
    min-width: 110px;
    padding-left: 0.75rem;
    text-align: left;
    background: var(--tblr-bg-surface, #fff);
    box-shadow: 1px 0 0 var(--tblr-border-color, rgba(4, 32, 69, 0.12));
}

.g-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: baseline;
}

.g-cell {
    display: inline-block;
    min-width: 26px;
    padding: 2px 0;
    border-radius: 4px;
    color: #fff;
    font-size: 0.72rem;
    line-height: 16px;
    text-align: center;
}

.g-today {
    box-shadow: inset 0 0 0 2px var(--tblr-primary);
}
