/* ===== LANDVIEWER STYLE COMPONENTS ===== */
/* Auto-search, Layers Toggle, Visualization Panel */

/* ===================== AUTO-SEARCH STYLES ===================== */

.auto-search-loading,
.auto-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #9CA3AF;
    font-size: 13px;
}

.auto-search-loading i {
    font-size: 24px;
    color: #4A9EFF;
    margin-bottom: 12px;
}

/* ===== ANIMATED SEARCH SPLASH ===== */
.auto-search-splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.splash-icon-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.splash-satellite {
    font-size: 32px;
    color: #4A9EFF;
    z-index: 2;
    animation: satelliteFloat 2s ease-in-out infinite;
}

@keyframes satelliteFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(5deg);
    }
}

.splash-pulse {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(74, 158, 255, 0.4);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite;
}

.splash-pulse.delay-1 {
    animation-delay: 0.5s;
}

.splash-pulse.delay-2 {
    animation-delay: 1s;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.splash-title {
    color: #E8EAED;
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 4px 0;
}

.splash-subtitle {
    color: #6B7280;
    font-size: 11px;
    margin: 0 0 16px 0;
}

.splash-progress {
    width: 120px;
    height: 4px;
    background: rgba(74, 158, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.splash-progress-bar {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, #4A9EFF, #60A5FA);
    border-radius: 2px;
    animation: progressSlide 1.5s ease-in-out infinite;
}

@keyframes progressSlide {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(200%);
    }

    100% {
        transform: translateX(400%);
    }
}

/* ===================== FILTER CHIPS ===================== */

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid rgba(74, 158, 255, 0.1);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 16px;
    color: #9CA3AF;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover {
    background: rgba(74, 158, 255, 0.2);
    border-color: rgba(74, 158, 255, 0.4);
}

.chip.active {
    background: rgba(74, 158, 255, 0.25);
    border-color: #4A9EFF;
    color: #4A9EFF;
}

.chip i {
    font-size: 10px;
}

/* ===================== THUMBNAIL CARD STYLES ===================== */

.thumb-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.thumb-card:hover {
    background: rgba(74, 158, 255, 0.1);
    border-color: rgba(74, 158, 255, 0.3);
}

.thumbnail-item.selected .thumb-card {
    background: rgba(74, 158, 255, 0.15);
    border-color: #4A9EFF;
}

/* ===== THUMBNAIL LOADING STATE ===== */
.thumbnail-item.loading {
    position: relative;
    pointer-events: none;
}

.thumbnail-item.loading .thumb-card {
    background: rgba(74, 158, 255, 0.08);
    border-color: rgba(74, 158, 255, 0.4);
}

.thumbnail-item.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(74, 158, 255, 0.15);
    border-radius: 8px;
    animation: pulse-loading 1.2s ease-in-out infinite;
}

.thumbnail-item.loading .thumb-img {
    filter: blur(1px);
    opacity: 0.7;
}

/* Spinner overlay */
.thumbnail-item.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(74, 158, 255, 0.3);
    border-top-color: #4A9EFF;
    border-radius: 50%;
    animation: spin-loading 0.8s linear infinite;
    z-index: 10;
}

@keyframes pulse-loading {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes spin-loading {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.thumb-img {
    width: 100px;
    height: 100px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.thumb-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.thumb-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9CA3AF;
    font-size: 12px;
    font-weight: 600;
}

.thumb-dot {
    color: #4A9EFF;
    font-size: 12px;
}

.thumb-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9CA3AF;
    font-size: 11px;
}

.thumb-meta i {
    color: #e39400;
    font-size: 11px;
    width: 12px;
    text-align: center;
}

/* ===================== LAYERS TOGGLE BUTTON ===================== */

.layers-toggle {
    position: fixed;
    bottom: 20px;
    left: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 24, 35, 0.95);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 12px;
    padding: 8px 16px 8px 8px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}

.layers-toggle:hover {
    background: rgba(15, 24, 35, 1);
    border-color: #4A9EFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.2);
}

.layers-toggle.hidden {
    display: none;
}

.layers-toggle-preview {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #1E3A5F, #4A9EFF40);
    display: flex;
    align-items: center;
    justify-content: center;
}

.layers-toggle-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.layers-toggle-text {
    color: #E8EAED;
    font-size: 14px;
    font-weight: 500;
}

/* ===================== VISUALIZATION LAYERS PANEL ===================== */

.vis-layers-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(15, 24, 35, 0.98) 0%, #0F1823 100%);
    border-top: 1px solid rgba(74, 158, 255, 0.2);
    z-index: 1100;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
}

.vis-layers-panel.visible {
    transform: translateY(0);
}

.vis-layers-panel.hidden {
    transform: translateY(100%);
}

/* Header */
.vis-layers-header {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(74, 158, 255, 0.1);
    gap: 16px;
}

/* Compare Tabs dentro do painel de camadas */
.vis-compare-tabs {
    display: flex;
    gap: 4px;
    padding-right: 16px;
    border-right: 1px solid rgba(74, 158, 255, 0.2);
}

.vis-compare-tabs.hidden {
    display: none;
}

.vis-compare-tabs .compare-tab-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(74, 158, 255, 0.3);
    background: rgba(74, 158, 255, 0.1);
    color: #9CA3AF;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vis-compare-tabs .compare-tab-btn:hover {
    background: rgba(74, 158, 255, 0.2);
    color: #E8EAED;
}

