:root {
    --white: #ffffff;

    --accent-600: #4863f7;
    --accent-500: #7878d7;

    --alert-600: #ff5c5c;
    --alert-800: #ff5c5c13;

    --gray-900: #0d0d0d;
    --gray-800: #111111;
    --gray-700: #1a1a1a;
    --gray-200: #424242;
    --gray-100: #737373;
}

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

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--gray-100);
}

body,
input,
button {
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--gray-900);
    color: var(--white);
}

.app {
    display: flex;
    width: 100vw;
    min-height: 100dvh;
}

.main {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 62px 124px;
    gap: 32px;

    overflow-y: scroll;
}

.main-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.btn {
    display: flex;
    height: 44px;
    align-items: center;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
    gap: 10px;
    cursor: pointer;
}

.btn-outline {
    background-color: transparent;
    border: 0.5px solid var(--gray-200);
    color: var(--white);
    padding: 0 16px;
    transition: background-color 0.3s;

    &:hover {
        background-color: var(--gray-200);
    }
}

.icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--accent-600);
    border: 1px solid var(--accent-500);
    color: var(--white);
    padding: 0 24px;
    transition: opacity 0.5s;

    &:hover {
        opacity: 0.8;
    }
}

.w-150 {
    width: 150px;
    justify-content: center;
}

.prompt-title {
    font-weight: 600;
    font-size: 32px;
    outline: none;
}

.prompt-content {
    font-size: 16px;
    color: var(--white);
    outline: none;
    line-height: 32px;
}

.editable-wrapper {
    position: relative;

    &::before {
        content: attr(data-placeholder);
        position: absolute;
        color: var(--gray-200);
        pointer-events: none;
        opacity: 0;
    }
}

.editable-wrapper.is-empty::before {
    opacity: 1;
}

#title-wrapper.is-empty {
    font-size: 32px;
    font-weight: 600;
    color: var(--gray-200);
}

#content-wrapper.is-empty {
    font-size: 16px;
    color: var(--gray-200);
    line-height: 32px;
}

.icon-button {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.open-toggle {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 0;
}

.sidebar {
    width: 400px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding: 32px;
    background-color: var(--gray-800);
    border-right: 0.5px solid var(--gray-700);
    z-index: 1000;
}

.sidebar.collapsed {
    width: 0;
    padding: 0;
    opacity: 0;
    transform: translateX(0);
}


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

.logo {
    height: 24px;
}

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

.search-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-700);
    gap: 20px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 22px;
    transform: translateY(-50%);
}

.search-input {
    background: transparent;
    height: 44px;
    width: 100%;
    border: 1px solid var(--gray-200);
    outline: none;
    color: var(--white);
    font-size: 16px;
    border-radius: 6px;
    padding-left: 48px;

    &::placeholder {
        color: var(--gray-200);
    }
}

.btn-full {
    width: 100%;
    justify-content: center;
}

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

.prompt-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    margin-top: 20px;
}

.prompt-item-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 4px;
}

.prompt-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prompt-item-description {
    font-size: 12px;
    color: #a1a1aa;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--alert-800);
}

.icon-trash {
    width: 20px;
    height: 20px;
}

@media (width <=950px) {
    .open-toggle {
        display: block;
        top: 38px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        min-height: 100dvh;
        width: 80%;
        max-width: 360px;
        transform: translateX(-100%);
        z-index: 1100;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        padding: 24px 32px;
        margin-left: 0;
        overflow-y: auto;
    }
}
