/* ============================================================================
   HIGHLIGHTED CAMERA NAVIGATION PANEL - Glassmorphism Design
   Extends unified-panel-design.css with Camera Navigation styling
   ============================================================================ */

/* Panel Positioning - Bottom Middle-Right Position (Side-by-side with ChatBot) */
#highlightedCameraNavPanel {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(10px);  /* Position to right of center */
    width: auto;
    max-width: 40vw;  /* Max width to leave space for chatbot on left */
    background: var(--glass-bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow), 0 0 40px var(--camera-glow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 2px solid rgba(76, 175, 80, 0.3);
    z-index: 1003;  /* Below chatbot (z-index: 2000) */
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body);

    /* Camera Nav-specific custom properties */
    --panel-primary: var(--camera-primary);
    --panel-secondary: var(--camera-secondary);
    --panel-glow: var(--camera-glow);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Panel Header - Glassmorphism with shimmer effect */
#highlightedCameraNavPanel .panel-header {
    background: linear-gradient(135deg,
        rgba(76, 175, 80, 0.25),
        rgba(56, 142, 60, 0.15));
    color: var(--text-primary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid rgba(76, 175, 80, 0.3);
}

#highlightedCameraNavPanel .panel-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(76, 175, 80, 0.2),
        transparent);
    transition: left 0.5s ease;
}

#highlightedCameraNavPanel .panel-header:hover::before {
    left: 100%;
}

#highlightedCameraNavPanel .panel-header:hover {
    background: linear-gradient(135deg,
        rgba(76, 175, 80, 0.35),
        rgba(56, 142, 60, 0.25));
    border-bottom-color: rgba(76, 175, 80, 0.5);
}

#highlightedCameraNavPanel .panel-header h3 {
    margin: 0;
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px var(--camera-glow);
}

/* Panel Content - 2 Row Compact Layout */
#highlightedCameraNavPanel .panel-content {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================================================
   COMPACT ROW LAYOUT
   ============================================================================ */

/* Compact Row 1: Highlight Dropdown + Counter + Clear */
.highlight-nav-row.compact-row-1 {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(76, 175, 80, 0.15);
}

/* Compact Row 2: All Control Groups */
.highlight-nav-row.compact-row-2 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 4px 0;
    flex-wrap: nowrap;
}

.section-label {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    color: #FFC107;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    opacity: 0.9;
}

/* Row 1 Groups */
.highlight-type-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.location-counter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 193, 7, 0.3);
    white-space: nowrap;
}

/* Highlight Dropdown */
.highlight-dropdown {
    min-width: 180px;
    max-width: 220px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.highlight-dropdown:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 193, 7, 0.5);
}

.highlight-dropdown:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: #FFC107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.highlight-dropdown option {
    background: #2a2a2a;
    color: #fff;
    padding: 6px;
}

/* Dynamic highlight options with robot emoji */
.highlight-dropdown option[data-type="dynamic"]::before {
    content: "🤖 ";
}

/* Clear Highlight Button */
.clear-highlight-btn {
    padding: 6px 10px;
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border: 1px solid rgba(244, 67, 54, 0.5);
    border-radius: 5px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.clear-highlight-btn:hover {
    background: linear-gradient(135deg, #ff5252, #f44336);
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(244, 67, 54, 0.4);
}

.clear-highlight-btn:active {
    transform: scale(0.98);
}

/* Location Counter Value */
.counter-value {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.counter-value #currentLocationIndex {
    color: #4CAF50;
}

.counter-value #totalLocations {
    color: #FFC107;
}

/* Row 2 Groups */
.navigation-group {
    display: flex;
    gap: 5px;
    align-items: center;
}

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

/* Navigation Buttons - Compact */
.nav-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 152, 0, 0.15));
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.35), rgba(255, 152, 0, 0.25));
    border-color: #FFC107;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
}

.nav-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(255, 193, 7, 0.2);
}