.vis-compare-tabs .compare-tab-btn.active {
    background: #4A9EFF;
    color: #0F1823;
    border-color: #4A9EFF;
}

/* Current Scene */
.current-scene {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 16px;
    border-right: 1px solid rgba(74, 158, 255, 0.2);
}

.scene-label {
    color: #9CA3AF;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scene-collapse-btn {
    width: 24px;
    height: 24px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 4px;
    color: #9CA3AF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.scene-collapse-btn:hover {
    background: rgba(74, 158, 255, 0.2);
    color: #4A9EFF;
}

.scene-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scene-info.collapsed {
    display: none;
}

.scene-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(74, 158, 255, 0.2);
}

.scene-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.scene-sensor {
    color: #E8EAED;
    font-size: 12px;
    font-weight: 500;
}

.scene-date {
    color: #9CA3AF;
    font-size: 11px;
}

/* Tabs */
.vis-layers-tabs {
    display: flex;
    gap: 4px;
    flex: 1;
}

.vis-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: #6B7280;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.vis-tab:hover {
    color: #9CA3AF;
}

.vis-tab.active {
    color: #4A9EFF;
    border-bottom-color: #4A9EFF;
}

/* Close Button */
.vis-layers-panel .close-btn {
    padding: 0px 36px;
    background: rgba(74, 158, 255, 0.15);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 6px;
    color: #E8EAED;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.vis-layers-panel .close-btn:hover {
    background: rgba(74, 158, 255, 0.25);
    border-color: #4A9EFF;
    color: #FFFFFF;
}

/* Cards Container */
.vis-layers-content {
    padding: 12px 16px;
    height: calc(100% - 56px);
    overflow: hidden;
}

.vis-cards-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 158, 255, 0.3) transparent;
}

.vis-cards-container::-webkit-scrollbar {
    height: 6px;
}

.vis-cards-container::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 3px;
}

.vis-cards-container::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.3);
    border-radius: 3px;
}

.vis-cards-container::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 158, 255, 0.5);
}

/* Visualization Card */
.vis-card {
    flex-shrink: 0;
    width: 110px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: rgba(30, 41, 59, 0.5);
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vis-card:hover {
    border-color: rgba(74, 158, 255, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.vis-card.active {
    border-color: #4A9EFF;
    box-shadow: 0 0 16px rgba(74, 158, 255, 0.3);
}

.vis-card-preview {
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.vis-preview-gradient {
    position: absolute;
    inset: 0;
    opacity: 0.8;
}

.vis-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vis-card-info-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 9px;
    opacity: 0;
    transition: opacity 0.2s;
}

.vis-card:hover .vis-card-info-icon {
    opacity: 1;
}

.vis-card-label {
    padding: 8px 6px;
    text-align: center;
    font-size: 10px;
    line-height: 1.3;
    color: #E8EAED;
    background: rgba(15, 24, 35, 0.9);
}

/* ===================== UPDATED RIGHT PANEL HEADER ===================== */

#right-panel .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(74, 158, 255, 0.1);
    gap: 8px;
}

#right-panel .panel-header h2 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #E8EAED;
    margin: 0;
    flex: 1;
}

.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#toggleAutoSearch {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

/* Pausado = Play verde - MAIS VISÍVEL */
#toggleAutoSearch.paused {
    background: #22C55E;
    border: 1px solid #16A34A;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

#toggleAutoSearch.paused:hover {
    background: #16A34A;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.5);
}

/* Ativo = Stop vermelho - MAIS VISÍVEL */
#toggleAutoSearch.active {
    background: #EF4444;
    border: 1px solid #DC2626;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

#toggleAutoSearch.active:hover {
    background: #DC2626;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

#filterImagesBtn {
    padding: 4px 10px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 4px;
    color: #9CA3AF;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

#filterImagesBtn:hover {
    background: rgba(74, 158, 255, 0.2);
    color: #E8EAED;
}

/* Image count footer */
#autoSearchImageCount {
    padding: 8px 16px;
    background: rgba(30, 41, 59, 0.5);
    border-top: 1px solid rgba(74, 158, 255, 0.1);
    font-size: 11px;
    color: #4A9EFF;
    display: flex;
    align-items: center;
    gap: 6px;
}

#autoSearchImageCount i {
    font-size: 12px;
}

@media (max-width: 768px) {
    .vis-layers-panel {
        height: 200px !important;
        min-height: 180px !important;
        left: 44px !important;
        right: 44px !important;
        width: calc(100% - 88px) !important;
        bottom: 0 !important;
    }

    .vis-layers-header {
        flex-wrap: wrap;
        padding: 8px 12px;
    }

    .current-scene {
        display: none;
    }

    .vis-layers-tabs {
        overflow-x: auto;
    }

    .vis-card {
        width: 90px;
    }

    .vis-card-preview {
        height: 60px;
    }

    .layers-toggle {
        left: 50px;
        bottom: 70px;
        padding: 6px !important;
        width: 52px !important;
        max-width: 52px !important;
        min-width: unset !important;
        gap: 0 !important;
        border-radius: 10px !important;
        justify-content: center !important;
    }

    .layers-toggle-text {
        display: none !important;
        width: 0 !important;
    }

    .layers-toggle-preview {
        width: 40px !important;
        height: 40px !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
    }
}