/* Base Styles */
:root {
    --primary-color: #1976d2;
    --primary-hover: #1565c0;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --light-text: #777;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: #174ea9;
    margin: 0;
    padding: 0;
}

/* Content Type Selector */
.content-type-selector {
    width: 99%;
    margin: 20px auto 0;
    background-color: #174ea9;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 10px 20px;
}

.content-type-tabs {
    display: flex;
    gap: 10px;
}

.type-tab {
    padding: 12px 24px;
    border: none;
    background-color: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    color: var(--light-text);
    transition: var(--transition);
}

.type-tab.active {
    background-color: var(--primary-color);
    color: white;
}

.type-tab:hover:not(.active) {
    background-color: var(--secondary-color);
}

/* Page Header */
.page-header {
    width: 95%;
    margin: 20px auto;
    text-align: center;
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.products-heading {
    font-size: 2.5rem;
    margin: 0 0 10px;
    font-weight: 700;
}

.products-subheading {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
}

/* Tree Container */
.tree-container {
    width: 97%;
    margin: 10px auto 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.tree-wrapper {
    padding: 20px;
    min-height: 60vh;
}

.tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tree-node {
    margin-bottom: 5px;
}

.tree-node-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.tree-node-header:hover {
    background-color: var(--secondary-color);
}

.tree-node-header.active {
    background-color: rgba(25, 118, 210, 0.1);
    font-weight: 500;
}

.tree-node-toggle {
    margin-right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--light-text);
}

.tree-node.expanded > .tree-node-header > .tree-node-toggle {
    transform: rotate(90deg);
    color: var(--primary-color);
}

.tree-node-icon {
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 20px;
}

.tree-node-title {
    flex: 1;
    font-size: 16px;
}

.tree-node-children {
    margin-left: 40px;
    border-left: 2px solid var(--border-color);
    padding-left: 15px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.tree-node.expanded > .tree-node-children {
    max-height: 5000px;
    opacity: 1;
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-left: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 5px;
}

.tree-item:hover {
    background-color: var(--secondary-color);
}

.tree-item-icon {
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 20px;
}

.tree-item-title {
    flex: 1;
    font-size: 15px;
}

/* Breadcrumb */
.breadcrumb-container {
    width: 95%;
    margin: auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 15px 20px;
}

.breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-item {
    margin-right: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: var(--light-text);
    font-size: 18px;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 4px;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
    background-color: rgba(25, 118, 210, 0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--light-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.empty-state .material-symbols-outlined {
    font-size: 64px;
    margin-bottom: 20px;
    color: var(--primary-color);
    opacity: 0.7;
}

.empty-state p {
    font-size: 18px;
    margin: 0;
}

/* Loading Indicator */
md-circular-progress {
    --md-circular-progress-size: 48px;
    --md-circular-progress-active-indicator-color: var(--primary-color);
    margin: 100px auto;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .content-type-tabs {
        flex-direction: column;
    }

    .tree-node-children {
        margin-left: 20px;
    }

    .tree-item {
        margin-left: 10px;
    }

    .products-heading {
        font-size: 1.8rem;
    }

    .products-subheading {
        font-size: 1rem;
    }
}