/* Lakes Tutoring - Secure Vault Styles */

/* --- Main Layout --- */
#admin-vault .vault-wrapper {
    display: flex;
    gap: 0; /* Bootstrap gap removed for flush sidebar */
    background-color: #fff;
    padding: 0; /* Padding handled in children */
    border-radius: 8px;
    min-height: 70vh;
    border: 1px solid #e3e6f0;
    overflow: hidden; /* Contains sidebar */
}

/* Sidebar (Folder Tree) */
.vault-sidebar {
    width: 260px;
    background-color: #f8f9fc;
    border-right: 1px solid #e3e6f0;
    padding: 20px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.vault-sidebar-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e3e6f0;
}

/* Content Area */
.vault-content {
    flex-grow: 1;
    padding: 20px;
    background-color: #fff;
}

/* --- Hero Cards (Home Screen) --- */
.vault-hero-card {
    border-radius: 12px;
    padding: 25px;
    cursor: pointer; /* Hand Pointer */
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
}

.vault-hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

input#vault-search-input {
    border-style: none; !important
}

/* --- Folder Items (Sidebar) --- */
.folder-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer; /* Hand Pointer */
    margin-bottom: 4px;
    color: #5a5c69;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
}

.folder-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

.folder-item:hover {
    background-color: #eaecf4;
    color: #2e59d9;
}

/* --- Grid View --- */
.file-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.vault-file-item {
    border: 1px solid #eaecf4;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer; /* Hand Pointer */
    transition: all 0.2s;
    background: #fff;
    position: relative;
}

.vault-file-item:hover {
    background-color: #f0f4ff;
    border-color: #4e73df;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.vault-file-item .file-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #858796;
}

.vault-file-item .file-name {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.vault-file-item .file-meta {
    font-size: 0.7rem;
    color: #aaa;
    margin-top: 5px;
}

/* --- List View Rows --- */
tr.vault-file-row {
    cursor: pointer; /* Hand Pointer */
    transition: background-color 0.15s;
}

tr.vault-file-row:hover {
    background-color: #f0f4ff !important; /* Highlight row on hover */
}

/* --- Breadcrumbs --- */
.vault-crumb-link {
    text-decoration: none;
    color: #4e73df;
    font-weight: 600;
    cursor: pointer; /* Hand Pointer */
}

.vault-crumb-link:hover {
    text-decoration: underline;
}

/* --- Utilities --- */
.vault-action-btn {
    cursor: pointer; /* Hand Pointer for action buttons */
}

/* Drag & Drop Ghosting (If implementing sorting later) */
.sortable-ghost {
    opacity: 0.4;
    background-color: #c8ebfb !important;
}

/* --- Drag & Drop Visuals --- */
.vault-file-item[draggable="true"], 
.vault-file-row[draggable="true"] {
    cursor: grab;
}

.vault-file-item[draggable="true"]:active, 
.vault-file-row[draggable="true"]:active {
    cursor: grabbing;
}

/* Drop Target Highlight */
.folder-item.drag-over, 
.vault-crumb-link.drag-over, 
.breadcrumb-item.active.drag-over { /* Allows dropping on current folder text, though redundant */
    background-color: #e8f0fe !important;
    outline: 2px dashed #4285f4;
    color: #1967d2;
    border-radius: 4px;
}


/* Hero Folder Cards */
.ws-hero-card {
    background-color: #fff; /* Fallback */
    /* Note: Dynamic gradient set via JS */
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ws-hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Ensure text is readable on dark colors */
.ws-hero-card.is-dark h3, 
.ws-hero-card.is-dark .ws-hero-count,
.ws-hero-card.is-dark i {
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.ws-hero-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.8;
}


/* --- SECURE VAULT & WORKSHEET STYLING --- */

/* 1. Layout & Wrapper */
.vault-wrapper {
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e3e6f0;
    min-height: 650px;
}

.vault-sidebar {
    width: 280px;
    background-color: #f8f9fc;
    border-right: 1px solid #e3e6f0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.vault-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #fff;
}

/* 2. Hero Cards (Beautiful Gradients) */
.vault-hero-card .card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}
.vault-hero-card:hover .card {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
}
.vault-hero-icon {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. File Grid Cards */
.ws-file-card {
    border: 1px solid #e3e6f0;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
    background: #fff;
}
.ws-file-card:hover {
    border-color: #4e73df;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.ws-file-title {
    font-weight: 600;
    color: #2c3e50;
    margin-top: 10px;
}

/* 4. Tree View Styling */
.ws-tree-row {
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.15s;
    color: #5a5c69;
}
.ws-tree-row:hover {
    background: #eaecf4;
    color: #2e59d9;
}
.ws-tree-row.active {
    background: #e0f2ff; /* Light Blue Active */
    color: #2e59d9;
    font-weight: 600;
}
.ws-tree-toggle {
    width: 24px;
    text-align: center;
    color: #b7b9cc;
    cursor: pointer;
}
.ws-tree-toggle:hover { color: #4e73df; }

/* 5. Drag & Drop Visuals */
.drag-over {
    background-color: #e0f2ff !important;
    border: 2px dashed #4e73df !important;
    transform: scale(1.02);
}

/* 6. List View Polish */
.vault-file-row td {
    vertical-align: middle;
    padding: 12px 15px;
}
.vault-file-row:hover {
    background-color: #f8f9fc;
}
.ws-folder-item-row {
    background-color: #fffbe6; /* Subtle yellow tint for folders */
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 991px) {
    /* Stack Sidebar */
    .vault-wrapper {
        flex-direction: column; 
    }
    .vault-sidebar {
        width: 100%;
        height: auto;
        max-height: 300px; /* Scrollable if too tall */
        border-right: none;
        border-bottom: 1px solid #e3e6f0;
    }
    
    /* Adjust Grid Columns for Tablets */
    .col-lg-3 { width: 33.33%; }
}

@media (max-width: 767px) {
    /* Stack Header Controls */
    .vault-content .d-flex.justify-content-between {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }
    
    /* File Grid Mobile (2 per row) */
    .col-6 { width: 50%; } 
    
    /* Hide Non-Essential Table Columns */
    .vault-file-list th:nth-child(2), .vault-file-list td:nth-child(2), /* Date */
    .vault-file-list th:nth-child(3), .vault-file-list td:nth-child(3)  /* Type */
    {
        display: none; 
    }
    
    /* Hero Cards Stack */
    #vault-hero-row {
        flex-direction: column;
    }
}