.dashlet .panel-heading {
    display: none;
}

.dashlet:hover .panel-heading {
    display: block;
    opacity: 1;
    top: -16px;
    background-color: #edf0fb;
}

.dashlet {
    position: relative;
}

.dashlet-container .dashlet.panel {
    overflow: visible;
}

.dashlet .panel-heading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: #f5f5f5; /* или цвет вашей темы */
    border-bottom: 1px solid #ddd;
}

.dashlets.grid-stack .grid-stack-item .dashlet .dashlet-body {
    /* height: calc(100% - var(--panel-heading-height)); */
    height: 100%;!important;
    /*overflow-y: clip;*/
}

/* Help Center main layout */
.help-center {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.help-center .page-header {
    border-bottom: 1px solid var(--gray-light);
    padding: 15px 20px;
    margin-bottom: 0;
}

.help-center .page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-center .header-items {
    display: flex;
    align-items: center;
}

.help-center .header-items .form-group {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-center .language-selector {
    width: 200px;
}

/* Language field styling */
.help-center .language-field-container {
    display: inline-block;
    min-width: 200px;
}
.help-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.help-tree-container {
    width: 375px;
    flex-shrink: 0;
    border-right: 1px solid var(--gray-light);
    overflow-y: auto;
}

.help-article-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Tree navigation */
.help-tree {
    padding: 10px;
}

.help-module-section {
    margin-bottom: 2px;
}

.help-module-header {
    padding: 2px 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    background-color: var(--panel-bg);
    border-radius: 3px;
    transition: background-color 0.15s;
    user-select: none;
}

.help-module-header:hover {
    background-color: var(--gray-light);
}

.help-module-header.active {
    background-color: var(--brand-primary-lightest);
}

.help-toggle-icon {
    width: 16px;
    margin-right: 8px;
    transition: transform 0.15s;
    color: var(--gray-soft);
}

.help-module-name {
    font-weight: 500;
}

.help-articles-list {
    margin: 0 0 0 24px;
}

.help-article-item {
    display: block;
    padding: 6px 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.15s;
}

.help-article-item:hover {
    background-color: var(--gray-lighter);
    text-decoration: none;
}

.help-article-item.active {
    background-color: var(--brand-primary);
    color: white;
}

.help-article-item .fas {
    margin-right: 8px;
    opacity: 0.6;
}

/* Article view */
.help-article-view {
    margin: 0 auto;
    height: calc(100%);
    overflow: auto;
    padding: 20px;
}

.help-article-view .page-header {
    border-bottom: 1px solid var(--gray-light);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.help-article-view .header-breadcrumbs {
    margin-bottom: 10px;
}

.help-article-view .breadcrumb-separator {
    color: var(--gray-soft);
}

.help-article-content {
    font-size: 15px;
    line-height: 1.6;
}

/* Markdown content styling */
.help-article-content h1,
.help-article-content h2,
.help-article-content h3,
.help-article-content h4,
.help-article-content h5,
.help-article-content h6 {
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
}

.help-article-content h1:first-child,
.help-article-content h2:first-child {
    margin-top: 0;
}

.help-article-content p {
    margin-bottom: 15px;
}

.help-article-content ul,
.help-article-content ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

.help-article-content li {
    margin-bottom: 5px;
}

.help-article-content code {
    background-color: var(--gray-lighter);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-family-monospace);
    font-size: 0.9em;
}

.help-article-content pre {
    background-color: var(--gray-lighter);
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 15px;
}

.help-article-content pre code {
    background-color: transparent;
    padding: 0;
}

.help-article-content blockquote {
    border-left: 4px solid var(--gray-light);
    padding-left: 15px;
    margin: 20px 0;
    color: var(--gray-dark);
}

.help-article-content table {
    width: 100%;
    margin-bottom: 20px;
}

.help-article-content table th,
.help-article-content table td {
    padding: var(--table-cell-padding);
    border: 1px solid var(--gray-light);
}

.help-article-content table th {
    background-color: var(--gray-lighter);
    font-weight: 600;
}

.help-article-content a {
    color: var(--link-color);
}

.help-article-content a:hover {
    color: var(--link-hover-color);
}

.help-article-content img {
    max-width: 100%;
    height: auto;
}

/* Empty state */
.help-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-soft);
    text-align: center;
    padding: 40px;
}

.help-empty-state .fas {
    margin-bottom: 20px;
    opacity: 0.3;
}

.help-empty-state h4 {
    color: var(--gray-dark);
    margin-bottom: 10px;
}

/* Loading state */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--gray-soft);
}

/* Responsive */
@media (max-width: 768px) {
    .help-center .page-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .help-content {
        flex-direction: column;
    }

    .help-tree-container {
        width: 100%;
        height: 200px;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 1px solid var(--gray-light);
    }

    .help-center .language-selector {
        width: 100%;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .help-tree-container {
        background-color: var(--panel-dark-bg);
    }

    .help-module-header {
        background-color: var(--panel-dark-bg);
    }

    .help-module-header:hover {
        background-color: var(--gray-dark);
    }

    .help-article-item:hover {
        background-color: var(--gray-dark);
    }

    .help-article-content code,
    .help-article-content pre {
        background-color: var(--gray-dark);
    }
}