/* Mobile-First Debug Mode Styles */

/* Debug Toggle - Mobile Optimized */
.debug-toggle-container {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 9999;
}

.debug-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.debug-toggle-btn:active {
    transform: scale(0.95);
}

.debug-toggle-btn.active {
    background: rgba(255, 71, 87, 0.8);
    border-color: rgba(255, 71, 87, 0.5);
}

/* Debug Info Bar - Mobile Optimized */
.debug-info-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    font-family: monospace;
    font-size: 10px;
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 40vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
}

body.debug-mode .debug-info-bar {
    display: block;
    transform: translateY(0);
}

/* Swipeable Tab Headers */
.debug-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.debug-tabs::-webkit-scrollbar {
    display: none;
}

.debug-tab {
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    background: none;
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.debug-tab:active {
    background: rgba(255, 255, 255, 0.1);
}

.debug-tab.active {
    color: #2ed573;
    border-bottom: 2px solid #2ed573;
}

/* Tab Content */
.debug-tab-content {
    display: none;
    padding: 10px;
    animation: fadeIn 0.3s ease;
}

.debug-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Debug Info Items - Mobile Optimized */
.debug-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.debug-info-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.debug-info-label {
    color: #3b82f6;
    font-size: 9px;
    margin-bottom: 2px;
    text-transform: uppercase;
    opacity: 0.8;
}

.debug-info-value {
    color: white;
    font-size: 11px;
    font-weight: bold;
    word-break: break-all;
}

/* Inline Debug Indicators - Mobile Optimized */
.debug-indicator {
    display: none;
    position: fixed;
    top: 60px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #2ed573;
    padding: 5px 8px;
    border-radius: 15px;
    font-family: monospace;
    font-size: 10px;
    z-index: 9997;
    pointer-events: none;
}

body.debug-mode .debug-indicator {
    display: block;
}

/* Console Log Strip - Mobile Optimized */
.debug-console-strip {
    padding: 10px;
    max-height: 150px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.debug-log-entry {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 10px;
    line-height: 1.3;
    word-break: break-word;
}

.debug-log-entry.error {
    color: #ff4757;
}

.debug-log-entry.warn {
    color: #ffd700;
}

.debug-log-entry.info {
    color: #3b82f6;
}

.debug-log-time {
    color: rgba(255, 255, 255, 0.5);
    margin-right: 5px;
}

/* Quick Actions - Mobile Optimized */
.debug-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px;
}

.debug-action-btn {
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
}

.debug-action-btn:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.98);
}

/* Minimize/Maximize Handle */
.debug-handle {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.debug-handle::after {
    content: '';
    width: 30px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* Hide debug elements when not in debug mode */
body:not(.debug-mode) .debug-element,
body:not(.debug-mode) .debug-panel,
body:not(.debug-mode) .debug-section {
    display: none !important;
}

/* Floating GPS Accuracy Indicator */
.debug-gps-indicator {
    position: fixed;
    top: 60px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 8px;
    border-radius: 15px;
    font-size: 10px;
    color: white;
    display: none;
    pointer-events: none;
    z-index: 9997;
}

body.debug-mode .debug-gps-indicator {
    display: block;
}

.debug-gps-indicator.high {
    color: #2ed573;
}

.debug-gps-indicator.medium {
    color: #ffd700;
}

.debug-gps-indicator.low {
    color: #ff4757;
}

/* Responsive adjustments for very small screens */
@media (max-width: 320px) {
    .debug-info-grid {
        grid-template-columns: 1fr;
    }
    
    .debug-tab {
        font-size: 10px;
        padding: 8px 10px;
    }
}

/* Landscape mode adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .debug-info-bar {
        max-height: 60vh;
    }
}