
@import url('/assets/vendor/vazirmatn/Vazirmatn-font-face.css?v=33.003-local');

:root {
  --bg: #ffffff;
  --sidebar-bg: #1e293b; 
  --text: #1f1f1f;
  --text-muted: #444746;
  --accent: #1a73e8;
  --accent-soft: #e8f0fe;
  --border: #dee2e6;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --font-main: 'Vazirmatn', sans-serif;
  
  
}

body.dark-mode {
  --bg: #131314;
  --sidebar-bg: #0f172a;
  --text: #e3e3e3;
  --text-muted: #b4b4b4;
  --accent: #8ab4f8;
  --accent-soft: #3c4043;
  --border: #444746;
  
}

* { box-sizing: border-box; transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
html, body { 
  margin: 0; padding: 0; height: 100%; width: 100%; overflow: hidden;
  font-family: var(--font-main); background: var(--bg); color: var(--text);
  direction: rtl;
}

[hidden] { display: none !important; }

/* Layout */
.app { display: grid; grid-template-columns: 280px 1fr; height: 100vh; }
.app.sidebar-collapsed { grid-template-columns: 0px 1fr; }

/* Sidebar */
.sidebar {
  background: var(--sidebar-bg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 8px; margin-bottom: 12px; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #0f8a73, #5fbf9c); color: #fff; display: grid; place-items: center; font-weight: bold; }
.brand h1 { font-size: 1.1rem; margin: 0; color: #fff; }

.sidebar-nav-group { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; margin-top: 5px; }
.sidebar-nav-item {
  display: flex; align-items: center; padding: 10px 14px; border-radius: 12px;
  text-decoration: none; color: rgba(255,255,255,0.8); font-size: 0.85rem; cursor: pointer;
  background: rgba(255,255,255,0.05); border: 1px solid transparent; width: 100%; text-align: right;
  transition: all 0.2s ease;
}
.sidebar-nav-item:hover { background: rgba(255,255,255,0.1); color: #fff; transform: translateX(-2px); }
.sidebar-nav-item.primary { background: var(--accent) !important; color: #fff !important; font-weight: 700; margin-bottom: 6px; justify-content: center; }

.history-title { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 20px; margin-bottom: 8px; padding-right: 12px; }
.history-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.history-item { padding: 8px 12px; border-radius: 8px; color: rgba(255,255,255,0.7); font-size: 0.85rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item:hover { background: rgba(255,255,255,0.05); color: #fff; }

/* Main Area */
.main { display: grid; grid-template-rows: auto 1fr auto; height: 100vh; background: var(--bg); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; }
.topbar h2 { font-size: 1.2rem; font-weight: 400; margin: 0; color: var(--text-muted); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.conversation-shell { overflow-y: auto; display: flex; flex-direction: column; align-items: center; }
.messages { width: 100%; max-width: 840px; padding: 40px 20px; }
.message-row { margin-bottom: 40px; width: 100%; display: flex; flex-direction: column; }
.message.user { align-items: flex-end; }
.message.assistant { align-items: flex-start; }

.bubble { font-size: 1.05rem; line-height: 1.8; max-width: 100%; text-align: right; }
.user .bubble { background: var(--accent-soft); padding: 12px 20px; border-radius: 24px; display: inline-block; color: #1f1f1f; }
.dark-mode .user .bubble { color: #fff; }
.assistant .bubble { background: transparent; color: var(--text); border: none; padding: 0; }

/* --- PRECISE GEMINI 3D PILL --- */
.composer-shell { padding: 0 20px 24px; display: flex; justify-content: center; }
.composer.gemini-one { width: 100%; max-width: 840px; background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; }

.gemini-3d-pill {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    width: 100% !important;
    background: #f0f4f9;
    border-radius: 32px;
    padding: 10px 18px;
    gap: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    /* The "3D Highlight Border" effect */
    border: 1px solid #c4c7c5 !important;
    box-shadow: 0 1px 2px rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15) !important;
}

body.dark-mode .gemini-3d-pill {
    background: #1e1e20;
    border-color: #444746 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

.gemini-3d-pill:focus-within {
    background: #ffffff;
    border-color: transparent !important;
    box-shadow: 0 1px 3px rgba(60,64,67,0.3), 0 4px 12px 4px rgba(60,64,67,0.15) !important;
}

.gemini-3d-pill textarea {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    resize: none !important;
    padding: 10px 0 !important;
    font-family: inherit !important;
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
    color: #1f1f1f !important;
    min-height: 24px;
    max-height: 200px;
}

.dark-mode .gemini-3d-pill textarea { color: #e3e3e3 !important; }

.gemini-actions-cluster {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    padding-bottom: 4px;
}

.gemini-icon-btn {
    width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent;
    color: #444746; display: grid; place-items: center; cursor: pointer; transition: background 0.2s;
}
.dark-mode .gemini-icon-btn { color: #c4c7c5; }
.gemini-icon-btn:hover { background: rgba(0,0,0,0.05); }
.dark-mode .gemini-icon-btn:hover { background: rgba(255,255,255,0.05); }

.send-button {
    background: var(--accent) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 42px !important;
    height: 42px !important;
    display: grid !important;
    place-items: center !important;
    cursor: pointer !important;
}

.gemini-chip-btn { 
    border: 1px solid #c4c7c5; border-radius: 99px; padding: 6px 14px; 
    font-size: 0.85rem; background: transparent; color: #444746; cursor: pointer; 
}
.dark-mode .gemini-chip-btn { border-color: #444746; color: #c4c7c5; }
.gemini-chip-btn.is-active { background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; }


button.sidebar-toggle { background: transparent; border: none; cursor: pointer; color: var(--text-muted); padding: 8px; border-radius: 50%; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; right: -280px; top: 0; bottom: 0; width: 280px; z-index: 1000; transition: right 0.3s; }
  .app.sidebar-open .sidebar { right: 0; }
}
