

.sharepoint-toolbar {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 15px;
}

.sharepoint-toolbar button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #555;
    padding: 5px 10px;
}

.sharepoint-toolbar button:hover {
    color: #3f51b5;
}

.sharepoint-files-container {
    flex: 1;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
}

.sharepoint-file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.sharepoint-file-item:hover {
    background-color: #f8f9fa;
}

.sharepoint-file-item.selected {
    background-color: #e3f2fd;
}

.sharepoint-file-icon {
    margin-right: 10px;
    font-size: 20px;
    color: #555;
}

.sharepoint-file-icon.folder {
    color: #ffc107;
}

.sharepoint-file-icon.document {
    color: #2196f3;
}

.sharepoint-file-name {
    flex: 1;
    font-size: 14px;
}

.sharepoint-file-checkbox {
    margin-left: 10px;
}


.sharepoint-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.btn-import {
    padding: 10px 20px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-import:hover {
    background-color: #388e3c;
}

/* Responsive design */
@media (max-width: 768px) {
    .files-container {
        grid-template-columns: 1fr;
    }
    
    .sharepoint-login-section {
        max-width: 100%;
    }
}

/* Specific styling for SharePoint tab */
#sharepoint-tab {
    background-color: #f9f9f9;
}

#sharepoint-tab.active {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sharepoint-info-banner {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.sharepoint-info-banner i {
    color: #2196f3;
    font-size: 18px;
    margin-right: 10px;
}

.sharepoint-info-banner span {
    color: #333;
    font-size: 14px;
}

.refresh-notice {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff8e1;
    border: 1px solid #ffca28;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.5s ease-out;
}

.notice-content {
    display: flex;
    align-items: center;
}

.notice-content i {
    color: #ff9800;
    font-size: 18px;
    margin-right: 10px;
}

.notice-content span {
    color: #333;
    font-size: 14px;
    margin-right: 15px;
}

.btn-refresh {
    background-color: #ff9800;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-refresh:hover {
    background-color: #f57c00;
}
.sidebar {
    /* width: 25%; */
    /* background-color: #2c3e50;
    color: white;
    width: 60px;
    min-width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; */
    position: relative;
     /* height: 100%;  */
    box-sizing: border-box; 
}

.sidebar {
    position: relative;
    /* height: 100vh; */
}
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.overlay.active {
    display: block;
    opacity: 1;
    /* z-index: ; */
}


.drawer {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.drawer.open {
    right: 0;
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1a1a1a;
    font-weight: 600;
}

.close-drawer {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    transition: color 0.2s;
}

.close-drawer:hover {
    color: #333;
}

.upload-container {
    padding: 20px;
}

.upload-box {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    background: #fafafa;
    transition: all 0.2s ease;
    cursor: pointer;
}

.upload-box:hover, .upload-box.dragover {
    border-color: #2196f3;
    background: #f5f9ff;
}

.upload-icon {
    color: #666;
    margin-bottom: 16px;
}

.upload-text {
    margin: 12px 0;
    font-size: 1rem;
    color: #333;
}

.browse-text {
    color: #2196f3;
    text-decoration: underline;
    cursor: pointer;
}

.upload-hint {
    margin: 8px 0 0;
    font-size: 0.875rem;
    color: #666;
}

.file-input {
    display: none;
}

.files-section {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.file-section {
    margin-bottom: 24px;
}

.file-section h3 {
    font-size: 1.125rem;
    color: #333;
    margin: 0 0 16px;
    font-weight: 500;
}

.files-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    gap: 12px;

    position: relative;
    /* display: flex; */
    /* align-items: center; */
    /* padding: 1rem; */
    /* background: #fff; */
    /* border-radius: 8px; */
    margin-bottom: 0.5rem;
    /* border: 1px solid #e0e0e0; */
    transition: all 0.3s ease;
}

.file-item:hover {
    transform: translateX(-5px);
    border-color: #ddd;
}

.file-icon {
    margin-right: 10px;
    width: 24px;
    text-align: center;
}
.file-checkbox {
    margin-right: 10px;
}

.file-info {
    flex: 1;
    min-width: 0;
}


.file-size {
    width: 80px;
    text-align: right;
    color: #666;
    font-size: 0.9em;
    margin-right: 10px;
}

.file-actions {
    display: flex;
}

.file-status {
    font-size: 0.75rem;
    color: #666;
    margin: 4px 0 0;
}

.progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #2196f3;
    width: 0;
    transition: width 0.3s ease;
}

