/* ============================================
   Google Drive Material Design - Consolidated CSS
   ============================================ */

/* ============================================
   0. CORE LAYOUT AND CONTAINER STYLES
   ============================================ */

/* Main Container Layout */
#drive-integration-container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
    height: 100%;
}

/* Sidebar */
#sidebar {
    width: 320px;
    min-width: 280px;
    max-width: 400px;
    background: #f8f9fa;
    border-right: 1px solid #dadce0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

/* Main Content Area */
#main-content,
#folderBrowser {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: white;
    min-width: 0;
    width: 100%;
}

/* Status Bar Container */
.aa-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

/* Status left section - items and size in same row */
.aa-status-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.aa-status-item {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

/* Files Container */
#drive-integration-container-files {
    flex: 1;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 16px;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

/* Main layout structure */
.aa-main-layout {
    display: flex !important;
    flex: 1;
    overflow: hidden !important;
    width: 100%;
    height: 100%;
    min-width: 0;
    box-sizing: border-box;
    position: relative !important;
    max-width: 100% !important;
}

/* Ensure all children of aa-main-layout don't overflow */
.aa-main-layout > * {
    max-width: 100% !important;
    max-height: 100% !important;
    box-sizing: border-box !important;
}

/* Apply containment to all descendants */
.aa-main-layout * {
    box-sizing: border-box !important;
}

/* Prevent any element from creating horizontal scrollbars */
.aa-main-layout,
.aa-main-layout * {
    max-width: 100% !important;
}

/* Ensure flex children don't grow beyond parent */
.aa-main-layout > .aa-sidebar,
.aa-main-layout > .aa-content {
    flex-shrink: 0;
    min-width: 0;
    min-height: 0;
}

/* Force folder browser to show */
#folderBrowser {
    display: block !important;
    min-height: 400px;
}

/* Content area */
.aa-content {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    min-width: 0;
    min-height: 0;
    position: relative;
    max-width: 100%;
}

/* Ensure all children of aa-content don't overflow */
.aa-content > * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Apply box-sizing to all descendants to prevent overflow */
.aa-content * {
    box-sizing: border-box;
}

/* Ensure folder browser respects parent boundaries */
.aa-content .folder-browser {
    max-height: 100%;
    max-width: 100%;
}

/* Fix layout structure */
#drive-integration-container > div {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Ensure all main elements display */
.aa-main-layout > * {
    display: block !important;
}

/* Force visibility of drop zone */
.aa-drop-zone {
    display: block !important;
    min-height: 200px !important;
}

/* Folder browser container */
.folder-browser {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    min-height: 0;
    box-sizing: border-box;
}

/* ============================================
   1. MATERIAL DESIGN BASE STYLES
   ============================================ */

/* Material Design Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Material Design Checkbox Styling */
.aa-checkbox-cell input[type="checkbox"],
.aa-item-checkbox {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    width: 18px;
    height: 18px;
    border: 2px solid #757575;
    border-radius: 2px;
    background: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.aa-checkbox-cell input[type="checkbox"]:hover,
.aa-item-checkbox:hover {
    border-color: #1976d2;
}

.aa-checkbox-cell input[type="checkbox"]:checked,
.aa-item-checkbox:checked {
    background: #1976d2;
    border-color: #1976d2;
}

.aa-checkbox-cell input[type="checkbox"]:checked::after,
.aa-item-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Material Design Elevation Classes */
.elevation-0 { box-shadow: none; }
.elevation-1 { box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); }
.elevation-2 { box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); }
.elevation-3 { box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); }
.elevation-4 { box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); }

/* ============================================
   2. HEADER AND TITLE STYLES
   ============================================ */

