/* Custom styles for TravelRequest app */
/* These extend the Enabel Bootstrap Theme */

:root {
    --font-size-small: 0.875rem;
}

/* Indented block with left border */
.indent {
    padding-left: var(--bs-spacer-3, 1rem);
    border-left: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
}

/* Timeline component */
.timeline {
    list-style: none;
    margin-bottom: 0;
    counter-reset: timeline-step;
}

.timeline > * {
    position: relative;
    border-left: var(--bs-border-width) dotted var(--bs-tertiary-color);
    padding: 0 0 1rem 2rem;
    counter-increment: timeline-step;
    color: var(--bs-tertiary-color);
}

.timeline > *:first-child {
    padding-top: 1rem;
}

.timeline > .complete {
    border-left: var(--bs-border-width) solid var(--bs-dark);
    color: var(--bs-dark);
}

.timeline > .halted {
    border-left: var(--bs-border-width) dotted var(--bs-tertiary-color);
    color: var(--bs-dark);
}

.timeline > .active {
    border-left: var(--bs-border-width) dotted var(--bs-tertiary-color);
    color: var(--bs-dark);
}

.timeline > *::before {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    border: var(--bs-border-width) dotted var(--bs-tertiary-color);
    background: var(--bs-white);
    border-radius: 50%;
    transform: translateX(calc(-50% - var(--bs-border-width) / 2));
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--bs-tertiary-color);
    content: counter(timeline-step);
}

.timeline > .active::before {
    border-color: var(--bs-secondary);
    background: var(--bs-secondary);
    color: var(--bs-white);
    border-style: solid;
    width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
    font-family: var(--fa-style-family-classic, "Font Awesome 7 Free");
    font-weight: var(--fa-style, 900);
    content: "\f252";
}

.timeline > .halted::before {
    border-color: var(--bs-danger);
    background: var(--bs-danger);
    color: var(--bs-white);
    border-style: solid;
    width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
    font-family: var(--fa-style-family-classic, "Font Awesome 7 Free");
    font-weight: var(--fa-style, 900);
    content: "\f023";
}

.timeline > .complete::before {
    border-color: var(--bs-dark);
    background: var(--bs-dark);
    color: var(--bs-white);
}

/* Clickable table rows */
table[data-controller="clickable-row"] tr:has(a[data-clickable-row-anchor]):hover {
    cursor: pointer;
}

/* Extra-small button — one step below btn-sm */
.btn-xs {
    --bs-btn-padding-y: 0.125rem;
    --bs-btn-padding-x: 0.375rem;
    --bs-btn-font-size: 0.75rem;
}

/* Section headers */
.section-header {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary);
    margin-bottom: 0.5rem;
}

.section-header-count {
    color: var(--bs-tertiary-color);
    margin-left: 0.25rem;
}

/* Compact definition lists inside cards */
.dl-list {
    display: grid;
    grid-template-columns: auto 1fr;
    margin: 0;
}

.dl-list > dt {
    padding: 0.35rem 0.75rem 0.35rem 0.75rem;
    margin-bottom: 0;
    text-align: right;
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-size: var(--font-size-small);
    border-bottom: 1px solid var(--bs-border-color-translucent);
    border-right: 1px solid var(--bs-border-color-translucent);
}

.dl-list > dd {
    padding: 0.35rem 0.5rem 0.35rem 0.5rem;
    margin-bottom: 0;
    font-size: var(--font-size-small);
    transition: background-color 0.15s ease;
}

.dl-list > dd:hover {
    background-color: var(--bs-tertiary-bg);
}

.dl-list > dt:last-of-type {
    border-bottom: 0;
}

/* Dropzone styling */
.dropzone-container {
    border: 2px dashed var(--bs-card-border-color);
    border-radius: var(--bs-border-radius);
}

/* Clickable card */
a.card {
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease-in-out;
}

a.card:hover {
    background: var(--bs-tertiary-bg);
}

/* Widget card — smaller base font size */
.card-widget {
    font-size: var(--font-size-small);
}

/* Leader dots — fills horizontal space between a label and a value */
.leader-dots {
    flex: 1;
    border-bottom: var(--bs-border-width) dotted var(--bs-border-color);
    min-width: 1rem;
}

.align-items-last-baseline {
    align-items: last baseline;
}
