/* 
   TC Trade Portal - Main Stylesheet
   ----------------------------------
*/

/* Global Styles */
body {
    background-color: #ffffff;
    min-height: 100vh;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Header & Navigation */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

.navbar-brand {
    font-weight: bold;
}

.navbar-logo {
    height: 40px;
    margin-right: 10px;
}

.nav-link {
    color: #333333 !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #b0a7a0 !important;
}

/* Buttons */
.btn-primary {
    background-color: #b0a7a0;
    border-color: #b0a7a0;
    color: #ffffff;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #9e958e;
    border-color: #9e958e;
    color: #ffffff;
}

.btn-outline-primary {
    border-color: #b0a7a0;
    color: #b0a7a0;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: #b0a7a0;
    border-color: #b0a7a0;
    color: #ffffff;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.card-header {
    background-color: #b0a7a0;
    color: #ffffff;
    font-weight: 500;
}

/* Forms */
.form-control:focus {
    border-color: #b0a7a0;
    box-shadow: 0 0 0 0.25rem rgba(176, 167, 160, 0.25);
}

.search-form {
    background-color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* File & Folder Items */
.file-item, .folder-item {
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background: white;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-item:hover, .folder-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.file-item .text-truncate, .folder-item .text-truncate {
    max-width: 100%;
    font-size: 0.85rem;
}

.file-item .text-muted {
    font-size: 0.75rem;
}

.thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    margin-bottom: 0.5rem;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background-color: #f8f9fa;
}

.thumbnail-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

.thumbnail-bg:hover {
    transform: scale(1.05);
}

.file-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.file-info {
    font-size: 0.875rem;
    color: #6c757d;
}

.folder-icon {
    font-size: 2rem;
    color: #b0a7a0;
}

.folder-icon-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    margin-bottom: 0.5rem;
}

.folder-icon-container i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: #b0a7a0;
    transition: transform 0.3s ease;
}

.folder-item:hover .folder-icon-container i {
    transform: translate(-50%, -50%) scale(1.1);
}

.file-type-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.download-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
    background-color: rgba(0,0,0,0.6);
    color: white;
    border: none;
}

.download-btn:hover {
    background-color: rgba(0,0,0,0.8);
    color: white;
}

.file-item:hover .download-btn {
    opacity: 1;
}

/* Breadcrumbs */
.breadcrumb {
    background-color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.breadcrumb-item a:hover {
    color: #9e958e;
    text-decoration: underline;
}

/* Selection Checkboxes */
.selection-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1;
}

.bulk-actions {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
}

.bulk-actions.show {
    display: flex;
    gap: 1rem;
}

.selected-item {
    background-color: rgba(176, 167, 160, 0.1);
}

/* Homepage Specific */
.home-container {
    max-width: 900px;
    margin: 3rem auto;
    text-align: center;
}

.home-logo {
    max-width: 200px;
    margin-bottom: 2rem;
}

.home-title {
    color: #333;
    margin-bottom: 1.5rem;
}

.home-subtitle {
    color: #6c757d;
    margin-bottom: 2rem;
}

.login-options {
    margin-top: 3rem;
}

/* Lightbox */
.glightbox-clean .gslide-description {
    background: #b0a7a0;
}

.glightbox-clean .gclose {
    background: #b0a7a0;
    color: #ffffff;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links a {
    margin-left: 1rem;
    color: #6c757d;
    text-decoration: none;
}

.footer-links a:hover {
    color: #b0a7a0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        margin-top: 1rem;
    }
    
    .footer-links a {
        margin: 0 0.5rem;
    }
}

/* Admin-specific styles */
.dropzone {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    background: white;
    padding: 2rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.dropzone:hover {
    border-color: #b0a7a0;
}

.action-buttons {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .action-buttons,
.folder-item:hover .action-buttons {
    opacity: 1;
}

.btn-icon {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
}

.dropzone .dz-preview.dz-processing .dz-progress {
    opacity: 1;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    background: white;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #b0a7a0;
    background-color: #f8f9fa;
}

.upload-area.dragover {
    border-color: #b0a7a0;
    background-color: #f8f9fa;
}

.upload-area-content {
    pointer-events: none;
}

.upload-progress {
    margin-top: 1rem;
}

.upload-status {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Modals */
.modal-body .dropzone {
    min-height: 200px;
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 20px;
    transition: all 0.3s ease;
}

.modal-body .dropzone:hover {
    border-color: #b0a7a0;
}

.modal-header {
    background-color: #b0a7a0;
    color: white;
}

.modal-header .btn-close {
    color: white;
}

/* Grid column fixes */
@media (min-width: 992px) {
    /* Custom column sizes for 8-column layout */
    .col-lg-1dot5 {
        flex: 0 0 auto;
        width: 12.5%; /* 1/8 = 12.5% */
    }
    
    .row-cols-lg-8 > .col {
        flex: 0 0 auto !important;
        width: 12.5% !important;
        max-width: 12.5% !important;
    }
    
    /* Additional specific rule for the asset grid */
    .asset-grid > .col {
        flex: 0 0 auto !important;
        width: 12.5% !important;
        max-width: 12.5% !important;
    }
    
    /* Debug border to see column sizes */
    .asset-grid .col {
        position: relative;
    }
}

/* More specific overrides to ensure columns work */
@media (min-width: 576px) and (max-width: 767.98px) {
    .row-cols-sm-3 > .col {
        flex: 0 0 auto;
        width: 33.333333%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .row-cols-md-4 > .col {
        flex: 0 0 auto;
        width: 25%;
    }
}

@media (max-width: 575.98px) {
    .row-cols-2 > .col {
        flex: 0 0 auto;
        width: 50%;
    }
} 