/*
 * Earth Explorer - Styles
 * Clean shell layout for Mission Control and Photo Gallery
 */

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #111;
    color: #eee;
    height: 100vh;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

#explorer {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-width: 1440px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISSION CONTROL - Fixed at top
   ═══════════════════════════════════════════════════════════════════════════ */

#mission-control {
    flex-shrink: 0;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 8px;
}

.mc-row {
    display: flex;
    gap: 12px;
    padding: 6px 0;
    align-items: center;
}

/* Row-specific border styles removed after reorder */

.mc-row-label {
    color: #ffcc00;
    font-weight: bold;
    font-size: 16px;
    min-width: 50px;
}

.mc-title {
    color: #ffcc00;
    font-weight: bold;
    font-size: 22px;
    letter-spacing: 1px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

.mc-branding-text {
    color: #ffffff;
    font-size: 14px;
    text-align: center;
    line-height: 1.3;
    width: 220px;
    white-space: nowrap;
    flex-shrink: 0;
}

.mc-subtitle-blue {
    color: #88ccff;
}

.mc-row-label.mc-section-divider {
    border-left: 1px solid #666;
    padding-left: 12px;
    margin-left: 24px;
}

.mc-divider {
    border-left: 1px solid #666;
    height: 20px;
    margin: 0 12px;
}

.group-type-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.group-type-label {
    font-size: 12px;
    color: #555;
}

.group-type-label.active {
    color: #88ccff;
    font-weight: bold;
}

/* Play button (green, white text when active) */
.nav-btn.animate-btn {
    background: #2a5a2a;
    border-color: #4a4;
    color: #fff;
}

.nav-btn.animate-btn:hover {
    background: #3a6a3a;
    border-color: #6c6;
    color: #fff;
}

.nav-btn.animate-btn.disabled {
    background: #333;
    border-color: #444;
    color: #666;
    cursor: default;
}

.nav-btn.animate-btn.disabled:hover {
    background: #333;
    border-color: #444;
    color: #666;
}

/* Stop button (red) */
#animate-stop-btn {
    background: #5a2a2a;
    border-color: #a44;
    color: #fff;
}

#animate-stop-btn:hover {
    background: #6a3a3a;
    border-color: #c66;
    color: #fff;
}

/* FPS display during animation */
.fps-display {
    color: #888;
    font-size: 0.85em;
    margin-left: 8px;
    min-width: 55px;
    display: inline-block;
}

/* Row 1 elements */
.mc-logo {
    min-width: 120px;
}

.logo-text {
    color: #ffcc00;
    font-weight: bold;
    font-size: 14px;
}

.mc-map,
.mc-calendar {
    flex: 1;
}