.file-item.success {
    border-color: #4caf50;
}

.file-item.error {
    /* border-color: #f44336; */
    border-color: #ffebee;
    background-color: #fff5f5;
}

.file-item.removing {
    transform: translateX(100px);
    opacity: 0;
}

.delete-file-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: auto;
}

.delete-file-btn:hover {
    background-color: #fee2e2;
}

.delete-file-btn:active {
    transform: scale(0.95);
}

.delete-file-btn svg {
    color: #ef4444;
    transition: transform 0.2s ease;
}

.trash-icon {
    transition: all 0.3s ease-in-out;
}

.delete-file-btn:hover .trash-lid {
    transform: translateY(-3px) rotate(-10deg); /* Moves the lid up and slightly rotates it */
}

.file-item.removing {
    transform: translateX(100px);
    opacity: 0;
    transition: all 0.3s ease;
}


.status-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.success .status-icon {
    color: #4caf50;
}

.error .status-icon {
    color: #f44336;
}


/* Empty state styles */
.files-container:empty::after {
    content: 'No documents yet';
    display: block;
    text-align: center;
    color: #666;
    padding: 20px;
    font-size: 0.875rem;
    background: #f5f5f5;
    border-radius: 8px;
}

#uploadedFilesContainer:empty::after {
    content: 'No documents uploaded yet';
}

#uploadingFilesContainer:empty::after {
    content: 'No active uploads';
}

/* 
.outer-upload-button{
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin:5px;
}

.upload-button {
    background: linear-gradient(75.37deg, #0043FF 25.69%, #3F5BE3 105.3%);
    color: white; 
    font-weight: 600;
    border: none; 
    padding: 0.4rem 0.4rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-right: 16px;
}
   
.button-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
} */


.drawer.open {
    left: 0px; /* Adjust to match the sidebar width */
}


/* PDF Drawer Styles */
/* this is for closing the pdf drawer */
.drawer-toggle {
    /* width: 100%; */
    padding: 10px;
    background: none;
    border: none;
    color: white;
    /* color: #333333;; */
    /* font-size: 24px; */
    font-size: 30px;
    cursor: pointer;
    outline: none;
    /* text-align: center; */
    text-align: end;
    position: absolute;
    /* top: 10px; */ 
    /* left: 0; */ 
    z-index: 200;  /* Ensuring visibility */
    top: 3px; 
    right: -4px;

}
/* sidebar.css */
.pdf-drawer {
    position: fixed;
    right: -100%;
    top: 70px;
    /* width: 33%; */
    /* width: 40%; */
    width: 37%;
    /* max-width: 595px; A4 width in pixels for screen (72 DPI) */
    height: 90%; 
    background-color: #fff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
    /* transition: right 0.3s ease; */
    transition: none; /* Disable transition during resizing */
    z-index: 200; 
    max-height: 100%;
    margin: 0;
    padding: 0;
    /* height: 100vh; */
    display: flex;
    justify-content: flex-end;
    overflow: hidden;

}

.pdf-drawer.open {
    right: 0;
}

.pdf-drawer-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    height: 95%;
}
 

.pdf-container {
    width: 100%;
}
 
.pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
}
    
highlight {
    background-color: yellow; /* Highlight background */
    color: black;             /* Text color */
    font-weight: bold;        /* Bold text */
    padding: 2px;             /* Add some padding around the text */
    border-radius: 4px;       /* Optional: Rounded corners for the highlight */
} 


download-btn {
    padding: 4px 8px;
    background-color: #0078d4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.download-btn:hover {
    background-color: #106ebe;
}

.sharepoint-footer {
    padding: 10px;
    border-top: 1px solid #e0e0e0;
    background-color: #f5f5f5;
    display: flex;
    justify-content: space-between;
}


.btn-secondary {
    padding: 6px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Specific styling for SharePoint tab */
#sharepoint-tab {
    background-color: #f9f9f9;
}

#sharepoint-tab.active {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sharepoint-info-banner {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.sharepoint-info-banner i {
    color: #2196f3;
    font-size: 18px;
    margin-right: 10px;
}

.sharepoint-info-banner span {
    color: #333;
    font-size: 14px;
}

.refresh-notice {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff8e1;
    border: 1px solid #ffca28;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.5s ease-out;
}

.notice-content {
    display: flex;
    align-items: center;
}

.notice-content i {
    color: #ff9800;
    font-size: 18px;
    margin-right: 10px;
}

