/* Taxonomy Management Styles */

/* Stats Section */
.taxonomy-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-box {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(255, 107, 74, 0.1);
    color: var(--admin-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--admin-text-light);
}

/* Toolbar */
.taxonomy-toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}

.taxonomy-toolbar .search-box {
    flex: 1;
    max-width: 400px;
}

/* Taxonomy List */
.taxonomy-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--admin-text-light);
}

.loading-state i {
    font-size: 48px;
    margin-bottom: 16px;
}

.loading-state p {
    margin: 0;
    font-size: 16px;
}

/* List Items */
.taxonomy-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--admin-border);
    transition: background 0.2s ease;
}

.taxonomy-item:hover {
    background: var(--admin-bg-light);
}

.taxonomy-item:last-child {
    border-bottom: none;
}

.taxonomy-item.dragging {
    opacity: 0.5;
}

.taxonomy-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.drag-handle {
    cursor: move;
    color: var(--admin-text-light);
    font-size: 20px;
    padding: 4px;
}

.drag-handle:hover {
    color: var(--admin-text);
}

.taxonomy-item-info {
    flex: 1;
}

.taxonomy-item-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--admin-text);
    margin-bottom: 4px;
}

.taxonomy-item-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--admin-text-light);
}

.taxonomy-item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.taxonomy-item-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    background: none;
    border: 1px solid var(--admin-border);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--admin-text);
}

.btn-action:hover {
    border-color: var(--admin-primary);
    color: var(--admin-primary);
}

.btn-action.danger:hover {
    border-color: var(--admin-danger);
    color: var(--admin-danger);
    background: rgba(220, 53, 69, 0.05);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--admin-text-light);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0 0 8px 0;
}

.empty-state p {
    margin: 0 0 24px 0;
    font-size: 16px;
}

/* Modal Enhancements */
.modal-sm {
    max-width: 500px;
}

.delete-warning {
    text-align: center;
    padding: 20px;
    background: rgba(220, 53, 69, 0.05);
    border-radius: 8px;
    margin-bottom: 24px;
}

.delete-warning i {
    font-size: 48px;
    color: var(--admin-danger);
    margin-bottom: 16px;
}

.delete-warning p {
    font-size: 16px;
    color: var(--admin-text);
    margin: 0 0 8px 0;
}

.warning-note {
    font-size: 14px;
    color: var(--admin-text-light);
}

/* Form Enhancements */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--admin-border);
}

/* Responsive */
@media (max-width: 768px) {
    .taxonomy-stats {
        grid-template-columns: 1fr;
    }
    
    .taxonomy-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .taxonomy-toolbar .search-box {
        max-width: none;
    }
    
    .taxonomy-item {
        padding: 16px;
    }
    
    .taxonomy-item-left {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .drag-handle {
        display: none;
    }
    
    .taxonomy-item-meta {
        flex-direction: column;
        gap: 4px;
    }
    
    .taxonomy-item-actions {
        flex-direction: column;
    }
}

/* Additional Elements for Brands Page */
.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--admin-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo i {
    font-size: 20px;
    color: var(--admin-text-light);
}

/* Logo Upload */
.logo-upload-area {
    margin-bottom: 20px;
}

.logo-preview {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--admin-border);
    border-radius: 12px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-bg-light);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.logo-preview:hover {
    border-color: var(--admin-primary);
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-preview i {
    font-size: 32px;
    color: var(--admin-text-light);
}

.logo-preview-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px;
    display: flex;
    gap: 8px;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo-preview:hover .logo-preview-actions {
    opacity: 1;
}

.logo-preview-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.logo-preview-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}