/* samples.css - extracted from Samples.cshtml */
.ide-container {
    background: #1e1e1e;
    border: 1px solid #2d2d2d;
    border-radius: var(--bs-border-radius-lg);
    box-shadow: var(--bs-box-shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* make container height adapt to available space */
    height: calc(100vh - 200px);
    min-height: 300px;
}

.ide-header {
    background-color: #252526;
    padding-top: 0rem;
    padding-bottom: 0rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #2d2d2d;
}

.window-controls {
    display: flex;
    gap: 0.5rem;
}

.control-dot {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Hamburger Button Styles */
.hamburger-button {
    background: none;
    border: none;
    color: #d4d4d4;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-button:hover {
    background-color: #3c3c3c;
    color: #ffffff;
}

.hamburger-button:active {
    background-color: #4a4a4a;
    transform: scale(0.95);
}

.hamburger-button i {
    transition: transform 0.2s ease;
}

.hamburger-button:hover i {
    transform: scale(1.1);
}

.ide-body {
    display: flex;
    /* take remaining space under header */
    flex: 1 1 auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 0; /* allow children to scroll */
}

/* Explorer Panel Styles */
#explorer-panel {
    min-width: 250px;
    max-width: 50vw;
    flex: 0 0 auto !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#explorer-panel.collapsed {
    min-width: 0;
    width: 0;
    flex: 0 0 0 !important;
}

#samples-explorer .explorer-header,
#samples-explorer .explorer-file {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.vscode-explorer {
    color: #d4d4d4;
    font-family: "Segoe UI", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    padding: 0.8rem;
    /* let explorer take full height of ide-body and scroll vertically */
    height: 100%;
    max-height: none;
    border-right: 1px solid #2d2d2d;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 100%;
    width: 100%;
    transition: opacity 0.3s ease;
}

#explorer-panel.collapsed .vscode-explorer {
    opacity: 0;
    pointer-events: none;
}

.vscode-explorer .explorer-section {
    margin-bottom: .4rem;
}

.vscode-explorer .explorer-header {
    font-weight: 400;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    background-color: #252526;
    border: 1px solid #333;
    border-radius: var(--bs-border-radius);
    display: flex;
    align-items: center;
    transition: background-color .2s, color .2s, border-left-color .2s;
    font-size: .7rem;
    color: #d4d4d4;
    border-left: 3px solid transparent;
}

.vscode-explorer .explorer-header:hover,
.vscode-explorer .explorer-file:hover {
    background-color: #2a2d2e;
    border-left-color: #7ca4d4;
    color: #fff;
}

.vscode-explorer .explorer-header.active,
.vscode-explorer .explorer-file.active {
    background-color: #37373d;
    color: #fff;
    border-left-color: #7ca4d4;
}

.vscode-explorer .explorer-files {
    padding-left: 1.5rem;
    margin-top: .3rem;
}

.vscode-explorer .explorer-file {
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .7rem;
    border-radius: var(--bs-border-radius);
    transition: background-color .2s, color .2s, border-left-color .2s;
    color: #cccccc;
    position: relative;
    border-left: 3px solid transparent;
}

.vscode-explorer .explorer-file:hover {
    background-color: #2a2d2e;
    border-left-color: #7ca4d4;
}

.vscode-explorer .explorer-file.active {
    background-color: #37373d;
    color: #fff;
    border-left-color: #7ca4d4;
}

.vscode-explorer .explorer-file i,
.vscode-explorer .explorer-header i {
    font-size: .7rem;
    opacity: .8;
    transition: transform .2s ease-in-out, opacity .2s;
}

.vscode-explorer .explorer-header:hover i,
.vscode-explorer .explorer-file:hover i,
.vscode-explorer .explorer-header.active i,
.vscode-explorer .explorer-file.active i {
    transform: scale(1.1);
    opacity: 1;
}

.vscode-explorer .explorer-file span,
.vscode-explorer .explorer-header span {
    transition: transform .2s ease-in-out;
}

.vscode-explorer .explorer-header:hover span,
.vscode-explorer .explorer-file:hover span,
.vscode-explorer .explorer-header.active span,
.vscode-explorer .explorer-file.active span {
    transform: translateX(3px);
}

.vscode-explorer .bi-filetype-html {
    color: #e34c26;
}

.vscode-explorer .bi-filetype-cs {
    color: #3a9a4c;
}

.vscode-explorer .bi-file-earmark-code {
    color: #68b9e6;
}

