/* stationGroups.css
   Station Groups dropdown wired up by ui/stationGroupsPanel.js. Uses .modal-window (modals.css) as
   its base panel look, positioned as a fixed dropdown under the topbar's Groups button, same
   pattern as alerts.css/settings.css. */

.station-groups-panel {
    position: fixed;
    width: 380px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 10000;
    padding: 14px;
}

.station-groups-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: bold;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--panel-border);
}

.station-groups-subtitle {
    color: var(--text-muted, #9aa3ad);
    font-size: 11px;
    line-height: 1.35;
    padding: 8px 0;
    border-bottom: 1px solid var(--panel-border);
    margin-bottom: 8px;
}

.station-groups-back-btn {
    background: none;
    border: none;
    color: var(--mint);
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    padding: 0;
}

.station-groups-new-row,
.station-groups-add-row {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.station-groups-new-row input,
.station-groups-add-row input {
    flex: 1;
    min-width: 0;
}

.station-groups-new-row input,
.station-groups-new-row select,
.station-groups-add-row input,
.station-groups-add-row select,
.station-groups-new-row button,
.station-groups-add-row button,
.station-groups-edit-row input,
.station-groups-edit-row select,
.station-groups-desc-input,
.station-groups-bulk-box input,
.station-groups-bulk-box select,
.station-groups-bulk-box button,
.station-groups-bulk-box textarea,
.station-groups-member-row select,
.station-groups-member-row input {
    padding: 6px 8px;
    background: var(--btn-bg);
    color: var(--text-light);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    font-size: 12px;
}

.station-groups-new-row button,
.station-groups-add-row button,
.station-groups-bulk-box button {
    cursor: pointer;
    flex-shrink: 0;
}

.station-groups-new-row button:hover,
.station-groups-add-row button:hover,
.station-groups-bulk-box button:hover {
    background: var(--btn-hover);
}

.station-groups-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.station-groups-row,
.station-groups-member-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px solid var(--panel-border);
}

.station-groups-row-body {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.station-groups-row-name {
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.station-groups-row-meta {
    color: #888;
    font-size: 11px;
}

.station-groups-reorder-btns {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.station-groups-reorder-btns button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 8px;
    line-height: 1;
    padding: 1px 2px;
}

.station-groups-reorder-btns button:hover:not(:disabled) {
    color: var(--text-light);
}

.station-groups-reorder-btns button:disabled {
    opacity: 0.25;
    cursor: default;
}

.station-groups-pin-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    padding: 0 2px;
}

.station-groups-pin-btn.is-pinned {
    color: #ffb400;
}

.station-groups-icon-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
    padding: 0 2px;
}

.station-groups-copy-btn {
    font-size: 11px;
}

.station-groups-icon-btn:hover {
    color: var(--text-light);
}

.station-groups-remove-btn:hover {
    color: #ff8080;
}

.station-groups-empty {
    font-size: 12px;
    color: #888;
    padding: 4px 0;
}

.station-groups-edit-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.station-groups-edit-row input {
    flex: 1;
    min-width: 0;
    font-weight: bold;
}

.station-groups-desc-input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.station-groups-link-btn {
    background: none;
    border: none;
    color: var(--mint);
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    margin-bottom: 6px;
}

.station-groups-bulk-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid var(--panel-border);
    border-radius: 4px;
}

.station-groups-bulk-box textarea {
    resize: vertical;
    font-family: inherit;
}

.station-groups-bulk-report {
    font-size: 11px;
    color: #888;
}

.station-groups-members {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.station-groups-member-icao {
    font-weight: bold;
    flex-shrink: 0;
    width: 44px;
}

.station-groups-member-notes {
    flex: 1;
    min-width: 0;
}

.station-groups-level-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.station-groups-rollup-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--panel-border);
}

.station-groups-rollup-unavailable {
    color: #888;
}

.station-groups-rollup-note {
    flex-basis: 100%;
    font-size: 10px;
    color: #888;
}

.station-groups-status {
    font-size: 11px;
    color: var(--mint);
}

.station-groups-status.station-groups-status-error {
    color: #ff8080;
}

@media (max-width: 700px) {
    .station-groups-panel {
        left: 6px !important;
        max-height: calc(100vh - var(--topbar-h) - var(--timeline-h) - 18px);
        right: 6px !important;
        width: auto;
    }
}