/* Google Drive Manager Title */
.aa-title {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 12px 24px !important;
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.aa-title-material {
    background: white;
    color: #202124;
    padding: 12px 24px !important;
    font-family: 'Google Sans', 'Roboto', sans-serif;
    font-size: 22px;
    font-weight: 400;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #dadce0;
}

.aa-title-material .material-icons {
    font-size: 28px;
    color: #1976d2;
}

/* ============================================
   3. SIDEBAR AND CREDENTIALS STYLES
   ============================================ */

/* Service Account Credentials Section */
.aa-credentials {
    background: white;
    border-radius: 8px;
    padding: 12px !important;
    margin: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    border-bottom: 1px solid #e0e0e0 !important;
}

.aa-credentials-header {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Credential Items */
.aa-credential-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #202124;
    position: relative;
}

.aa-credential-item:hover {
    background: rgba(25, 118, 210, 0.04);
}

/* Selected/Active Credential */
.aa-credential-item.selected,
.aa-credential-item.active,
.aa-credential-item[data-selected="true"] {
    background: rgba(25, 118, 210, 0.12);
    border-left: 3px solid #1976d2;
    font-weight: 500;
}

/* Google Drives Section */
.aa-drives {
    background: white;
    border-radius: 8px;
    padding: 12px !important;
    margin: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    flex: 1 !important;
    overflow-y: auto !important;
}

.aa-drives-header {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Drive Items */
.aa-drive-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #202124;
}

.aa-drive-item:hover {
    background: rgba(25, 118, 210, 0.04);
}

.aa-drive-item.selected,
.aa-drive-item.active {
    background: rgba(25, 118, 210, 0.12);
    border-left: 3px solid #1976d2;
    padding-left: 13px;
    font-weight: 500;
}

/* Sidebar Panel */
.aa-sidebar {
    background: #f8f9fa;
    border-right: 1px solid #dadce0;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* ============================================
   4. SEARCH BAR AND TOOLBAR STYLES
   ============================================ */

/* View Controls Container - Single Row Layout */
.aa-view-controls {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 8px 16px !important;
    background: white !important;
    border-bottom: 1px solid #e0e0e0 !important;
    flex-wrap: nowrap !important;
}

/* Search Container */
.aa-search-container {
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 !important;
    max-width: 400px !important;
    min-width: 200px !important;
}

.aa-search-wrapper {
    position: relative;
    display: flex !important;
    align-items: center !important;
    background: #f1f3f4 !important;
    border: 1px solid transparent !important;
    border-radius: 20px !important;
    height: 36px !important;
    transition: all 0.2s !important;
    padding: 0 !important;
}

.aa-search-wrapper:hover {
    background: white !important;
    border-color: #dadce0 !important;
    box-shadow: 0 1px 6px rgba(32,33,36,.28) !important;
}

.aa-search-wrapper:focus-within {
    background: white !important;
    border-color: #1976d2 !important;
    box-shadow: 0 1px 6px rgba(32,33,36,.28) !important;
}

.aa-search-icon {
    position: absolute !important;
    left: 14px !important;
    color: #5f6368 !important;
    pointer-events: none !important;
}

.aa-search-icon.material-icons {
    font-size: 20px !important;
}

.aa-search-input {
    flex: 1 !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 44px !important;
    font-size: 14px !important;
    font-family: 'Roboto', sans-serif !important;
    color: #202124 !important;
    height: 100% !important;
}

.aa-clear-search-btn {
    position: absolute !important;
    right: 8px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 50% !important;
    color: #5f6368 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.aa-clear-search-btn:hover {
    background: rgba(0,0,0,0.06) !important;
}

.aa-clear-search-btn .material-icons {
    font-size: 18px !important;
}

/* Toolbar Spacing */
.aa-toolbar,
.aa-toolbar-top,
.aa-status-bar {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* ============================================
   5. BUTTON STYLES
   ============================================ */

/* Upload Buttons */
.aa-upload-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

.aa-upload-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    border: none !important;
    border-radius: 18px !important;
    background: #1976d2 !important;
    color: white !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 24px !important;
    letter-spacing: 0.25px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15) !important;
}

.aa-upload-btn:hover {
    background: #1565c0 !important;
    box-shadow: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15) !important;
}

.aa-upload-btn .material-icons {
    font-size: 18px !important;
    line-height: 1 !important;
}

/* Load More Files Button - Material Design */
.aa-load-more-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 8px 24px !important;
    min-height: 36px !important;
    border: none !important;
    border-radius: 4px !important;
    background: #1976d2 !important;
    color: white !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: 0.25px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 3px 1px -2px rgba(0,0,0,0.2),
                0 2px 2px 0 rgba(0,0,0,0.14),
                0 1px 5px 0 rgba(0,0,0,0.12) !important;
}

