/* Google Drive Style Folder Grid */
.folder-grid-item {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #e3e6ef;
    min-height: 120px;
}

.folder-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: #f9ab00;
}

/* Yellow Folder Icon Styling */
.folder-icon-yellow {
    font-size: 48px;
    color: #f9ab00;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(249, 171, 0, 0.3));
    transition: all 0.3s ease;
}

.folder-grid-item:hover .folder-icon-yellow {
    transform: scale(1.05);
    color: #ea8600;
}

.folder-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
    word-break: break-word;
}

.folder-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

/* Three Dots Menu Styling */
.folder-menu-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #555;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
}

.folder-menu-btn:hover {
    background: #ffffff;
    border-color: #adb5bd;
    color: #333;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.folder-menu-btn i {
    font-size: 16px;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 180px;
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

.dropdown-item i {
    width: 20px;
    font-size: 14px;
}

.dropdown-item.text-danger:hover {
    background-color: #fee;
    color: #dc3545 !important;
}

.folder-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.folder-grid-item:hover .folder-actions {
    opacity: 1;
}

.expand-button {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.expand-button:hover {
    background: #f9ab00;
    color: white;
    border-color: #f9ab00;
}

.expand-button i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.expand-button.expanded i {
    transform: rotate(90deg);
}

.subfolder-indicator {
    position: absolute;
    bottom: 10px;
    left: 15px;
    font-size: 11px;
    color: #888;
}

.subfolders-container {
    margin-left: 20px;
    border-left: 2px solid #f0f0f0;
    padding-left: 15px;
    transition: all 0.3s ease;
}

.subfolders-container .folder-grid-item {
    min-height: 100px;
    font-size: 12px;
}

.subfolders-container .folder-icon-yellow {
    font-size: 36px;
}

.subfolders-container .folder-name {
    font-size: 12px;
}

.subfolders-container .folder-info {
    font-size: 10px;
}

/* Table View Styling */
.folder-table-container .table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.folder-table-container .table td {
    vertical-align: middle;
    border-color: #e9ecef;
}

.folder-table-container .table tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

.folder-icon-table {
    font-size: 24px;
    color: #f9ab00;
    margin-right: 8px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

.breadcrumb-item a {
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Search and Filter Styling */
.search-filter-card {
    background-color: #0069A7;
    border: 1px solid #1d466e;
    border-radius: 10px;
}

.search-filter-card .card-body {
    padding: 1rem 1.5rem;
}

.input-group .input-group-text {
    background-color: #ffffff;
    border-color: #ced4da;
    color: #6c757d;
}

.input-group .form-control {
    border-color: #ced4da;
}

.input-group .form-control:focus {
    border-color: #f9ab00;
    box-shadow: 0 0 0 0.2rem rgba(249, 171, 0, 0.25);
}

.input-group .btn-outline-secondary {
    border-color: #ced4da;
    color: #6c757d;
}

.input-group .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.form-select:focus {
    border-color: #f9ab00;
    box-shadow: 0 0 0 0.2rem rgba(249, 171, 0, 0.25);
}

.btn-group .btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
}

.btn-group .btn-outline-primary.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
}

.btn-group .btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
}

#noResultsMessage {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#noResultsMessage .text-muted {
    max-width: 400px;
}

#noResultsMessage i {
    opacity: 0.5;
}

/* Folder transition effects for search */
.folder-grid-item {
    transition: all 0.3s ease;
}

.folder-grid-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Ensure proper ordering with flexbox */
.folder-grid-container .row {
    display: flex;
    flex-wrap: wrap;
}

.folder-grid-container .row > div {
    flex: 0 0 auto;
}

/* Search result highlighting */
.search-highlight {
    background-color: rgba(249, 171, 0, 0.2);
    padding: 1px 2px;
    border-radius: 2px;
}

/* Toast close button offset (replaces inline style) */
.fm-toast .fm-toast-close-btn {
    margin-top: 14px !important;
    margin-right: 8px;
}

/* Modal header styling */
.modal-header-primary {
    background-color: #0069A7 !important;
    color: #ffffff !important;
}

/* Initially hidden elements */
.initially-hidden {
    display: none !important;
}

/* Share permissions table container */
.share-permissions-container {
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
}