/* Row 2 elements */
.mc-select-astronaut label,
.mc-select-expedition label {
    display: block;
    font-size: 10px;
    color: #888;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.mc-select-astronaut select,
.mc-select-expedition select {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    background: #222;
    color: #eee;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
}

.mc-select-astronaut select:hover,
.mc-select-expedition select:hover {
    border-color: #666;
}

.mc-select-astronaut select:focus,
.mc-select-expedition select:focus {
    outline: none;
    border-color: #ffcc00;
}

.mc-special-filters > label {
    display: block;
    font-size: 10px;
    color: #888;
    margin-bottom: 2px;
    text-transform: uppercase;
}

/* Row 3 elements */
.mc-animate {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Stub styling */
.stub {
    color: #888;
    font-size: 12px;
    padding: 4px 8px;
    border: 1px dashed #444;
    border-radius: 4px;
    display: inline-block;
}

/* Status Bar - Full State View */
.mc-status {
    padding: 8px 12px;
    margin-top: 8px;
    background: #1a1a0a;
    border: 1px solid #444400;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    color: #aaaaaa;
}

.debug-layout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.debug-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.debug-row {
    display: flex;
}

.debug-col-1 {
    width: 120px;
    white-space: nowrap;
}

.debug-col-2 {
    width: 250px;
    white-space: nowrap;
}

.debug-col-3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHOTO GALLERY - Scrollable area below
   ═══════════════════════════════════════════════════════════════════════════ */

#photo-gallery {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 16px 0;
    background: #0a0a0a;
}

.pg-list {
    list-style: none;
    columns: 6;
    column-gap: 20px;
}

.pg-list li {
    font-size: 13px;
    color: #aaa;
    padding: 4px 0;
    break-inside: avoid;
}

.pg-empty {
    color: #666;
    font-style: italic;
}

.pg-more {
    color: #888;
    font-style: italic;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #333;
}

.pg-large-photo {
    font-size: 18px;
    color: #ffcc00;
    text-align: center;
    padding: 40px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GALLERY LINKS
   ═══════════════════════════════════════════════════════════════════════════ */

.pg-list a {
    color: #aaa;
    text-decoration: none;
    cursor: pointer;
    display: block;
}

.pg-list a:hover {
    color: #ffcc00;
}

.pg-group-header {
    color: #ffcc00;
    font-size: 14px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.pg-large-header {
    color: #ffcc00;
    font-size: 18px;
    text-align: center;
}

.pg-large-info {
    color: #888;
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAV BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.mc-nav-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* All Groups button */
.nav-btn {
    color: #aaa;
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    background: #333;
}

.nav-btn:hover {
    color: #ffcc00;
    background: #333;
    border-color: #666;
}

.nav-btn.active {
    color: #88ccff;
    border-color: #ffcc00;
    cursor: default;
}

/* Group and Photo containers */
.nav-group,
.nav-photo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border: 1px solid #444;
    border-radius: 4px;
}

.nav-group.active,
.nav-photo.active {
    border-color: #ffcc00;
}

.nav-group.disabled,
.nav-photo.disabled {
    border-color: #333;
}

/* Labels */
.nav-label {
    color: #aaa;
    font-size: 12px;
}

.nav-group.active .nav-label,
.nav-photo.active .nav-label {
    color: #88ccff;
}

.nav-label.disabled {
    color: #555;
}

/* Clickable label (Group label in LARGE view) */
.nav-link {
    color: #aaa;
    text-decoration: none;
}

.nav-link:hover {
    color: #ffcc00;
}

/* Arrows */
.nav-arrow {
    color: #ffcc00;
    text-decoration: none;
    font-size: 14px;
    padding: 2px 6px;
    cursor: pointer;
}

.nav-arrow:hover {
    background: #333;
    border-radius: 2px;
}

.nav-arrow.disabled {
    color: #444;
    cursor: default;
}

.nav-arrow.disabled:hover {
    background: transparent;
}

.nav-group-type {
    margin-left: 20px;
    font-size: 28px;
    font-weight: bold;
}

.nav-group-type.movie {
    color: #ffcc00;
}

.nav-group-type.cluster {
    color: #88ccff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CALENDAR TIMELINE
   ═══════════════════════════════════════════════════════════════════════════ */

.calendar-container {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    height: 48px;
    padding: 4px 0;
}

.calendar-count-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    height: 42px;
}

.calendar-count {
    color: #ffcc00;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.calendar-year-label {
    color: #eee;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.calendar-end-year {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 42px;
}

.calendar-end-year .calendar-year-label {
    margin-left: 0;
}

.calendar-timeline-wrapper {
    flex: 1;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.calendar-timeline {
    height: 24px;
    background: #444444;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    overflow: visible;
}

.calendar-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.calendar-marker {
    stroke: #ffcc00;
    stroke-width: 1;
    opacity: 0.7;
}

.calendar-marker:hover {
    opacity: 1;
    stroke-width: 2;
}

.calendar-current {
    fill: #ff4444;
}

.calendar-intervals {
    position: relative;
    height: 18px;
    margin-top: 2px;
}

.calendar-interval-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

.calendar-empty {
    color: #555;
    font-size: 12px;
    font-style: italic;
    flex: 1;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGO AREA
   ═══════════════════════════════════════════════════════════════════════════ */

.mc-logo-area {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 280px;
    padding: 0 15px;
}

.logo-title {
    color: #ffcc00;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-align: center;
}

.logo-image {
    height: 200px;
    width: auto;
}

.logo-image-placeholder {
    height: 200px;
    width: 200px;
    border: 1px dashed #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 10px;
}

.logo-org {
    color: #aaa;
    font-size: 0.95rem;
    text-align: center;
    margin-top: 8px;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAP + CALENDAR STACKED CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */

.mc-map-calendar {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    width: fit-content;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ASTRONAUT INFO
   ═══════════════════════════════════════════════════════════════════════════ */

.mc-astro-info {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    width: 220px;
    height: 223px;
    background-color: #252525;
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
}

.mc-section-header {
    color: #ffcc00;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-align: center;
    padding-bottom: 5px;
    border-bottom: 1px solid #444;
    margin-bottom: 8px;
}

.astro-photo {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.astro-photo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.astro-name-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    color: #ffcc00;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-align: center;
    padding: 5px 0;
    background: rgba(0, 0, 0, 0.5);
}

.astro-photo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHOTO INFO
   ═══════════════════════════════════════════════════════════════════════════ */

.mc-photo-info {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    width: 210px;
    height: 223px;
    background-color: #252525;
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
}

.photo-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.photo-detail-row {
    color: #aaa;
    font-size: 0.85rem;
}

.photo-caption {
    color: #aaa;
    font-size: 0.85rem;
    margin-top: 12px;
    line-height: 1.5;
    text-align: center;
}

.photo-empty {
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FAVS (Compact inline for row 3)
   ═══════════════════════════════════════════════════════════════════════════ */

.mc-favs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fav-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 8px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #252525;
}

.fav-filter-checkbox:hover {
    background: #333;
    border-color: #666;
}

.fav-filter-checkbox input[type="checkbox"] {
    cursor: pointer;
}

.fav-filter-label {
    font-size: 0.75rem;
    color: #aaa;
}

.fav-filter-select,
.fav-who-select {
    padding: 4px 8px;
    font-size: 13px;
    background: #222;
    color: #eee;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
}

.fav-filter-select:hover:not(:disabled),
.fav-who-select:hover:not(:disabled) {
    border-color: #666;
    color: #eee;
}

.fav-filter-select:focus,
.fav-who-select:focus {
    outline: none;
    border-color: #ffcc00;
}

.fav-filter-select:disabled,
.fav-who-select:disabled {
    opacity: 0.4;
    cursor: default;
}

.fav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #252525;
}

.fav-btn-active {
    cursor: pointer;
}

.fav-btn-active:hover {
    background: #333;
    border-color: #666;
}

.fav-btn-disabled {
    opacity: 0.4;
    cursor: default;
}

.fav-heart {
    font-size: 1rem;
}

.fav-btn-label {
    font-size: 12px;
    color: #aaa;
}

.fav-counts-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fav-counts-disabled {
    opacity: 0.4;
}

.fav-count {
    font-size: 0.7rem;
    color: #888;
}

/* ═══════════════════════════════════════════════════════════════════════════
   USER LOGIN BUTTON
   ═══════════════════════════════════════════════════════════════════════════ */

.mc-user-login {
    /* No extra margin needed - label provides spacing */
}

.mc-user-btn {
    font-size: 13px;
    padding: 6px 12px;
    text-decoration: none;
    color: #eee;
    border: 1px solid #444;
    border-radius: 4px;
    background: #252525;
    display: inline-block;
}

.mc-user-btn:hover {
    background: #333;
    color: #fff;
    border-color: #666;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHOW TOGGLES (Map/Stats visibility)
   ═══════════════════════════════════════════════════════════════════════════ */

.mc-show-toggles {
    display: flex;
    align-items: center;
    gap: 12px;
}

.show-toggle-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    color: #aaa;
}

.show-toggle-label:hover {
    color: #eee;
}

.show-toggle-label input[type="checkbox"] {
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPECIAL FILTERS POPUP
   ═══════════════════════════════════════════════════════════════════════════ */

.filters-popup {
    position: fixed;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 16px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    min-width: 200px;
}

.filters-popup-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group-label {
    color: #ffcc00;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 0;
    position: relative;
    flex-direction: row;
}

.filter-option:hover {
    color: #fff;
}

/* Hide native checkbox but keep it accessible */
.filter-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom checkbox box */
.filter-option .checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #666;
    border-radius: 3px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Checkmark (hidden by default) */
.filter-option .checkbox-custom::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    display: none;
}

/* Show checkmark when checked */
.filter-option input[type="checkbox"]:checked + .checkbox-custom {
    background: #555;
    border-color: #888;
}

.filter-option input[type="checkbox"]:checked + .checkbox-custom::after {
    display: block;
}

/* Hover state */
.filter-option:hover .checkbox-custom {
    border-color: #888;
}

/* Label text next to checkbox */
.filter-option-text {
    flex: 1;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #444;
}

.filter-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85rem;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
}

.filter-btn-defaults {
    background: #333;
    color: #aaa;
}

.filter-btn-defaults:hover {
    background: #444;
    color: #fff;
}

.filter-btn-cancel {
    background: #333;
    color: #aaa;
}

.filter-btn-cancel:hover {
    background: #444;
    color: #fff;
}

.filter-btn-apply {
    background: #4a6a2a;
    color: #fff;
    border-color: #6a8a4a;
}

.filter-btn-apply:hover {
    background: #5a7a3a;
}

/* Filters button indicator when filters are active */
.ribbon-button.has-filters {
    background: #4a3a20;
    border-color: #ffcc00;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EXPOSURE PANEL
   ═══════════════════════════════════════════════════════════════════════════ */

.mc-exposure {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mc-exposure .nav-btn {
    background: #252525;
    font-size: 14px;
}

.mc-exposure .nav-btn:hover {
    background: #333;
}

.mc-exposure .nav-btn:disabled {
    background: #252525;
    opacity: 0.4;
    cursor: default;
}

.exposure-show-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #aaa;
    cursor: pointer;
}

.exposure-show-label input:disabled {
    cursor: default;
}

.exposure-show-label input:disabled + span {
    color: #555;
}

/* Floating Panel */
.exposure-panel {
    position: fixed;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 8px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    width: 240px;
}

.exposure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #333;
    border-bottom: 1px solid #555;
    border-radius: 8px 8px 0 0;
    cursor: move;
    color: #ffcc00;
    font-weight: bold;
    font-size: 0.9rem;
}

.exposure-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
}

.exposure-close:hover {
    color: #fff;
}

.exposure-content {
    padding: 12px;
}

/* Histogram */
.histogram-container {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    margin-bottom: 12px;
}

#histogram-canvas {
    display: block;
    width: 100%;
    height: 80px;
}

/* Sliders */
.exposure-sliders {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.exposure-slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.exposure-slider-label {
    width: 45px;
    font-size: 0.8rem;
    color: #aaa;
}

.exposure-slider-row input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: #444;
    border-radius: 2px;
    cursor: pointer;
}

.exposure-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #ffcc00;
    border-radius: 50%;
    cursor: pointer;
}

.exposure-slider-row input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #ffcc00;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.exposure-slider-value {
    width: 35px;
    text-align: right;
    font-size: 0.75rem;
    color: #888;
    font-family: monospace;
}

/* Status */
.exposure-status {
    min-height: 18px;
    font-size: 0.75rem;
    text-align: center;
    margin-bottom: 8px;
}

.exposure-status.success {
    color: #4a4;
}

.exposure-status.error {
    color: #a44;
}

/* Buttons */
.exposure-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.exposure-btn {
    padding: 6px 8px;
    font-size: 0.75rem;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    background: #333;
    color: #aaa;
}

.exposure-btn:hover {
    background: #444;
    color: #fff;
}

.exposure-btn-primary {
    background: #4a6a2a;
    color: #fff;
    border-color: #6a8a4a;
}

.exposure-btn-primary:hover {
    background: #5a7a3a;
}

.exposure-btn-danger {
    background: #5a2a2a;
    color: #fff;
    border-color: #8a4a4a;
}

.exposure-btn-danger:hover {
    background: #6a3a3a;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GROUPS VIEW (Gallery)
   ═══════════════════════════════════════════════════════════════════════════ */

.groups-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.group-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.group-row:hover {
    border-color: #ffcc00;
}

.group-row.active {
    border-color: #ffcc00;
    background: #252520;
}

/* Left column: Group info text */
.group-info {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 8px;
    overflow: hidden;
}

.group-title {
    color: #ffcc00;
    font-size: 15px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-meta {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-meta-highlight {
    color: #aaa;
}

/* Middle column: Map thumbnail */
.group-map {
    flex-shrink: 0;
}

.group-map img {
    width: 200px;
    height: 125px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #333;
}

/* Right column: Sample photos */
.group-samples {
    flex: 1;
    display: flex;
    gap: 4px;
    overflow: hidden;
    min-width: 0;
}

.group-samples img {
    height: 125px;
    width: auto;
    object-fit: contain;
    border-radius: 3px;
    border: 1px solid #333;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHOTOS VIEW (Grid of thumbnails)
   ═══════════════════════════════════════════════════════════════════════════ */

.photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.photo-thumb {
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.photo-thumb:hover {
    border-color: #ffcc00;
}

.photo-thumb.active {
    border-color: #ffcc00;
}

.photo-thumb img {
    display: block;
    height: 180px;
    width: auto;
    object-fit: contain;
}

.photo-thumb-id {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #aaa;
    font-size: 11px;
    padding: 2px 6px;
    border-top-left-radius: 4px;
}

.photo-thumb:hover .photo-thumb-id {
    color: #ffcc00;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LARGE VIEW (Single photo display)
   ═══════════════════════════════════════════════════════════════════════════ */

.large-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.large-photo-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
}

.large-photo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.large-photo-container canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* Video loading overlay */
.video-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    color: #ffcc00;
    font-size: 18px;
    z-index: 10;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INFINITE SCROLL TRIGGER
   ═══════════════════════════════════════════════════════════════════════════ */

.load-more-trigger {
    display: flex;
    justify-content: center;
    padding: 20px;
    color: #666;
}

.load-more-trigger .loading {
    color: #888;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAP PANEL
   ═══════════════════════════════════════════════════════════════════════════ */

.map-container {
    position: relative;
    width: 480px;
    height: 300px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
}

.map-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-search-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffcc00;
    border: 1px solid #ffcc00;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.map-search-btn:hover {
    background: rgba(255, 204, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MISSION CONTROL TOGGLE
   ═══════════════════════════════════════════════════════════════════════════ */

#mission-control.hidden {
    display: none;
}

.mc-toggle-btn {
    margin-bottom: 0;
    background: #252525;
    color: #88ccff;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GROUP SEARCH
   ═══════════════════════════════════════════════════════════════════════════ */

.mc-group-search {
    display: flex;
    align-items: center;
    gap: 6px;
}

.group-search-input {
    padding: 4px 8px;
    font-size: 12px;
    background: #222;
    color: #eee;
    border: 1px solid #444;
    border-radius: 4px;
    width: 90px;
    font-family: monospace;
}

.group-search-input:focus {
    outline: none;
    border-color: #ffcc00;
}

.group-search-input::placeholder {
    color: #666;
}

.group-search-label {
    color: #aaa;
    font-size: 12px;
}