/* --- Styles for Editor Mode Container and Tabs --- */

.editor-mode-section {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 0 16px 16px 16px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
}

.editor-mode-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 12px 20px 12px;
    flex-shrink: 0;
}

/* Editor Mode Tabs Container */
.editor-mode-tabs {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
}

/* Editor Tab Button */
.editor-tab-btn {
    padding: 0 10px;
    background: transparent;
    color: #6b7280;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-family: 'Calibri', 'Roboto', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative;
}

.editor-tab-btn i {
    font-size: 14px;
    transition: all 0.3s ease;
}

.editor-tab-btn:hover {
    background: transparent;
    color: #374151;
}

.editor-tab-btn.active {
    background: transparent;
    color: #4a90e2;
    font-weight: 600;
}

.editor-tab-btn.active i {
    color: #4a90e2;
}

/* Tab Content Container */
.editor-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
    padding-top: 0;
}

.editor-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Empty State for Production Errors Tab */
.production-errors-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: #6b7280;
    flex: 1;
}

.production-errors-empty-state i {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.production-errors-empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
    font-family: 'Calibri', 'Roboto', sans-serif;
}

.production-errors-empty-state p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    font-family: 'Calibri', 'Roboto', sans-serif;
    max-width: 400px;
}

/* Production Report Container */
.production-report-container {
    display: flex;
    flex-direction: column;
    padding: 16px;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Ensure familywise section takes full height/width correctly inside */
.production-report-container .pdm-familywise-section {
    width: 100%;
    min-width: unset;
    flex: 1;
}

/* Mode Toggle Split Switch Style */
.mode-toggle {
    display: flex;
    position: relative;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 3px;
    width: 200px;
    height: 38px;
    box-sizing: border-box;
    cursor: pointer;
    margin-left: auto;
    border: 1px solid #e5e7eb;
}

.mode-toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    z-index: 2;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    border-radius: 6px;
    font-family: 'Calibri', 'Roboto', sans-serif;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mode-toggle-btn.active {
    color: #1e40af;

}

/* The Sliding Glider */
.mode-glider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: #ffffff;
    border-radius: 6px;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* State: Editor Mode Active */
.mode-toggle[data-active-mode="editor"] .mode-glider {
    transform: translateX(0);
}

.mode-toggle[data-active-mode="editor"] .mode-toggle-btn[data-mode="editor"] {
    color: #0d9488;
    font-weight: 600;
}

/* State: QC Mode Active */
.mode-toggle[data-active-mode="qc"] .mode-glider {
    transform: translateX(100%);
}

.mode-toggle[data-active-mode="qc"] .mode-toggle-btn[data-mode="qc"] {
    color: #7c3aed;
    font-weight: 600;
}

/* Adjustments for buttons inside toggle */
.mode-toggle-btn:focus {
    outline: none;
}

/* Container for family badges */
.heading-families {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    align-items: center;
}

/* Base family badge styling */
.family-badge {
    display: inline-block;
    background-color: #e5e7eb;
    color: #374151;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

/* Primary family badge (grouping family for PDM creation) */
.family-badge-primary {
    background-color: #3b82f6;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.2);
}

/* Hover effects */
.family-badge:hover {
    background-color: #d1d5db;
}

.family-badge-primary:hover {
    background-color: #2563eb;
}

/* Small badge variant for modals - Enhanced styling */
.family-badge-small {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}