/* Theme Selector Styles */
.theme-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
    padding-left: 0;
    padding-right: 0;
    /* padding-bottom handled by components.css/style.css for mobile nav */
}

.theme-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    /* overflow: hidden; Removed to allow full expansion */
    transition: all 0.3s ease;
}

.theme-card:hover {
    box-shadow: var(--shadow-md);
}

.theme-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.theme-header:hover {
    background-color: rgba(74, 144, 226, 0.05);
}

.theme-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1;
}

.theme-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.theme-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    overflow-wrap: anywhere;
}

.theme-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.subtheme-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.expand-icon {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.theme-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.subthemes-container {
    padding: 0 1.25rem 1.25rem 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

/* Mobile optimization */
@media (max-width: 1024px) {
    .subthemes-container {
        grid-template-columns: 1fr;
    }

    .theme-meta {
        width: 100%;
        justify-content: space-between;
    }
}

.subtheme-btn {
    background-color: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
}

.subtheme-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.subtheme-btn:active,
.subtheme-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(0);
}

.subtheme-btn:hover .subtheme-title,
.subtheme-btn:hover .subtheme-sessions,
.subtheme-btn.active .subtheme-title,
.subtheme-btn.active .subtheme-sessions {
    color: white;
}

.subtheme-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    transition: color 0.2s ease;
}

.subtheme-sessions {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

/* Logo Styles */
.brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

/* Dark Mode Logo Switching */
/* The class is applied to the HTML tag, so we target html.dark-mode or html.dark */

html.dark-mode .logo-light,
html.dark .logo-light {
    display: none;
}

html.dark-mode .logo-dark,
html.dark .logo-dark {
    display: block;
}

/* Ensure touch targets are at least 44x44px */
@media (max-width: 1024px) {
    .subtheme-btn {
        min-height: 88px;
        padding: 1.25rem;
    }

    .theme-header {
        padding: 1.5rem;
        min-height: 60px;
    }
}