.nav-btn:disabled {
    background: rgba(100, 100, 100, 0.2);
    border-color: rgba(150, 150, 150, 0.2);
    color: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Clear Buttons Section - Hidden in horizontal layout */
.clear-buttons {
    display: none;
}

.clear-all-dynamic-btn {
    display: none;
}

.clear-all-dynamic-btn:hover {
    background: linear-gradient(135deg, #ff5252, #f44336);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.clear-all-dynamic-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.3);
}

/* Navigation Status - Hidden in horizontal layout */
.navigation-status {
    display: none;
}

/* Scrollbar Styling */
#highlightedCameraNavPanel .panel-content::-webkit-scrollbar {
    width: 8px;
}

#highlightedCameraNavPanel .panel-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#highlightedCameraNavPanel .panel-content::-webkit-scrollbar-thumb {
    background: rgba(255, 193, 7, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

#highlightedCameraNavPanel .panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 193, 7, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    #highlightedCameraNavPanel {
        right: 5px;
        width: 300px;
        top: 50px;
    }

    .navigation-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .nav-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    #highlightedCameraNavPanel {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
    }
}

/* Animation for dropdown updates */
@keyframes dropdownUpdate {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.highlight-dropdown.updated {
    animation: dropdownUpdate 0.3s ease;
}

/* Pulsing animation for active navigation */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.6);
    }
}

.location-counter.active {
    animation: pulse 2s ease-in-out infinite;
}

/* Zoom Buttons - Compact */
.zoom-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(25, 118, 210, 0.15));
    border: 1px solid rgba(33, 150, 243, 0.4);
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.35), rgba(25, 118, 210, 0.25));
    border-color: #2196F3;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.3);
}

.zoom-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(33, 150, 243, 0.2);
}

.zoom-btn:disabled {
    background: rgba(100, 100, 100, 0.2);
    border-color: rgba(150, 150, 150, 0.2);
    color: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Zoom Reset Button - Purple */
.zoom-reset {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(123, 31, 162, 0.15));
    border-color: rgba(156, 39, 176, 0.4);
}

.zoom-reset:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.35), rgba(123, 31, 162, 0.25));
    border-color: #9C27B0;
    box-shadow: 0 3px 10px rgba(156, 39, 176, 0.3);
}

.zoom-reset:active:not(:disabled) {
    box-shadow: 0 2px 5px rgba(156, 39, 176, 0.2);
}

/* Zoom Indicator */
.zoom-indicator {
    min-width: 45px;
    text-align: center;
    padding: 0 6px;
}

.zoom-indicator span {
    font-size: 12px;
    font-weight: 700;
    color: #2196F3;
    font-family: 'Courier New', monospace;
}

/* Zoom animation */
@keyframes zoomPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.zoom-indicator.zooming {
    animation: zoomPulse 0.3s ease;
}

/* Navigation Status - Hide by default */
.navigation-status {
    font-size: 11px;
    color: #FFC107;
    text-align: center;
    padding: 4px 8px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 4px;
    margin-top: 4px;
}

/* ============================================================================
   Row 3: Automated Navigation Controls
   ============================================================================ */

.highlight-nav-row.row-3 {
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid rgba(76, 175, 80, 0.2);
}

.auto-nav-group {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Auto Navigation Buttons */
.auto-nav-btn {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(56, 142, 60, 0.2));
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
    min-width: 80px;
    text-align: center;
}

.auto-nav-btn:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.5), rgba(56, 142, 60, 0.4));
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    transform: translateY(-1px);
}

.auto-nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.auto-nav-btn:disabled {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.2), rgba(80, 80, 80, 0.1));
    border-color: rgba(100, 100, 100, 0.3);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Play button special styling - green glow */
#autoPlayBtn {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.4), rgba(56, 142, 60, 0.3));
}

#autoPlayBtn:hover {
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.6),
                0 0 20px rgba(76, 175, 80, 0.3);
}

