/* ─── Kore1 Comms — Dark Design System ─────────── */

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ─── PTT / Glow Effects ─────────────────────────── */
.ptt-glow {
  box-shadow: 0 0 30px rgba(244, 136, 48, 0.2), inset 0 0 12px rgba(244, 136, 48, 0.1);
}

.ptt-gradient {
  background: linear-gradient(135deg, #F48830 0%, #713700 100%);
}

.glass-panel {
  background: rgba(31, 32, 32, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ─── Scrollbar ──────────────────────────────────── */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

main { scrollbar-width: thin; scrollbar-color: #353535 transparent; }
main::-webkit-scrollbar { width: 6px; }
main::-webkit-scrollbar-track { background: transparent; }
main::-webkit-scrollbar-thumb { background: #353535; border-radius: 3px; }

/* ─── Sidebar Navigation ─────────────────────────── */
.nav-btn {
  color: #c6c6c8;
  opacity: 0.6;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffb785;
  opacity: 1;
}
.nav-btn.active {
  color: #F48830;
  opacity: 1;
  position: relative;
}
.nav-btn.active::after {
  content: '';
  position: absolute;
  right: 0;
  height: 2rem;
  width: 3px;
  background: #F48830;
  border-radius: 3px 0 0 3px;
}
.nav-btn.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ─── Mobile Nav ─────────────────────────────────── */
.mob-nav-btn {
  color: #c6c6c8;
  opacity: 0.6;
  transition: all 0.15s;
}
.mob-nav-btn.active {
  color: #F48830;
  background: rgba(244, 136, 48, 0.1);
  opacity: 1;
}
.mob-nav-btn.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ─── Channel Badges ─────────────────────────────── */
.badge-email { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge-teams { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.badge-call  { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-sms   { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }

/* ─── Channel Selector (Compose) ─────────────────── */
.channel-btn {
  background: transparent;
  color: #c6c6c8;
}
.channel-btn:hover {
  border-color: rgba(244, 136, 48, 0.3);
}
.channel-btn.active {
  background: linear-gradient(135deg, #F48830 0%, #713700 100%);
  color: #301400;
  border-color: transparent;
  font-weight: 700;
}

/* ─── Result Cards ───────────────────────────────── */
.result-card {
  background: #131313;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}
.result-card:hover {
  background: #2a2a2a;
  border-color: rgba(244, 136, 48, 0.2);
}
.result-card:hover .result-actions {
  opacity: 1;
}
.result-card .result-actions {
  opacity: 0;
  transition: opacity 0.2s;
}
@media (max-width: 768px) {
  .result-card .result-actions { opacity: 1; }
}

/* ─── Spinner ────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 0.8s linear infinite; }

/* ─── Toast ──────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  animation: fadeInUp 0.3s ease;
  font-family: 'Inter', sans-serif;
}
.toast.success { background: #38a169; color: #fff; }
.toast.error { background: #e53e3e; color: #fff; }
.toast:not(.success):not(.error) { background: #353535; color: #e5e2e1; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Calendar Cells ─────────────────────────────── */
.cal-cell {
  background: #131313;
  min-height: 120px;
  padding: 0.625rem;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}
.cal-cell:hover { background: #1b1c1c; }
.cal-cell.today {
  border-left: 3px solid #F48830;
  background: #181410;
}
.cal-cell.outside {
  opacity: 0.25;
  background: #0e0e0e;
}
.cal-cell .day-num {
  font-size: 0.875rem;
  font-weight: 700;
  color: #e5e2e1;
  display: inline-block;
  margin-bottom: 0.25rem;
}
.cal-cell.today .day-num {
  color: #F48830;
  font-weight: 800;
}

/* Calendar event pills */
.cal-event {
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 4px;
  border-left: 2px solid;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  display: block;
  line-height: 1.4;
}
.cal-event.teams { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; border-color: #8b5cf6; }
.cal-event.normal { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border-color: #3b82f6; }
.cal-event.allday { background: rgba(244, 136, 48, 0.15); color: #ffb785; border-color: #F48830; }
.cal-more { font-size: 9px; color: rgba(198, 198, 200, 0.4); padding-top: 1px; }

/* ─── Detail Body ────────────────────────────────── */
.detail-body { white-space: pre-wrap; word-break: break-word; line-height: 1.7; }

/* ─── History Items ──────────────────────────────── */
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.75rem;
  background: #1f2020;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.15s;
}
.history-item:hover { border-color: rgba(244, 136, 48, 0.3); }

/* ─── Inbox Items ────────────────────────────────── */
.inbox-item.active-email {
  background: #1f2020;
  border-left: 3px solid #F48830;
}

/* ─── Direction Indicator ────────────────────────── */
.dir-missed { color: #ffb4ab; }
.dir-outbound { color: #F48830; }
.dir-inbound { color: #c6c6c8; }

@media (min-width: 768px) {
  .toast { bottom: 2rem; }
}

/* ─── Mobile Overrides ──────────────────────────── */
@media (max-width: 767px) {
  /* Ensure main content has no left margin on mobile */
  main { margin-left: 0 !important; }

  /* Add bottom padding so content isn't hidden behind nav + PTT */
  main { padding-bottom: 10rem !important; }

  /* Calendar cells smaller on mobile */
  .cal-cell { min-height: 80px; padding: 0.375rem; }
  .cal-cell .day-num { font-size: 0.75rem; }
  .cal-event { font-size: 7px; }

  /* Hide the PTT floating button when voice overlay is active */
  body:has(#voice-status:not(.hidden)) #mobile-ptt { display: none; }
}
