.planned-map {
    height: 700px;
}

.current-tours {
    height: 700px;
    overflow-y: auto;
}

.planned-tours {
    height: 700px;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}

.anomaly-alert {
    color: #ff0000;
}

/**
 * The dnd-list should always have a min-height,
 * otherwise you can't drop to it once it's empty
 */
ul[dnd-list] {
    min-height: 42px;
    padding-left: 0px;
}

/**
 * The dndDraggingSource class will be applied to
 * the source element of a drag operation. It makes
 * sense to hide it to give the user the feeling
 * that he's actually moving it.
 */
ul[dnd-list] .dndDraggingSource {
    display: none;
}

/**
 * An element with .dndPlaceholder class will be
 * added to the dnd-list while the user is dragging
 * over it.
 */
ul[dnd-list] .dndPlaceholder {
    background-color: #ddd;
    display: block;
    min-height: 42px;
}

ul[dnd-list] li {
    background-color: #fff;
    border: 1px solid #ddd;
    border-top-right-radius: 4px;
    border-top-left-radius: 4px;
    display: block;
    padding: 10px 15px;
    margin-bottom: -1px;
}

/**
 * Show selected elements in green
 */
ul[dnd-list] li.selected {
    background-color: #dff0d8;
    color: #3c763d;
}

.panel-default-warning {
    background-color: #f0f00b;
}

.panel-default-error {
    background-color: #dc3545;
}

/* Resizable split container for multi-day planning */
.planning-split-container {
    display: flex;
    flex-direction: row;
    height: 700px;
    width: 100%;
}

.planning-split-container .planned-map {
    height: 100%;
}

.planning-split-container .planned-tours {
    height: 100%;
}

.planning-map-pane {
    width: 66.67%;
    min-width: 200px;
    flex-shrink: 0;
}

.planning-divider {
    flex: 0 0 8px;
    background: #d0d0d0;
    cursor: col-resize;
    z-index: 10;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.planning-divider:hover,
.planning-divider-active {
    background: #999;
}

.planning-divider::after {
    content: '⋮';
    color: #555;
    font-size: 16px;
    font-weight: bold;
    pointer-events: none;
}

.planning-days-pane {
    flex: 1 1 0;
    min-width: 150px;
    max-width: 2108px; /* 4 × 527px */
    overflow: hidden;
}

/* Prevent text selection during divider drag */
.planning-no-select {
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Multi-day planning panel */
.multi-day-planning-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.multi-day-global-controls {
    flex-shrink: 0;
}

.multi-day-panel {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.day-column {
    flex: 0 0 527px;
    width: 527px;
    padding: 0 6px;
    border-right: 1px solid #ddd;
    cursor: pointer;
    box-sizing: border-box;
    scroll-snap-align: start;
    overflow-y: auto;
    height: 100%;
}


.day-column:last-child {
    border-right: none;
}

.day-column-selected {
    background-color: #f0f8ff;
    border-left: 3px solid #337ab7;
}

.day-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px;
    margin-bottom: 4px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    border-radius: 3px 3px 0 0;
    flex-wrap: wrap;
    gap: 4px;
}

.day-column-header strong {
    font-size: 13px;
    flex: 1;
}

.day-cycle-marker {
    font-size: 16px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Remove focus outline on accordion headers */
.day-column .panel-heading a,
.day-column .panel-heading a:focus,
.day-column .panel-heading a:active {
    outline: none;
    box-shadow: none;
    text-decoration: none;
}

/* Tour heading row (accordion title) */
.tour-heading-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    width: 100%;
    font-size: 12px;
    font-family: monospace;
}

.tour-heading-row > span {
    padding: 0 5px;
    border-right: 1px solid #bbb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tour-heading-row > span:last-child {
    border-right: none;
}

/* Column widths for tour heading */
.th-desc  { flex: 1 1 0; min-width: 0; }
.th-date  { flex: 1 1 0; min-width: 0; }
.th-reg   { flex: 1 1 0; min-width: 0; }
.th-total { flex: 1 1 0; min-width: 0; text-align: right; font-weight: bold; }

/* Icons container - fixed, always reserves space so columns don't shift */
.th-icons {
    flex: 0 0 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    padding: 0 2px;
    border-right: none;
}

/* Remove old per-icon override */
.tour-heading-row > .glyphicon {
    flex: unset;
    min-width: unset;
    padding: unset;
    border-right: none;
}

/* Supplier table inside planned tour panels */
.supplier-table-wrapper {
    font-size: 12px;
}

.supplier-table-header,
.supplier-table-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
}

.supplier-table-row {
    padding: 0;
}

.supplier-table-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
    border-right: 1px solid #ddd;
    box-sizing: border-box;
}

.supplier-table-row span.sc-name,
.supplier-table-row span.sc-city {
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.3;
}

.supplier-table-row span:last-child {
    border-right: none;
}

/* Column widths */
.sc-id    { flex: 0 0 60px;  min-width: 60px; }
.sc-secid { flex: 0 0 55px;  min-width: 55px; }
.sc-total { flex: 0 0 65px;  min-width: 65px; text-align: right; }
.sc-name  { flex: 1 1 auto;  min-width: 60px; }
.sc-city  { flex: 0 0 100px; min-width: 70px; }
.sc-time  { flex: 0 0 46px;  min-width: 46px; text-align: center; }

/* Zebra stripes on li rows */
ul[dnd-list] li:nth-child(even) {
    background-color: #f9f9f9;
}

ul[dnd-list] li {
    padding: 2px 4px;
}

ul[dnd-list] li.selected {
    background-color: #dff0d8;
    color: #3c763d;
}