.vscode-explorer .bi-folder-fill,
.vscode-explorer .bi-folder,
.vscode-explorer .bi-folder2-open {
    color: #7ca4d4;
    transition: all .2s;
}

.vscode-explorer .bi-briefcase {
    color: #a084d4;
}

.code-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--bs-dark);
}

#code-sample {
    padding: 0;
    overflow-x: auto;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
    /* Add custom scrollbar styling to match other elements */
    scrollbar-width: thin;
    scrollbar-color: #444 #2a2a2a;
    /* allow vertical scrolling when content overflows */
    overflow-y: auto;
    min-height: 0;
}

#code-sample::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#code-sample::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

#code-sample::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

#code-sample::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.code-breadcrumb {
    background-color: #252526;
    padding: 0.4rem 0.8rem;
    border-bottom: 1px solid #333;
    color: #ccc;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.code-breadcrumb .breadcrumb-part {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.5rem;
}

.code-breadcrumb i {
    font-size: 0.7rem;
    flex-shrink: 0;
}

.code-breadcrumb::-webkit-scrollbar {
    height: 6px;
}

.code-breadcrumb::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 3px;
}

.code-breadcrumb::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.code-breadcrumb::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.vscode-explorer {
    scrollbar-width: thin;
    scrollbar-color: #444 #2a2a2a;
}

.vscode-explorer::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.vscode-explorer::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.vscode-explorer::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.vscode-explorer::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 1rem;
    background-color: #ccc;
    animation: blink-animation 1s steps(2, start) infinite;
}

.sample-note {
    background-color: #2d2d30;
    color: #dcdcaa;
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid #333;
    font-size: 0.6rem;
    font-family: "Segoe UI", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#code-sample code {
    font-size: 0.65rem !important;
    white-space: pre;
}

@keyframes blink-animation {
    to {
        visibility: hidden;
    }
}

.vscode-explorer {
    position: relative;
    padding-left: 0;
}

.explorer-section {
    position: relative;
    padding-left: 24px;
}

.explorer-section::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 12px;
    width: 1px;
    background: #444;
    z-index: 0;
}

.explorer-section > .explorer-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -12px;
    width: 12px;
    height: 1px;
    background: #444;
}

.explorer-section:last-child::before {
    height: 18px;
}

.explorer-file {
    position: relative;
    padding-left: 24px;
}

.explorer-file::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 1px;
    background: #444;
}

.explorer-header,
.explorer-file {
    position: relative;
    z-index: 1;
    background: #1e1e1e;
}

#samples-explorer > .explorer-section {
    padding-left: 0;
}

#samples-explorer > .explorer-section::before,
#samples-explorer > .explorer-section > .explorer-header::before {
    display: none;
}

#samples-explorer {
    width: fit-content;
    min-width: 250px;
    max-width: 100%;
    padding-right: 20px;
    transition: width 0.3s ease-in-out;
    /* ensure explorer doesn't force overall height and allows scrolling */
    box-sizing: border-box;
}

.vscode-explorer {
    width: fit-content;
    min-width: inherit;
    overflow-y: auto;
    overflow-x: auto;
    padding: 0.8rem;
    border-right: none;
}

.explorer-section {
    min-width: fit-content;
}

.explorer-file,
.explorer-header {
    white-space: nowrap;
    min-width: fit-content;
    display: flex;
    align-items: center;
}

.ide-container {
    transition: all 0.25s ease;
}

.col-9.d-flex.flex-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

#samples-explorer {
    transition: min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.explorer-section > .explorer-files > .explorer-file {
    margin-left: 0;
}

/* Mobile Styles */
@media (max-width: 767.98px) {
    .hamburger-button {
        display: none;
    }

    .ide-body {
        flex-direction: column;
    }

    #explorer-panel {
        width: 100% !important;
        flex: 1 1 auto !important;
        max-width: 100%;
        min-width: 0 !important;
        transition: none !important;
    }

    #explorer-panel.collapsed {
        width: 100% !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .col-9.d-flex.flex-column {
        width: 100% !important;
        flex: 1 1 auto !important;
        max-width: 100%;
        min-width: 0;
    }

    #samples-explorer {
        border-right: none;
        border-bottom: 1px solid #2d2d2d;
        max-height: 40vh;
        min-width: 100%;
        width: 100% !important;
        overflow-x: auto !important;
        transition: none !important;
    }

    .vscode-explorer {
        padding-right: 0.8rem;
        width: max-content;
        min-width: 100%;
        border-right: none;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .code-breadcrumb {
        border-top: 1px solid #333;
    }
    .sample-note {
        font-size: 0.5rem;
    }
}
