/* Load File Tab Styles (formerly Manufacturer Tab) */

/* Overview Section */
.overview-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.overview-section h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
}

.overview-section p {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #666;
}

/* Tab name references in overview section */
.tab-name {
    display: inline-block;
    border-top: 2px solid #555;
    border-left: 2px solid #555;
    border-right: 2px solid #555;
    border-bottom: none;
    border-top-left-radius: 0.6em;
    border-top-right-radius: 0.6em;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 0em 0.2em 0 0.2em;
    background: #f8f8f8;
    vertical-align: top;
    line-height: 1.4;
}


/* Upload Section */
.upload-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.upload-section h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #333;
}

.section-description {
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Edit/Create Section */
.edit-create-section {
    padding: 1.5rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.edit-create-section h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #333;
}

.edit-create-section h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #555;
}

.load-file-container {
    padding: 1rem;
}

/* Manufacturer Tab Styles */
.manufacturer-dropdown {
    position: relative;
    margin-top: 1rem;
}

.manufacturer-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.manufacturer-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.manufacturer-dropdown-list.show {
    display: block;
}

.manufacturer-option {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.manufacturer-option:hover {
    background: #f8f9fa;
}

.manufacturer-option.selected {
    background: #e3f2fd;
    color: #1976d2;
}

.manufacturer-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.manufacturer-stats {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.manufacturer-details {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    display: none;
}

.manufacturer-details.show {
    display: block;
}

.manufacturer-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
}

.info-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 600;
    font-family: monospace;
}

.device-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.device-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.device-table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: background-color 0.2s;
}

.device-table tr:hover td {
    background: #f8f9fa;
}

.device-table tr.selected td {
    background: #e3f2fd;
    color: #1976d2;
}

.device-name {
    font-weight: 600;
}

.device-type {
    font-size: 0.9rem;
    color: #666;
}

.device-capabilities {
    font-size: 0.85rem;
    color: #666;
}

.capability-tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin: 0.125rem;
}

.capability-tag.active {
    background: #d4edda;
    color: #155724;
}

/* New Manufacturer Tab Layout */
.manufacturer-tab-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
}

.manufacturer-section-collapsible {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.manufacturer-section-collapsible.collapsed {
    border-color: #007bff;
}

.manufacturer-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    cursor: pointer;
    user-select: none;
}

.manufacturer-section-header h3 {
    margin: 0;
    color: #212529;
}

.manufacturer-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-toggle-manufacturer-list {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #007bff;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: transform 0.3s ease;
}

.btn-toggle-manufacturer-list:hover {
    color: #0056b3;
}

.btn-toggle-manufacturer-list.expanded {
    transform: rotate(180deg);
}

/* File Disambiguation Dialog */
.file-disambiguation {
    padding: 0;
}

.file-disambiguation p {
    margin: 0 0 1rem 0;
    color: #495057;
}

.file-selection-list {
    max-height: 400px;
    overflow-y: auto;
}

.file-selection-item {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.file-selection-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.file-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.file-selection-header strong {
    color: #212529;
}

.file-type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
}

.file-type-badge.master {
    background: #d4edda;
    color: #155724;
}

.file-type-badge.extending {
    background: #fff3cd;
    color: #856404;
}

.file-meta {
    font-size: 0.875rem;
}

.file-meta .file-path {
    color: #6c757d;
    font-family: monospace;
}

.manufacturer-section-content {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: max-height 0.3s ease;
}

.manufacturer-section-collapsible.collapsed .manufacturer-section-content {
    max-height: 0;
    overflow: hidden;
}

.manufacturer-filter-section {
    position: sticky;
    top: 0;
    background: white;
    padding: 1rem 0;
    z-index: 10;
}

.manufacturer-filter-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.manufacturer-filter-input:focus {
    outline: none;
    border-color: #007bff;
}

.manufacturer-list-container {
    flex: 1;
    overflow-y: auto;
}

.manufacturer-list {
    display: grid;
    gap: 0.75rem;
}

.manufacturer-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.manufacturer-list-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateX(4px);
}

.manufacturer-item-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #212529;
}

.manufacturer-item-count {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
}

.device-list-container {
    background: white;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 1.5rem;
}

.device-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.device-list-header h3 {
    margin: 0;
    color: #007bff;
}

.device-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.device-list {
    display: grid;
    gap: 0.75rem;
}

.device-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.device-list-item:hover {
    background: #e3f2fd;
    border-color: #007bff;
    transform: translateX(4px);
}

.device-item-name {
    font-weight: 600;
    color: #212529;
}

.device-item-type {
    font-size: 0.9rem;
    color: #6c757d;
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}