/* Main Styles */
body {
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand i {
    color: #0d6efd;
}

/* Login Form */
.login-container {
    max-width: 400px;
    width: 100%;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

/* Model Cards */
.model-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    transition: transform 0.2s;
    height: 100%;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

.model-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.model-info {
    padding: 1rem;
}

.model-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.model-meta {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Upload Form */
.upload-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(0,0,0,.1);
}

.upload-preview {
    max-width: 300px;
    margin: 1rem auto;
    text-align: center;
}

.upload-preview img {
    max-width: 100%;
    border-radius: 4px;
}

/* Admin Dashboard */
.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 70px;
}

.dashboard-stat {
    font-size: 2rem;
    font-weight: 600;
    color: #0d6efd;
    margin-bottom: 0.1rem;
    line-height: 1.1;
}

.dashboard-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.2;
}

/* Profile Page */
.profile-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,.1);
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .login-container {
        margin: 1rem;
        padding: 1.5rem;
        max-width: none;
    }
    
    .login-container h2 {
        font-size: 1.25rem;
    }
    
    .input-group {
        flex-wrap: nowrap;
    }
    
    .input-group-text {
        padding: 0.375rem 0.75rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .model-thumbnail {
        height: 150px;
    }
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Version History */
.version-history {
    max-height: 300px;
    overflow-y: auto;
}

.version-item {
    padding: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.version-item:last-child {
    border-bottom: none;
}

/* File Type Badges */
.file-type-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: #e9ecef;
    color: #495057;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 1rem 0;
    background: #343a40;
    color: white;
    text-align: center;
}

.footer a {
    color: #fff;
    text-decoration: none;
}

.footer a:hover {
    color: #0d6efd;
}

/* Preview Section */
.preview-container {
    min-height: 200px;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
}

/* Model viewer specific styling to override padding */
.preview-container .model-viewer-container {
    margin: -1rem;  /* Negative margin to counteract parent padding */
    width: calc(100% + 2rem);  /* Full width plus padding compensation */
    border-radius: 0;  /* Remove border radius to fill container */
}

.preview-image {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preview-controls {
    margin-top: 1rem;
    text-align: center;
}

/* Profile Setup Wizard */
.step-indicator {
    padding: 10px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.step-indicator.active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.step-indicator i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 5px;
}

.step-content {
    min-height: 400px;
}

/* MFA Code Input */
.mfa-code-input {
    letter-spacing: 0.5em;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Authentication Method Cards */
.auth-method-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #dee2e6;
}

.auth-method-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
}

.auth-method-card input[type="radio"]:checked + label {
    background-color: #e3f2fd;
    border-color: #007bff;
}

.auth-method-card input[type="radio"]:checked + label .card-header {
    background-color: #007bff;
    color: white;
}

/* Progress Bar */
.progress-thin {
    height: 8px;
}

/* Icon Sizes */
.icon-large {
    font-size: 4rem;
}

.icon-medium {
    font-size: 2rem;
}

/* Progress Bar Width */
.progress-width {
    width: var(--progress-width);
}

/* Hidden Elements */
.hidden {
    display: none;
}

/* Toast Positioning */
.toast-container {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 1rem;
    z-index: 11;
}

/* Table Column Widths */
.table-col-150 {
    width: 150px;
}

.table-col-200 {
    max-width: 200px;
}

/* Max Height */
.max-height-500 {
    max-height: 500px;
}

/* Upload Zones */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.upload-zone.csv-zone:hover,
.upload-zone.csv-zone.dragover {
    border-color: #28a745;
    background-color: #d4edda;
}

.upload-zone.zip-zone:hover,
.upload-zone.zip-zone.dragover {
    border-color: #ffc107;
    background-color: #fff3cd;
}

.upload-zone-content {
    pointer-events: none;
    width: 100%;
}

.upload-zone-content button {
    pointer-events: all;
}

.upload-file-info {
    padding: 0.5rem 0.75rem !important;
}

.upload-structure-info {
    font-size: 0.875em;
}

.upload-structure-info code {
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.875em;
}

/* File Upload Progress */
.upload-progress {
    margin-top: 1rem;
}

.upload-progress .progress {
    height: 8px;
    border-radius: 4px;
}

.upload-progress .progress-bar {
    transition: width 0.3s ease;
}

/* File Type Indicators */
.file-type-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.file-type-indicator.csv {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.file-type-indicator.zip {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.file-type-indicator.model {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Upload Summary */
.upload-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.upload-summary h6 {
    margin-bottom: 0.75rem;
    color: #495057;
}

.upload-summary ul {
    margin-bottom: 0;
}

.upload-summary li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.upload-summary li:last-child {
    border-bottom: none;
}

/* Responsive Upload Zones */
@media (max-width: 768px) {
    .upload-zone {
        padding: 20px 15px;
        min-height: 120px;
    }
    
    .upload-zone-content h6 {
        font-size: 0.9rem;
    }
    
    .upload-zone-content p {
        font-size: 0.8rem;
    }
} 

/* CAD Viewer Styles */
.cad-viewer-container {
    width: 100%;
    height: 600px;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.cad-viewer-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    text-align: center;
    padding: 2rem;
}

.cad-viewer-error i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dc3545;
}

.cad-viewer-error div {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Model Viewer Styles */
.model-viewer-container {
    width: 100%;
    height: 600px;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.model-viewer-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    text-align: center;
    padding: 2rem;
}

.model-viewer-error i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dc3545;
}

.model-viewer-error div {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Preview Container Styles */
.preview-container {
    margin-bottom: 1rem;
}

.preview-image {
    max-width: 100%;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.preview-controls {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
} 

/* Thumbnail Wrapper for Dashboard Cards */
.thumbnail-wrapper {
    padding: 8px;
    background: #fff;
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 76px; /* 60px img + 8px padding left/right */
    min-height: 76px;
}

/* Responsive fix for search page action buttons */
@media (max-width: 1200px) {
    .table th[style*="width: 80px"],
    .table td .thumbnail-container {
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
    }
    .thumbnail-container img,
    .thumbnail-container .thumbnail-fallback {
        width: 48px !important;
        height: 48px !important;
    }
} 

/* Session warning banner styles */
#session-warning-banner {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 8px;
    animation: slideInRight 0.3s ease-out;
}

#session-warning-banner .btn-close {
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem 0.5rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Session warning banner responsive adjustments */
@media (max-width: 768px) {
    #session-warning-banner {
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
    }
} 