/* Tabs */
.tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    justify-content: center;
    padding: 0.5rem 0;
}

.tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #4a5568;
    position: relative;
    white-space: nowrap;
    min-width: 140px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
}

.tab i {
    font-size: 14px;
}

.tab:hover {
    background: #edf2f7;
    color: #2d3748;
}

.tab.active {
    background: white;
    border-bottom-color: #3182ce;
    color: #3182ce;
}

.tab-content {
    padding: 0;
    height: calc(100vh - 160px);
    overflow: hidden;
}

.tab-pane {
    display: none;
    height: 100%;
}

.tab-pane.active {
    display: block;
    height: 100%;
}

/* Add padding for summary and details tabs to separate from control panel */
#summaryTab, #detailsTab {
    padding: 1.5rem;
    height: 100%;
    overflow-y: auto;
}

#summaryContent, #detailsContent {
    margin: 0;
}

/* Image Container */
.image-container {
    text-align: center;
    padding: 20px;
    border: none;
    border-radius: 0;
    background: #fafafa;
    transition: all 0.3s ease;
    position: relative;
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.image-container:hover {
    background: #f5f5f5;
}

.image-container img {
    max-width: calc(100% - 100px);
    max-height: calc(100vh - 280px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    cursor: pointer;
    margin-bottom: 50px;
    padding-bottom: 50px;
}

.image-container img:hover {
    transform: scale(1.02);
}

.image-placeholder {
    color: #718096;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 175px;
    max-width: none;
}

.image-placeholder .placeholder-content {
    padding: 2rem;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    max-width: 90%;
    width: 100%;
    max-height: 85%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.image-placeholder .placeholder-icon {
    font-size: 48px;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.image-placeholder h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 600;
}

.image-placeholder p {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 1rem;
}

.image-placeholder .placeholder-hint {
    font-size: 0.8rem;
    color: #a0aec0;
    font-style: italic;
}

/* Reference Tab Specific */
#referenceTab .image-placeholder {
    padding-top: 40px;
}

#referenceTab .image-container img {
    max-width: calc(90% - 100px);
    max-height: calc(90vh - 280px);
}

/* Reference Controls */
.reference-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.reference-info h3 {
    margin: 0 0 0.25rem 0;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reference-info p {
    margin: 0;
    color: #718096;
    font-size: 0.85rem;
}

.reference-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.reference-details {
    margin-top: 1rem;
    padding: 1rem;
    background: #ebf8ff;
    border-radius: 8px;
    border-left: 3px solid #3182ce;
}

.reference-details h4 {
    margin: 0 0 0.5rem 0;
    color: #1e3a8a;
    font-size: 0.9rem;
    font-weight: 600;
}

.inspection-legend {
    margin-top: 1rem;
    padding: 1rem;
    background: #f0fff4;
    border-radius: 8px;
    border-left: 3px solid #38a169;
}

.legend-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: #22543d;
    font-weight: 600;
    font-size: 0.9rem;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #2f855a;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.success {
    background: #38a169;
}

.legend-color.error {
    background: #e53e3e;
}

.legend-color.info {
    background: #3182ce;
}

/* Labeling Tab Styles can be made into own file*/
/* Full-width labeling area for new layout */
.labeling-canvas-area-fullwidth {
    height: calc(100vh - 190px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
}

.labeling-canvas-area-fullwidth #labelingCanvasContainer {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.labeling-canvas-area-fullwidth #labelingCanvas {
    max-width: 100%;
    max-height: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Original labeling container for backwards compatibility */
.labeling-container {
    display: flex;
    height: calc(100vh - 250px);
    min-height: 600px;
    gap: 0;
}

.labeling-canvas-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.labeling-canvas-area .image-placeholder {
    border: none;
    background: transparent;
}

#labelingCanvasContainer {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#labelingCanvas {
    max-width: 100%;
    max-height: 100%;
    cursor: crosshair;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.labeling-sidebar {
    width: 350px;
    background: white;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.labeling-section {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.labeling-section:last-child {
    border-bottom: none;
}

.labeling-section h3 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.labeling-section h3 i {
    color: #3182ce;
    font-size: 0.85rem;
}

/* Category List */
.category-search {
    margin-bottom: 0.75rem;
}

.category-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.2s ease;
}

.category-search input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.category-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: #f8fafc;
}

.category-item:hover {
    background: #edf2f7;
}

.category-item.active {
    background: #ebf8ff;
    border-color: #3182ce;
}

.category-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 2px solid rgba(0,0,0,0.1);
}

.category-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #2d3748;
}

.category-count {
    font-size: 11px;
    color: #718096;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Annotation Info */
.annotation-info {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
    min-height: 100px;
}

.annotation-info .info-text {
    margin: 0;
    color: #718096;
    font-size: 13px;
    text-align: center;
}

.annotation-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.annotation-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.annotation-detail-label {
    color: #718096;
    font-weight: 500;
}

.annotation-detail-value {
    color: #2d3748;
    font-weight: 600;
}

/* Tool Buttons */
.tool-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-buttons .btn {
    justify-content: flex-start;
    margin-bottom: 0;
}

.tool-buttons .btn.btn-active {
    background: #3182ce;
    color: white;
    border-color: #2c5282;
}