﻿/* Mobile Viewport Lock Configuration Framework */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    background-color: #f8f9fa;
}

.app-shell {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
}

/* Light Sticky Top Header Layout Specifications */
.main-header {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 900;
    height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid #eaeaea;
}

    .main-header h1 {
        font-size: 18px;
        font-weight: 600;
        margin: 0;
    }

.nav-icon-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    padding: 4px;
}

.status-indicator {
    font-size: 12px;
    font-weight: bold;
    color: green;
}

/* View Router Display Shell Layout Constraints */
.view-viewport {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.app-view {
    display: none;
    padding: 15px;
    box-sizing: border-box;
}

    .app-view.active-view {
        display: block;
    }

/* Sliding Drawer Navigation Layout Panel Configuration */
.drawer {
    position: fixed;
    top: 0;
    left: -280px;
    z-index: 1100;
    width: 280px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: 4px 0 15px rgba(0,0,0,0.15);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

    .drawer.open {
        transform: translateX(280px);
    }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

    .drawer-header h3 {
        margin: 0;
        font-size: 18px;
        color: #0052cc;
    }

.drawer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .drawer-menu li {
        border-bottom: 1px solid #f9f9f9;
    }

.menu-link {
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
}

    .menu-link.active-link {
        background-color: #f0f5ff;
        color: #0052cc;
        font-weight: 600;
    }

/* Dark Background Screen Mask Overlay */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

    .backdrop.visible {
        opacity: 1;
        visibility: visible;
    }

/* Global Independent Projects View Component Cards Layout */
.view-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.primary-action-btn {
    background-color: #0052cc;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-weight: bold;
}

.list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.project-list-folder {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
    font-weight: bold;
    color: #2d3748;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

/* User Profile Options Section Presentation Block Rules */
.settings-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e2e8f0;
}

.setting-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

    .setting-item.horizontal {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .setting-item label {
        font-size: 13px;
        font-weight: bold;
        color: #666;
        margin-bottom: 5px;
    }

    .setting-item input, .setting-item select {
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
    }

.action-danger-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
}




#annotation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #111;
    color: #fff;
}

    .modal-header button {
        padding: 8px 16px;
        margin-left: 10px;
        border-radius: 4px;
        border: none;
        font-weight: bold;
        cursor: pointer;
    }

#save-annotation-btn {
    background-color: #0052cc;
    color: white;
}

#clear-annotation-btn {
    background-color: #444;
    color: white;
}

#canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    position: relative;
}

#annotation-canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}


/* Styling for the tool selection layout */
.mode-selectors button {
    padding: 8px 12px;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
}

    .mode-selectors button.active-mode {
        background-color: #0052cc;
        border-color: #0052cc;
        font-weight: bold;
    }

#undo-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #222;
}


/* Layout placement for the modal selection item dropdown container */
.tag-selector-wrapper select {
    padding: 6px;
    background-color: #222;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    font-weight: bold;
}

/* Feed Filter Panel Buttons Layout */
#filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.filter-btn {
    padding: 6px 14px;
    background-color: #eee;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
}

    .filter-btn.active-filter {
        background-color: #0052cc;
        color: white;
    }

/* Visual Tag Badges inside Feed Media Cards */
.category-badge {
    display: inline-block;
    background-color: #e1ecf4;
    color: #0052cc;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-top: 5px;
}

/* Project Bar Navigation Layout */
#project-management-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f4f6f9;
    padding: 12px 15px;
    border-bottom: 1px solid #dcdfe6;
}

.project-selector-wrapper select {
    padding: 8px;
    font-weight: bold;
    border-radius: 4px;
    border: 1px solid #ccc;
    max-width: 200px;
}

#new-project-btn {
    background-color: #0052cc;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

/* Generic Centered Modal Overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

    .modal-card input {
        width: 100%;
        padding: 10px;
        margin: 15px 0;
        box-sizing: border-box;
        border: 1px solid #ccc;
        border-radius: 4px;
    }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

    .modal-actions button {
        padding: 8px 16px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }

#cancel-project-btn {
    background: #eee;
}

#confirm-project-btn {
    background: #0052cc;
    color: white;
    font-weight: bold;
}



/* Center wrapper container bounding box */
#camera-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #000000; /* Dark canvas backdrop */
    width: 100%;
    max-width: 600px; /* Locks field sizing constraints on wide monitors */
    margin: 15px auto; /* Centers the whole container block horizontally */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* Responsively preserve live camera hardware proportions */
#video {
    width: 100%;
    height: auto;
    max-height: 70vh; /* Prevents long streams from driving control buttons past screen folds */
    object-fit: cover; /* Crops stream edges smoothly inside container viewports */
    display: block;
}

/* Floating, high-visibility actions layout overlay hook */
#capture-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%); /* Locks center anchor placement calculation exactly */
    background-color: #ffffff;
    color: #000000;
    border: 4px solid #0052cc; /* High-contrast company branding line */
    padding: 14px 28px;
    border-radius: 50px; /* Pill-shaped native camera look */
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    white-space: nowrap;
}

    /* Add active click shrink animation state */
    #capture-btn:active {
        transform: translateX(-50%) scale(0.95);
    }

/* Floating Camera Flip Toggle Button Layout placement styling rules */
#flip-camera-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent background for high contrast */
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px); /* Modern frosted-glass native look */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

    #flip-camera-btn:active {
        background-color: rgba(0, 0, 0, 0.8);
        transform: scale(0.95);
    }

/* Instagram-Style Responsive Square Grid */
.instagram-grid {
    display: grid;
    /* Auto-fit creates columns dynamically based on available screen space */
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 4px; /* Tight Instagram-style image borders */
    padding: 5px 0;
}

/* Force elements into uniform square aspect ratios */
.photo-card {
    position: relative;
    aspect-ratio: 1 / 1; /* Locks tile to a perfect square */
    overflow: hidden;
    background-color: #eaeaea;
    cursor: pointer;
}

    .photo-card img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Crops photos into grid squares without squeezing */
        transition: transform 0.2s ease;
    }

    /* Subtle hover pop effect for desktop users */
    .photo-card:hover img {
        transform: scale(1.04);
    }

    /* High-contrast Sync Status indicator icons over tiles */
    .photo-card::after {
        content: '✓';
        position: absolute;
        bottom: 8px;
        right: 8px;
        width: 18px;
        height: 18px;
        background-color: rgba(0, 128, 0, 0.85);
        color: white;
        border-radius: 50%;
        font-size: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    }

    /* Turn sync indicator orange if photo is cached locally waiting for signal */
    .photo-card.pending::after {
        content: '⏳';
        background-color: rgba(255, 140, 0, 0.9);
        font-size: 9px;
    }

/* Lightbox Quick View Layout Enhancements */
.lightbox-card {
    max-width: 500px;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.close-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5) !important;
    color: white !important;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox-img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    display: block;
    object-fit: contain;
    background: #111;
}

.lightbox-details {
    padding: 16px;
    background: white;
}

    .lightbox-details p {
        margin: 6px 0;
        font-size: 14px;
        color: #4a5568;
    }

/* Media Query: Scale tile sizes up smoothly on wider Tablet/Desktop monitor panels */
@media (min-width: 600px) {
    .instagram-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }
}

