/* NexWAYPOINT stylesheet -- trip itinerary builder + legs table
   Part of the css/ set loaded in order by public/_head_assets.php.
   Boundaries are contiguous line ranges; keep cascade order across files. */

/* Trip itinerary builder */
.trip-builder {
    max-width: min(1400px, 100%);
}

/* form.stack is 640px site-wide; legs need the full wide container. */
.trip-builder form.stack {
    max-width: none;
}

.trip-builder-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem 1.25rem 1.25rem;
    box-shadow: var(--shadow);
}

.trip-builder-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.trip-builder-header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
}

.trip-builder-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1rem;
    align-items: end;
}

.trip-builder-meta .checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 0.35rem;
}

.trip-legs-table {
    width: 100%;
    min-width: 68rem;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    table-layout: auto;
}

.trip-legs-table th,
.trip-legs-table td {
    padding: 0.4rem 0.4rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.trip-legs-table th {
    text-align: left;
    color: var(--text-dim);
    font-weight: 600;
    white-space: nowrap;
}

.trip-legs-table input,
.trip-legs-table select {
    width: 100%;
    min-width: 0;
    font-size: 0.85rem;
    padding: 0.35rem 0.4rem;
}

.trip-legs-table .leg-mode {
    min-width: 5.5rem;
}
.trip-legs-table .leg-carrier {
    min-width: 10rem;
}
.trip-legs-table .leg-flight {
    min-width: 4.5rem;
    max-width: 6rem;
}
.trip-legs-table .leg-origin,
.trip-legs-table .leg-dest {
    min-width: 4.25rem;
    max-width: 5.5rem;
}
.trip-legs-table.has-ground .leg-origin,
.trip-legs-table.has-ground .leg-dest {
    min-width: 8.5rem;
    max-width: 12rem;
}
.trip-legs-table .leg-ground-label,
.trip-legs-table .leg-manual-label,
.trip-legs-table .leg-miles {
    min-width: 6.5rem;
}
.trip-legs-table .leg-label-cell,
.trip-legs-table .leg-num-cell,
.trip-legs-table .leg-conf-cell {
    min-width: 0;
}
.trip-legs-table .leg-depart,
.trip-legs-table .leg-arrive {
    min-width: 11.5rem;
}
.trip-legs-table .leg-conf {
    min-width: 5.5rem;
    max-width: 7rem;
}

.leg-gap-hint {
    white-space: nowrap;
    font-size: 0.78rem;
    color: var(--text-dim);
    min-width: 6.5rem;
}

.leg-gap-hint.is-connection { color: var(--accent); }
.leg-gap-hint.is-stay { color: var(--yellow); }

.leg-row-actions {
    white-space: nowrap;
}

.leg-row-actions .linkish {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0.15rem 0.25rem;
}

.trip-stay-purposes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem 1rem;
    margin: 0.35rem 0 1rem;
}
.trip-stay-purposes-list label .hint { display: block; }

.trip-builder-section-title {
    margin: 1.1rem 0 0.4rem;
    font-size: 1rem;
    font-weight: 600;
}

.trip-hotels-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.trip-hotel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--input-bg);
    font-size: 0.9rem;
}

.trip-hotels-controls,
.trip-hotels-new-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 0.85rem;
    align-items: end;
    margin-bottom: 0.75rem;
}

.trip-hotels-controls label,
.trip-hotels-new-row label {
    flex: 1 1 160px;
}

.trip-builder-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.75rem;
}

@media (max-width: 900px) {
    .trip-legs-table .leg-gap-hint {
        display: none;
    }
}