.notice-content span {
    color: #333;
    font-size: 14px;
    margin-right: 15px;
}




@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* Document Manager Styles */
.document-manager-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    margin-top: 0;
    padding: 10px 20px;
    background-color: #f5f5f7;
    overflow: hidden;
    position: relative;
}
  
.back-button {
    color: #fff;
    margin-right: 10px;
    font-size: 1.2rem;
    text-decoration: none;
}

.tabs-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    padding: 0 15px;
}

.tab-btn {
    padding: 15px 20px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-right: 10px;
    min-width: 140px;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.tab-btn:hover {
    background-color: rgba(63, 81, 181, 0.05);
    color: #3f51b5;
}

.tab-btn.active {
    color: #3f51b5;
    background-color: white;
    font-weight: 600;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #3f51b5;
}

.tab-content {
    display: none;
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    overflow-y: auto;

}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-section h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 20px;
}

/* Documents Section */
.documents-section {
    flex: 1;
}

.file-section {
    margin-bottom: 30px;
}

.file-section h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 16px;
    font-weight: 500;
}

.files-container {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

/* SharePoint Styles */
.sharepoint-login-section {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sharepoint-login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.btn-connect {
    padding: 12px;
    background-color: #3f51b5;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-connect:hover {
    background-color: #303f9f;
}

/* SharePoint Browser */
.sharepoint-browser {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.sharepoint-header {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f5f5f5;
}

#sharepointBack {
    padding: 6px 12px;
    margin-right: 10px;
    border: 1px solid #ccc;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
}

#sharepointBack:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#currentPath {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

#sharepointFiles {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: default;
}

.folder-item {
    cursor: pointer;
}

.folder-item:hover {
    background-color: #f0f7ff;
}

.file-icon {
    margin-right: 10px;
    width: 24px;
    text-align: center;
}

.file-checkbox {
    margin-right: 10px;
}

.file-name {
    flex: 1;
    margin-right: 10px;
    white-space: nowrap;
    overflow: auto;
}


.file-name::-webkit-scrollbar {
  display: none;               /* Hide scrollbar in Chrome, Safari, and Opera */
}

.file-size {
    width: 80px;
    text-align: right;
    color: #666;
    font-size: 0.9em;
    margin-right: 10px;
}

.file-actions {
    display: flex;
}

.download-btn {
    padding: 4px 8px;
    background-color: #0078d4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.download-btn:hover {
    background-color: #106ebe;
}

.sharepoint-footer {
    padding: 10px;
    border-top: 1px solid #e0e0e0;
    background-color: #f5f5f5;
    display: flex;
    justify-content: space-between;
}

#importSharepointFiles {
    padding: 8px 16px;
    background-color: #0078d4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#importSharepointFiles:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 6px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Specific styling for SharePoint tab */
#sharepoint-tab {
    background-color: #f9f9f9;
}

#sharepoint-tab.active {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sharepoint-info-banner {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.sharepoint-info-banner i {
    color: #2196f3;
    font-size: 18px;
    margin-right: 10px;
}

.sharepoint-info-banner span {
    color: #333;
    font-size: 14px;
}

.refresh-notice {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff8e1;
    border: 1px solid #ffca28;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.5s ease-out;
}

.notice-content {
    display: flex;
    align-items: center;
}

.notice-content i {
    color: #ff9800;
    font-size: 18px;
    margin-right: 10px;
}

.notice-content span {
    color: #333;
    font-size: 14px;
    margin-right: 15px;
}

.btn-refresh {
    background-color: #ff9800;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-refresh:hover {
    background-color: #f57c00;
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.file-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.file-checkbox {
    margin-right: 10px;
}

.sharepoint-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

#importSharepointFiles {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #0078d4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#importSharepointFiles:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 768px) {
    .files-container {
        grid-template-columns: 1fr;
    }
    
    .sharepoint-login-section {
        max-width: 100%;
    }
}

.connection-instructions {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.connection-instructions p {
    margin: 10px 0;
    font-size: 14px;
    color: #333;
}

.connection-instructions code {
    display: block;
    padding: 10px;
    background-color: #e0f2f1;
    border-left: 4px solid #26a69a;
    margin: 10px 0;
    font-family: monospace;
    word-break: break-all;
}

.form-note {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.direct-sharepoint-link {
    margin-left: auto;
    padding: 6px 12px;
    background-color: #107c10;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.direct-sharepoint-link:hover {
    background-color: #0b5a0b;
    color: white;
}