/* Document Tree Styles */

.document-tree-container {
    background: linear-gradient(135deg, rgba(36, 91, 163, 0.05), rgba(30, 36, 51, 0.6));
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.folder-tree {
    font-family: 'Inter', sans-serif;
}

.tree-node {
    margin-bottom: 8px;
}

.tree-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(30, 36, 51, 0.6), rgba(20, 24, 36, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tree-header:hover {
    background: linear-gradient(135deg, rgba(36, 91, 163, 0.15), rgba(30, 36, 51, 0.9));
    border-color: rgba(36, 91, 163, 0.4);
    transform: translateX(4px);
}

.chevron-icon {
    font-size: 12px;
    color: #A0AEC0;
    transition: transform 0.3s ease;
}

.folder-icon {
    font-size: 18px;
    color: #0052A3;
}

.race-node .folder-icon {
    color: #DE2731;
}

.user-node .folder-icon {
    color: #0052A3;
}

.category-node .folder-icon.fa-hotel {
    color: #F57C00;
}

.category-node .folder-icon.fa-plane {
    color: #00796B;
}

.node-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 12px;
}

.country-flag {
    width: 28px !important;
    height: 21px !important;
    margin-right: 8px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    vertical-align: middle;
    object-fit: cover;
    display: inline-block;
    flex-shrink: 0;
}

.node-badge {
    font-size: 12px;
    font-weight: 500;
    color: #A0AEC0;
    background: rgba(36, 91, 163, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
}

.btn-upload-small {
    background: linear-gradient(135deg, #0052A3, #1a4376);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.tree-header:hover .btn-upload-small {
    opacity: 1;
}

.btn-upload-small:hover {
    background: linear-gradient(135deg, #2c7bc7, #0052A3);
    transform: scale(1.1);
}

.btn-manage-users {
    background: linear-gradient(135deg, #7B1FA2, #6a1b9a);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.tree-header:hover .btn-manage-users {
    opacity: 1;
}

.btn-manage-users:hover {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    transform: scale(1.1);
}

.empty-folder-message {
    padding: 30px 20px;
    text-align: center;
    color: #A0AEC0;
    background: linear-gradient(135deg, rgba(20, 24, 36, 0.4), rgba(10, 14, 26, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 10px 0;
}

.empty-folder-message i {
    font-size: 32px;
    color: rgba(36, 91, 163, 0.3);
    margin-bottom: 10px;
}

.empty-folder-message p {
    font-size: 14px;
    margin: 0;
}

.user-checkbox-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, rgba(30, 36, 51, 0.6), rgba(20, 24, 36, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.user-checkbox-item:hover {
    background: linear-gradient(135deg, rgba(36, 91, 163, 0.15), rgba(30, 36, 51, 0.9));
    border-color: rgba(36, 91, 163, 0.4);
}

.user-checkbox-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    width: 100%;
}

.user-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0052A3;
}

.user-checkbox-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
}

.user-checkbox-label i {
    color: #0052A3;
    font-size: 16px;
}

.user-checkbox-label small {
    display: block;
    color: #A0AEC0;
    font-size: 12px;
    font-weight: 400;
    margin-left: 26px;
}

.tree-children {
    padding-left: 36px;
    margin-top: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.tree-node.expanded > .tree-children {
    max-height: 5000px;
}

/* File Node Styles */
.file-node {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(20, 24, 36, 0.4), rgba(10, 14, 26, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    cursor: default;
}

.file-node:hover {
    background: linear-gradient(135deg, rgba(36, 91, 163, 0.1), rgba(20, 24, 36, 0.8));
    border-color: rgba(36, 91, 163, 0.3);
    transform: translateX(4px);
}

.file-icon {
    font-size: 16px;
    color: #4A90E2;
    min-width: 20px;
}

.file-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-new {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: linear-gradient(135deg, #4CAF50, #45A049);
    color: white;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 12px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.new-document {
    animation: slideInRight 0.5s ease-out;
    border-color: rgba(76, 175, 80, 0.4) !important;
}

.new-document:hover {
    border-color: rgba(76, 175, 80, 0.6) !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.file-meta {
    font-size: 12px;
    color: #A0AEC0;
}

.file-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-node:hover .file-actions {
    opacity: 1;
}

.file-actions .btn-icon {
    background: rgba(36, 91, 163, 0.2);
    border: 1px solid rgba(36, 91, 163, 0.3);
    color: #4A90E2;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-actions .btn-icon:hover {
    background: rgba(36, 91, 163, 0.4);
    border-color: rgba(36, 91, 163, 0.6);
    transform: scale(1.1);
}

.file-actions .btn-delete {
    background: rgba(222, 39, 49, 0.2);
    border-color: rgba(222, 39, 49, 0.3);
    color: #DE2731;
}

.file-actions .btn-delete:hover {
    background: rgba(222, 39, 49, 0.4);
    border-color: rgba(222, 39, 49, 0.6);
}

.file-actions .btn-download {
    background: rgba(0, 121, 107, 0.2);
    border-color: rgba(0, 121, 107, 0.3);
    color: #00796B;
}

.file-actions .btn-download:hover {
    background: rgba(0, 121, 107, 0.4);
    border-color: rgba(0, 121, 107, 0.6);
}

.file-actions .btn-copy {
    background: rgba(36, 91, 163, 0.2);
    border-color: rgba(36, 91, 163, 0.3);
    color: #245BA3;
}

.file-actions .btn-copy:hover {
    background: rgba(36, 91, 163, 0.4);
    border-color: rgba(36, 91, 163, 0.6);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #A0AEC0;
}

.empty-state i {
    font-size: 64px;
    color: rgba(36, 91, 163, 0.3);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 16px 0 8px;
}

.empty-state p {
    font-size: 14px;
    color: #A0AEC0;
}

/* Drag and Drop Styles */
.tree-header.drag-over {
    background: linear-gradient(135deg, rgba(36, 91, 163, 0.3), rgba(222, 39, 49, 0.2)) !important;
    border: 2px dashed rgba(36, 91, 163, 0.8) !important;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(36, 91, 163, 0.5);
}

.tree-header.drop-zone {
    position: relative;
}

.tree-header.drop-zone::after {
    content: '📁 Drop files here';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tree-header.drag-over::after {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .tree-children {
        padding-left: 20px;
    }
    
    .file-node {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .file-meta {
        width: 100%;
        order: 3;
    }
    
    .file-actions {
        opacity: 1;
    }
}
