@import 'variables.css';

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
}

button, select {
    text-transform: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

::selection {
    background-color: var(--accent);
    color: var(--color-white);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Utility classes */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-grow {
    flex-grow: 1;
}

/* File explorer specific global styles */
.file-explorer-container {
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.content-area {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
    overflow: hidden;
}

.main-content {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    height: 100%;
}

.files-view {
    flex-grow: 1;
    overflow: auto;
    position: relative;
    padding: var(--space-md);
}

.panel-resize-handle {
    width: 4px;
    background-color: var(--border);
    cursor: col-resize;
}

.panel-resize-handle:hover {
    background-color: var(--accent);
}

.main-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.main-layout.with-terminal .content-section {
    overflow-y: auto;
}

.terminal-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-color);
    margin-left: 8px;
}

.terminal-toggle:hover {
    background-color: var(--hover-color);
}

.terminal-toggle.active {
    color: var(--accent-color);
}

.terminal-toggle .icon {
    font-size: 16px;
}

.main-layout.with-terminal .main-content {
    overflow-y: auto;
}

.main-layout .main-content {
    transition: padding-bottom 0.2s ease;
}

.terminal-wrapper {
    z-index: 10;
}