.aa-load-more-btn:hover {
    background: #1565c0 !important;
    box-shadow: 0 2px 4px -1px rgba(0,0,0,0.2),
                0 4px 5px 0 rgba(0,0,0,0.14),
                0 1px 10px 0 rgba(0,0,0,0.12) !important;
}

.aa-load-more-btn:active {
    background: #0d47a1 !important;
    box-shadow: 0 5px 5px -3px rgba(0,0,0,0.2),
                0 8px 10px 1px rgba(0,0,0,0.14),
                0 3px 14px 2px rgba(0,0,0,0.12) !important;
}

/* Pagination Container - Material Design */
.aa-pagination-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px !important;
    background: #fafafa !important;
    border-top: 1px solid #e0e0e0 !important;
    margin-top: auto !important;
}

.aa-pagination-info {
    color: #5f6368 !important;
    font-size: 14px !important;
    font-family: 'Roboto', sans-serif !important;
}

/* Action Buttons (Download, Move, Delete, Clear) */
.selection-btn,
.aa-selection-btn,
.selection-btn.aa-primary,
.selection-btn.aa-danger,
button[onclick*="downloadSelected"],
button[onclick*="moveSelected"],
button[onclick*="deleteSelected"],
button[onclick*="clearSelection"],
button[onclick*="copySelected"] {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 6px 12px !important;
    font-size: 14px !important;
    line-height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    gap: 6px;
    border: none;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Primary Button */
.selection-btn.aa-primary {
    background: #1976d2;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.selection-btn.aa-primary:hover {
    background: #1565c0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

/* Secondary Button */
.aa-selection-btn {
    background: white;
    color: #1976d2;
    border: 1px solid #1976d2;
}

.aa-selection-btn:hover {
    background: rgba(25, 118, 210, 0.04);
}

/* Danger Button */
.selection-btn.aa-danger {
    background: #d32f2f;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.selection-btn.aa-danger:hover {
    background: #c62828;
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

/* Material Icons in Buttons */
.selection-btn .material-icons,
.aa-selection-btn .material-icons {
    font-size: 18px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

/* ============================================
   6. TABLE AND FILE BROWSER STYLES
   ============================================ */

/* Reset for table elements */
.aa-files-details * {
    position: relative !important;
    float: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Grid Layout for Table */
.aa-details-header,
.details-row {
    display: grid !important;
    grid-template-columns: 40px 1fr 100px 100px 140px 180px !important;
    gap: 10px !important;
    padding: 0 15px !important;
    position: relative !important;
    overflow: hidden !important;
    align-items: center !important;
}

/* Table Cells */
.aa-details-header > div,
.details-row > div {
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 8px 4px !important;
    position: relative !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}

/* Checkbox Column */
.aa-details-header > div:nth-child(1),
.details-row > div:nth-child(1) {
    justify-content: center !important;
}

/* Name Column */
.aa-details-header > div:nth-child(2),
.details-row > div:nth-child(2) {
    justify-content: flex-start !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.details-row .name-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
}

.details-row .aa-file-name {
    text-align: left !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Size, Type, Modified Columns */
.aa-details-header > div:nth-child(3),
.details-row > div:nth-child(3),
.aa-details-header > div:nth-child(4),
.details-row > div:nth-child(4),
.aa-details-header > div:nth-child(5),
.details-row > div:nth-child(5) {
    justify-content: center !important;
}

/* Actions Column */
.aa-details-header > div:nth-child(6),
.details-row > div:nth-child(6),
.actions-cell {
    overflow: visible !important;
    max-width: 180px !important;
    position: relative !important;
    display: flex !important;
    gap: 4px !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

/* Action Icons */
.actions-cell .action-icon {
    display: inline-block !important;
    cursor: pointer !important;
    font-size: 18px !important;
    min-width: 24px !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
    color: #757575 !important;
}

.actions-cell .action-icon.material-icons {
    font-family: 'Material Icons' !important;
    font-weight: normal !important;
    font-style: normal !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    direction: ltr !important;
    -webkit-font-smoothing: antialiased !important;
    text-rendering: optimizeLegibility !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.actions-cell .action-icon:hover {
    color: #2196F3 !important;
    transform: scale(1.1) !important;
}

/* File and Folder Icons */
.aa-file-icon.material-icons {
    font-family: 'Material Icons' !important;
    font-weight: normal !important;
    font-style: normal !important;
    font-size: 20px !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    display: inline-block !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    direction: ltr !important;
    -webkit-font-smoothing: antialiased !important;
    text-rendering: optimizeLegibility !important;
    -moz-osx-font-smoothing: grayscale !important;
    color: #5f6368 !important;
    margin-right: 8px !important;
    vertical-align: middle !important;
}

/* Header Styling */
.aa-details-header {
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
}

/* Row Styling */
.details-row {
    border-bottom: 1px solid #eee;
}

.details-row:hover {
    background: #f9f9f9;
}

.details-row:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 8px !important;
}

/* ============================================
   7. DROP ZONE STYLES
   ============================================ */

.aa-drop-zone {
    border: none !important;
    border-radius: 8px;
    background: transparent;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 0 !important;
}

.aa-drop-zone.dragging,
.aa-drop-zone.aa-dragging,
.aa-drop-zone.aa-drag-over {
    background: rgba(25, 118, 210, 0.08);
    box-shadow: inset 0 0 0 2px #1976d2;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 100% !important;
}

/* Ensure drop zone is properly positioned for overlay */
.aa-drop-zone {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    overflow: visible !important;
}

/* Override any inherited borders */
.aa-drop-zone,
.aa-drop-zone.aa-dragging,
.aa-drop-zone.aa-dragging-ready {
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
}

/* Files area wrapper for containing files list and overlay */
.aa-files-area-wrapper {
    position: relative !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    max-width: 100%;
    width: 100%;
}

.files-list, .files-grid, .aa-files-details {
    flex: 1;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    position: relative;
    min-height: 0;
    height: 100%;
}

/* Hide drop overlay by default, show only when dragging */
.aa-drop-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(25, 118, 210, 0.05) !important;
    z-index: 1000 !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    border-top: 2px dashed #1976d2 !important;
    border-right: 2px dashed #1976d2 !important;
    border-bottom: 2px dashed #1976d2 !important;
    border-left: 2px dashed #1976d2 !important;
    box-sizing: border-box !important;
    backdrop-filter: blur(1px) !important;
    transition: opacity 0.2s ease-in-out !important;
    width: auto !important;
    height: auto !important;
    min-width: 100% !important;
    min-height: 100% !important;
}

.aa-drop-overlay.show {
    display: flex !important;
    /* Force all borders to be visible when overlay is shown */
    border-top: 2px dashed #1976d2 !important;
    border-right: 2px dashed #1976d2 !important;
    border-bottom: 2px dashed #1976d2 !important;
    border-left: 2px dashed #1976d2 !important;
}

/* Prevent overlay from shrinking during drag states */
.aa-drop-zone.dragging .aa-drop-overlay,
.aa-drop-zone.aa-dragging .aa-drop-overlay,
.aa-drop-zone.aa-drag-over .aa-drop-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
    min-width: 100% !important;
    min-height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    /* Ensure all borders are visible */
    border-top: 2px dashed #1976d2 !important;
    border-right: 2px dashed #1976d2 !important;
    border-bottom: 2px dashed #1976d2 !important;
    border-left: 2px dashed #1976d2 !important;
}

/* Force hide overlay by default - override any JavaScript classes */
.aa-drop-overlay:not(.show) {
    display: none !important;
}

/* Additional specificity to ensure overlay is hidden */
#dropOverlay:not(.show) {
    display: none !important;
}

/* Ensure overlay starts hidden on page load */
.aa-drop-overlay {
    display: none !important;
}

.aa-drop-content {
    text-align: center;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.95);
    padding: 32px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(25, 118, 210, 0.15);
    border: 1px solid rgba(25, 118, 210, 0.2);
    max-width: 300px;
    animation: dropContentFadeIn 0.3s ease-out;
}

@keyframes dropContentFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.aa-drop-text {
    font-size: 20px;
    font-weight: 600;
    color: #1976d2;
    margin: 20px 0 12px 0;
    font-family: 'Roboto', sans-serif;
}

.aa-drop-subtext {
    font-size: 14px;
    color: #5f6368;
    margin: 0;
    line-height: 1.4;
    font-family: 'Roboto', sans-serif;
}

.aa-drop-icon.material-icons {
    font-size: 64px !important;
    color: #1976d2 !important;
    margin-bottom: 8px;
    animation: dropIconBounce 0.6s ease-in-out;
}

@keyframes dropIconBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* ============================================
   8. SPACING AND LAYOUT FIXES
   ============================================ */

/* Files Info Bar */
.aa-files-info,
.aa-status-left {
    padding-left: 8px !important;
    padding-right: 16px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #e0e0e0 !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 13px !important;
    color: #5f6368 !important;
}

/* Selection Info Spacing */
.aa-selection-info {
    margin-right: 12px !important;
    padding-right: 12px !important;
    border-right: 1px solid #e0e0e0 !important;
    white-space: pre !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Breadcrumb */
.aa-breadcrumb {
    display: flex !important;
    align-items: center !important;
    padding: 8px 16px !important;
    background: white !important;
    border-bottom: 1px solid #e0e0e0 !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 14px !important;
    color: #5f6368 !important;
    min-height: 40px !important;
}

.aa-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.aa-breadcrumb-item:hover {
    background: rgba(0,0,0,0.04);
}

/* Folder Browser Container */
.aa-folder-browser,
#folderBrowser {
    min-height: calc(100vh - 60px) !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    position: relative !important;
    overflow: visible !important;
    width: 100% !important;
    height: 100% !important;
    padding: 2px; /* Add padding to accommodate overlay border */
}

.aa-files-container,
.aa-files-details {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Progress Bar */
.aa-progress-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.aa-progress-fill {
    height: 100%;
    background: #1976d2;
    transition: width 0.3s ease;
    position: relative;
}

/* Progress Overlay - Centered */
.aa-progress-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 2000 !important;
    display: none !important;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.aa-progress-overlay.aa-active {
    display: flex !important;
    opacity: 1;
}


.aa-progress-modal {
    background: white !important;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #e0e0e0;
    padding: 24px;
    min-width: 350px;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    z-index: 2001;
}

.aa-progress-title {
    font-size: 16px;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 12px;
    font-family: 'Roboto', sans-serif;
}

.aa-progress-info {
    font-size: 14px;
    color: #5f6368;
    margin: 8px 0;
    font-family: 'Roboto', sans-serif;
}

.aa-cancel-btn {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    transition: background 0.2s;
}

.aa-cancel-btn:hover {
    background: #d32f2f;
}

.aa-cancel-btn .material-icons {
    font-size: 18px;
}

/* Snackbar Messages */
.snackbar {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: #323232;
    color: white;
    padding: 14px 24px;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    display: none; /* Hidden by default */
    align-items: center;
    gap: 16px;
    box-shadow: 0 3px 5px rgba(0,0,0,0.3);
    z-index: 1000;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.snackbar.show {
    display: flex !important;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   9. DEBUG AND CLEANUP FIXES
   ============================================ */

/* Hide any debug elements that might be showing */
.debug-alignment,
.debug-grid,
.debug-element {
    display: none !important;
}

/* Ensure no elements are positioned in lower left corner unless intended */
* {
    box-sizing: border-box;
}

/* Clean up any stray elements */
body > *:not(#drive-integration-container):not(.demo-header) {
    position: relative;
}

/* Hide any console or test elements (but not drop overlay) */
[class*="console"]:not(.aa-drop-overlay),
[class*="test"]:not(.aa-drop-overlay),
[class*="debug"]:not(.aa-drop-overlay),
[id*="console"]:not(#dropOverlay),
[id*="test"]:not(#dropOverlay),
[id*="debug"]:not(#dropOverlay) {
    display: none !important;
}