/* My Folders (Shared Folders) Specific Styling - YELLOW THEME */
.folder-icon-shared {
    font-size: 48px;
    color: #f9ab00;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(249, 171, 0, 0.3));
    transition: all 0.3s ease;
}

.folder-grid-item:hover .folder-icon-shared {
    transform: scale(1.05);
    color: #ea8600;
}

.share-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
}

.share-badge .badge {
    font-size: 10px;
    padding: 2px 6px;
}

/* Enhanced folder grid item styling for shared folders */
.folder-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: #f9ab00;
}

.expand-button {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.expand-button:hover {
    background: #f9ab00;
    color: white;
    border-color: #f9ab00;
}

.expand-button i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.expand-button.expanded i {
    transform: rotate(90deg);
}

.subfolders-container {
    margin-left: 20px;
    border-left: 2px solid #f0f0f0;
    padding-left: 15px;
    transition: all 0.3s ease;
}

.subfolders-container .folder-grid-item {
    min-height: 100px;
    font-size: 12px;
}

.subfolders-container .folder-icon-shared {
    font-size: 36px;
}

.subfolders-container .folder-name {
    font-size: 12px;
}

.subfolders-container .folder-info {
    font-size: 10px;
}

/* Table styling for shared folders */
.folder-table-container .table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.folder-table-container .table td {
    vertical-align: middle;
    border-color: #e9ecef;
}

.folder-table-container .table tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

.folder-icon-table {
    font-size: 24px;
    color: #f9ab00;
    margin-right: 8px;
}

/* Responsive adjustments for search/filter bar */
@media (max-width: 768px) {
    .search-filter-card .row.g-3 {
        gap: 1rem !important;
    }
    
    .search-filter-card .col-md-4,
    .search-filter-card .col-md-3,
    .search-filter-card .col-md-2 {
        margin-bottom: 0.5rem;
    }
}

/* Share Modal Add Button Styling */
#addPermissionsBtn {
    background-color: var(--bs-btn-hover-bg);
    border-color: var(--bs-btn-hover-border-color);
    border: none;
    border-radius: 8px;
    padding: 8px 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#addPermissionsBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3 0%, #003875 100%);
}

#addPermissionsBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

#addPermissionsBtn:disabled {
    background: #6c757d;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

#addPermissionsBtn .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Share Table Permission Column Styling */
#shareWithTable th:nth-child(4) {
    text-align: center;
}

#shareWithTable td:nth-child(4) {
    text-align: center;
    vertical-align: middle;
}

#shareWithTable .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    font-weight: 600;
}

#shareWithTable .badge i {
    font-size: 0.85em;
}

/* Enhanced table styling for share modal */
.share-permissions-container .table th {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
}

.share-permissions-container .table td {
    vertical-align: middle;
    border-color: #e9ecef;
}

.share-permissions-container .table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Fix dropdown visibility in table 
.folder-table-container {
    position: relative;
    overflow: visible !important;
}

.folder-table-container .table-responsive {
    overflow: visible !important;
    overflow-x: inherit !important;
}

.folder-table-container .dropdown {
    position: relative;
}

.folder-table-container .dropdown-menu {
    position: absolute;
    z-index: 1050;
    min-width: 160px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Ensure dropdowns show above table content 
.table .dropdown.show .dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1050;
}*/

.folder-table-container {
    min-height: 360px;
    max-height: none;
    overflow: visible;
}

.folder-table-container .table-responsive {
    overflow: visible !important;
}

.folder-table-responsive {
    overflow: visible !important;
}

.folder-table-responsive .dropdown,
.folder-table-responsive td,
.folder-table-responsive tr,
.folder-table-responsive tbody,
.folder-table-responsive table {
    overflow: visible;
}

.folder-table-responsive .dropdown-menu {
    z-index: 1080;
}

/* Folder page toast colors */
#toast-container .fm-toast {
    color: #ffffff;
}

#toast-container .fm-toast.fm-toast-success {
    background-color: #6AA43B !important;
}

#toast-container .fm-toast.fm-toast-error {
    background-color: #c0392b !important;
}

#toast-container .fm-toast.fm-toast-warning {
    background-color: #d68910 !important;
}

#toast-container .fm-toast.fm-toast-info {
    background-color: #0069a7 !important;
}

