/* ============================================
   FAMILY ASSIGNMENT MODAL STYLES
   Used for both Production and QC modes
   ============================================ */

/* Modal Overlay */
.family-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

/* Modal Container */
.family-modal {
    background: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}

/* Combined modal (larger for two sections) */
.combined-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Modal Header */
.family-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.family-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #2C333A;
    margin: 0;
    font-family: 'Calibri', 'Roboto', sans-serif;
}

.family-modal-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    font-family: 'Calibri', 'Roboto', sans-serif;
}

/* Modal Actions (Buttons in Header) */
.family-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.family-modal-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Calibri', 'Roboto', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.family-modal-btn-primary {
    background: #4a90e2;
    color: white;
}

.family-modal-btn-primary:hover {
    background: #357abd;
}

.family-modal-btn-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.family-modal-btn-secondary {
    background: #f3f4f6;
    color: #2C333A;
}

.family-modal-btn-secondary:hover {
    background: #e5e7eb;
}

/* Family List (for radio button selection - legacy) */
.family-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.family-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Calibri', 'Roboto', sans-serif;
}

.family-option:hover {
    border-color: #4a90e2;
    background: #f0f9ff;
}

.family-option.selected {
    border-color: #4a90e2;
    background: #dbeafe;
}

.family-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.family-option-label {
    font-size: 14px;
    color: #2C333A;
    cursor: pointer;
    flex: 1;
}

/* ============================================
   SUPPORTED LINK SECTION (Production Mode Only)
   ============================================ */

.supported-link-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.supported-link-input-group {
    margin-bottom: 20px;
}

.supported-link-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-family: 'Calibri', 'Roboto', sans-serif;
}

.supported-link-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Calibri', 'Roboto', sans-serif;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.supported-link-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.supported-link-input::placeholder {
    color: #9ca3af;
}

.supported-link-hint {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    font-family: 'Calibri', 'Roboto', sans-serif;
    font-style: italic;
}

/* ============================================
   GROUPING FAMILY SECTION
   ============================================ */

.grouping-family-section {
    margin-top: 20px;
}

.grouping-family-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.grouping-family-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

/* Bulk Grouping Controls */
.bulk-grouping-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.bulk-grouping-controls input[type="checkbox"] {
    cursor: pointer;
}

.bulk-grouping-controls label {
    cursor: pointer;
    user-select: none;
}

/* Grouping Family List */
.grouping-family-list {
    max-height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px;
}

/* Individual Grouping Family Item - Horizontal Layout */
.grouping-family-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
    transition: all 0.2s ease;
}

.grouping-family-item:last-child {
    margin-bottom: 0;
}

/* Heading Name - Takes Flexible Space */
.grouping-heading-name {
    font-size: 14px;
    font-weight: 500;
    color: #2C333A;
    font-family: 'Calibri', 'Roboto', sans-serif;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown - Fixed Width */
.grouping-family-dropdown {
    flex-shrink: 0;
    min-width: 150px;
    padding: 8px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Calibri', 'Roboto', sans-serif;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.grouping-family-dropdown:hover {
    border-color: #9ca3af;
}

.grouping-family-dropdown:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Family Modal Note */
.family-modal-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 10px;
    font-size: 12px;
    color: #1e40af;
    margin-top: 12px;
    margin-bottom: 12px;
}

.family-modal-note i {
    flex-shrink: 0;
    margin-top: 2px;
}