first commit

This commit is contained in:
PeymanHonarjoo
2026-10-06 09:57:33 +03:30
parent fe4dfeb2ec
commit 268a431c1e
48 changed files with 10443 additions and 1782 deletions
@@ -0,0 +1,519 @@
.sidebar {
position: fixed;
top: 0;
right: 0;
bottom: 0;
width: 260px;
background: var(--sidebar-bg);
color: var(--sidebar-text);
transform: translateX(0);
transition: width 0.3s ease;
z-index: 40;
display: flex;
flex-direction: column;
border-left: 1px solid var(--sidebar-border);
}
.sidebar.open {
width: 260px;
}
.sidebar:not(.open) {
width: 72px;
padding-bottom: 0.5rem;
}
.sidebar-inner {
display: flex;
flex-direction: column;
flex: 1;
overflow: hidden;
}
.sidebar-top {
padding: 0.75rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.5rem;
min-height: 48px;
position: relative;
overflow: hidden;
}
.sidebar-logo {
height: 32px;
width: auto;
object-fit: contain;
}
.sidebar-logo-link {
display: inline-flex;
align-items: center;
cursor: pointer;
position: relative;
overflow: hidden;
}
.sidebar-logo-link:hover .sidebar-logo {
opacity: 0.85;
}
.sidebar:not(.open) .sidebar-logo-link {
justify-content: center;
width: 100%;
}
.sidebar:not(.open) .sidebar-logo {
height: 36px;
}
.sidebar:not(.open) .sidebar-header {
justify-content: center;
padding: 0.5rem 0.25rem;
}
.sidebar:not(.open) .close-btn {
display: none;
}
.sidebar-open-icon {
position: absolute;
inset: 0;
margin: auto;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0.5rem;
background: var(--surface-bg);
color: var(--sidebar-text);
border: 1px solid var(--sidebar-border);
box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
opacity: 0;
visibility: hidden;
transition: opacity 0.2s, visibility 0.2s;
}
.sidebar:not(.open) .sidebar-logo-link:hover .sidebar-logo {
opacity: 0;
visibility: hidden;
}
.sidebar:not(.open) .sidebar-logo-link:hover .sidebar-open-icon {
opacity: 1;
visibility: visible;
}
.sidebar-title {
font-size: 1rem;
font-weight: 600;
margin: 0;
color: var(--sidebar-text);
}
.close-btn {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: none;
background: transparent;
color: var(--sidebar-muted);
border-radius: 0.375rem;
cursor: pointer;
transition: background 0.2s;
flex-shrink: 0;
}
.close-btn:hover {
background: var(--sidebar-hover);
}
.sidebar:not(.open) .close-btn {
display: none;
}
.new-chat-btn {
display: flex;
align-items: center;
gap: 0.75rem;
width: 100%;
padding: 0.75rem;
border: 1px solid var(--sidebar-border);
background: transparent;
color: var(--sidebar-text);
border-radius: 0.5rem;
cursor: pointer;
font-size: 0.875rem;
transition: background 0.2s;
text-align: start;
}
.new-chat-btn:hover {
background: var(--sidebar-hover);
}
.nav-menu {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.nav-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem;
border-radius: 0.5rem;
color: var(--sidebar-muted);
text-decoration: none;
font-size: 0.875rem;
transition: background 0.2s;
}
.nav-item:hover {
background: var(--sidebar-hover);
}
.nav-item.active {
background: var(--sidebar-hover);
color: var(--sidebar-text);
font-weight: 500;
}
.sidebar:not(.open) .nav-item {
justify-content: center;
padding: 0.75rem 0;
}
.sidebar:not(.open) .nav-item svg {
margin: 0;
}
.sidebar:not(.open) .nav-label {
display: none;
}
.sidebar-divider {
height: 1px;
background: var(--sidebar-border);
margin: 0 0.75rem;
}
.sidebar:not(.open) .sidebar-divider {
margin: 0 0.5rem;
}
.sidebar-bottom {
flex: 1;
overflow-y: auto;
padding: 0.75rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.sidebar:not(.open) .sidebar-bottom {
display: none;
}
.history-header {
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
font-weight: 500;
color: var(--sidebar-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.sidebar:not(.open) .history-header {
display: none;
}
.history-list {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.history-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem;
border: none;
background: transparent;
color: var(--sidebar-muted);
border-radius: 0.5rem;
cursor: pointer;
font-size: 0.875rem;
text-align: start;
transition: background 0.2s;
width: 100%;
}
.history-item:hover {
background: var(--sidebar-hover);
}
.sidebar:not(.open) .history-item {
justify-content: center;
padding: 0.75rem 0;
}
.sidebar:not(.open) .history-item svg {
margin: 0;
}
.history-icon {
flex-shrink: 0;
opacity: 0.7;
}
.history-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sidebar:not(.open) .history-text {
display: none;
}
.history-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 1.5rem 0.75rem;
font-size: 0.875rem;
color: var(--sidebar-muted);
text-align: center;
}
.sidebar:not(.open) .history-empty {
display: none;
}
.history-empty-icon {
opacity: 0.5;
margin-bottom: 0.25rem;
}
.sidebar-footer {
padding: 0.75rem;
border-top: 1px solid var(--sidebar-border);
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-top: auto;
}
.sidebar:not(.open) .sidebar-footer {
align-items: center;
padding: 0.5rem;
margin-top: auto;
}
.sidebar:not(.open) .user-info {
display: none;
}
.sidebar:not(.open) .user-profile {
width: 56px;
height: 56px;
padding: 0;
border-radius: 50%;
justify-content: center;
}
.sidebar:not(.open) .theme-toggle span {
display: none;
}
.user-profile {
display: flex;
align-items: center;
gap: 0.75rem;
width: 100%;
padding: 0.5rem;
border: none;
border-radius: 0.75rem;
background: transparent;
color: var(--sidebar-text);
text-align: start;
cursor: pointer;
}
.user-profile:hover,
.user-profile.menu-open {
background: var(--sidebar-hover);
}
.user-profile:focus-visible,
.account-menu-item:focus-visible {
outline: 2px solid var(--sidebar-muted);
outline-offset: -2px;
}
.account-menu {
width: 236px;
max-width: calc(100vw - 24px);
padding: 0.5rem;
border: 1px solid var(--sidebar-border);
border-radius: 1.25rem;
background: var(--surface-bg);
color: var(--sidebar-text);
box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}
.account-menu-header {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem;
}
.account-menu-divider {
height: 1px;
margin: 0.375rem 0.5rem;
background: var(--sidebar-border);
}
.account-menu-item {
display: flex;
align-items: center;
gap: 0.75rem;
width: 100%;
padding: 0.625rem 0.75rem;
border: none;
border-radius: 0.5rem;
background: transparent;
color: inherit;
font-size: 0.875rem;
text-align: start;
cursor: pointer;
}
.account-menu-item:hover,
.account-menu-item:focus {
background: var(--sidebar-hover);
}
.account-menu-item svg {
flex-shrink: 0;
}
.user-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
background: var(--sidebar-hover);
color: var(--sidebar-text);
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75rem;
font-weight: 500;
flex-shrink: 0;
}
.user-info {
display: flex;
flex-direction: column;
gap: 0.125rem;
overflow: hidden;
}
.user-name {
font-size: 0.875rem;
font-weight: 500;
color: var(--sidebar-text);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.claim-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
width: 100%;
padding: 0.625rem;
border: 1px solid var(--sidebar-border);
background: transparent;
color: var(--sidebar-text);
border-radius: 0.5rem;
cursor: pointer;
font-size: 0.875rem;
transition: background 0.2s;
}
.claim-btn:hover {
background: var(--sidebar-hover);
}
.sidebar:not(.open) .claim-btn {
width: 40px;
height: 40px;
padding: 0;
border-radius: 0.5rem;
justify-content: center;
}
.sidebar:not(.open) .claim-btn svg {
margin: 0;
}
.sidebar:not(.open) .claim-btn span {
display: none;
}
.theme-toggle {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
width: 100%;
padding: 0.625rem;
border: 1px solid var(--sidebar-border);
background: transparent;
color: var(--sidebar-text);
border-radius: 0.5rem;
cursor: pointer;
font-size: 0.875rem;
transition: background 0.2s;
}
.theme-toggle:hover {
background: var(--sidebar-hover);
}
.sidebar:not(.open) .theme-toggle {
width: 56px;
height: 56px;
padding: 0;
border-radius: 0.5rem;
justify-content: center;
}
.sidebar:not(.open) .theme-toggle svg {
margin: 0;
}
.sidebar:not(.open) .theme-toggle span {
display: none;
}