/* Pause button special styling - orange glow */
#autoPauseBtn {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.4), rgba(251, 140, 0, 0.3));
    border-color: rgba(255, 152, 0, 0.4);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
}

#autoPauseBtn:hover {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.5), rgba(251, 140, 0, 0.4));
    border-color: rgba(255, 152, 0, 0.6);
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.6),
                0 0 20px rgba(255, 152, 0, 0.3);
}

/* Action Second Dropdown */
.action-second-dropdown {
    background: linear-gradient(135deg,
        rgba(40, 40, 50, 0.95),
        rgba(30, 30, 40, 0.9));
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    min-width: 110px;
}

.action-second-dropdown:hover {
    border-color: rgba(76, 175, 80, 0.6);
    background: linear-gradient(135deg,
        rgba(50, 50, 60, 0.95),
        rgba(40, 40, 50, 0.9));
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4),
                0 0 12px rgba(76, 175, 80, 0.3);
}

.action-second-dropdown:focus {
    outline: none;
    border-color: rgba(76, 175, 80, 0.8);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4),
                0 0 16px rgba(76, 175, 80, 0.5);
}

/* Dropdown options */
.action-second-dropdown option {
    background: #1a1a2e;
    color: #ffffff;
    padding: 8px;
}

/* ============================================================================
   COMPACT CONTROL STYLES - Ultra-compact unified design
   ============================================================================ */

/* Compact Highlight Dropdown */
.highlight-dropdown.compact {
    min-width: 140px;
    max-width: 180px;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    background: rgba(40, 40, 50, 0.9);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Compact Location Counter */
.location-counter.compact {
    padding: 3px 8px;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #4CAF50;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

/* Compact Clear Button */
.clear-highlight-btn.compact {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border: 1px solid rgba(244, 67, 54, 0.5);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-highlight-btn.compact:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
}

/* Control Groups - Compact spacing */
.control-group {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    background: rgba(40, 40, 50, 0.4);
    border-radius: 6px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.control-group.nav-group {
    border-color: rgba(255, 193, 7, 0.2);
}

.control-group.zoom-group {
    border-color: rgba(33, 150, 243, 0.2);
}

.control-group.auto-group {
    border-color: rgba(76, 175, 80, 0.2);
}

/* Unified Control Button - Smaller, cleaner */
.control-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(56, 142, 60, 0.2));
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.5), rgba(56, 142, 60, 0.4));
    border-color: #4CAF50;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.control-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(76, 175, 80, 0.3);
}

.control-btn:disabled {
    background: rgba(100, 100, 100, 0.2);
    border-color: rgba(100, 100, 100, 0.3);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

/* Special button colors */
.control-btn.play {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.4), rgba(56, 142, 60, 0.3));
}

.control-btn.play:hover:not(:disabled) {
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.6),
                0 0 16px rgba(76, 175, 80, 0.3);
}

.control-btn.pause {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.4), rgba(251, 140, 0, 0.3));
    border-color: rgba(255, 152, 0, 0.4);
}

.control-btn.pause:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.5), rgba(251, 140, 0, 0.4));
    border-color: #FF9800;
    box-shadow: 0 2px 12px rgba(255, 152, 0, 0.6),
                0 0 16px rgba(255, 152, 0, 0.3);
}

.control-btn.reset {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.3), rgba(25, 118, 210, 0.2));
    border-color: rgba(33, 150, 243, 0.4);
}

/* Zoom Level Display - Compact */
.zoom-level {
    font-size: 10px;
    font-weight: 700;
    color: #2196F3;
    min-width: 38px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

/* Interval Select - Compact */
.interval-select {
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    background: rgba(40, 40, 50, 0.9);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #fff;
    cursor: pointer;
    min-width: 40px;
    transition: all 0.2s ease;
}

.interval-select:hover {
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

.interval-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.5);
}

.interval-select option {
    background: #1a1a2e;
    color: #fff;
}
