/* ========================================== */
/* FIKRA 3D - CUSTOM GLOBAL STYLES            */
/* ========================================== */

/* Dark Aesthetic Custom Webkit Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #dc2626; /* FIKRA 3D Accent Red */
}

/* Custom WebGL Viewport Glass Effects */
.glass-panel {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Three.js Canvas Hover Glow */
#canvas-container:hover {
  box-shadow: inset 0 0 20px rgba(220, 38, 38, 0.1);
}

/* Prevent Text Highlight during 3D Drag/Rotate */
#canvas-container canvas {
  user-select: none;
  -webkit-user-select: none;
}

.nav-brand-logo {
  height: 3.25rem;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* Light Action Button Style */
.btn-light {
  background-color: #ffffff;
  color: #0a0a0a;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-light:hover {
  background-color: #e5e5e5;
}

/* ========================================== */
/* CATALOG CARD & VIEWPORT STYLES             */
/* ========================================== */

/* Catalog Card Container Glows */
.catalog-card {
  background: #080808;
  border: 1px solid #262626;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.catalog-card:hover {
  border-color: rgba(220, 38, 38, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(220, 38, 38, 0.15);
}

/* Modal Canvas Container */
#modal-3d-canvas canvas {
  outline: none;
  width: 100% !important;
  height: 100% !important;
}

/* ========================================== */
/* IMPORT PAGE MEDIA TICKER & TEXTAREA UTILS  */
/* ========================================== */

.media-ticker:checked ~ label svg {
  opacity: 1 !important;
}

.media-ticker:checked ~ label div > div {
  border-color: rgba(220, 38, 38, 0.6);
  background-color: rgba(220, 38, 38, 0.25);
}

textarea::-webkit-scrollbar {
  width: 6px;
}

textarea::-webkit-scrollbar-track {
  background: #0a0a0a;
}

textarea::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 4px;
}


/* ========================================== */
/* ADMIN QUICK NOTES SIDE DRAWER STYLES       */
/* ========================================== */

/* Side Flag Button */
#notes-toggle-flag {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: #dc2626;
  color: white;
  writing-mode: vertical-lr;
  text-orientation: mixed;
  padding: 12px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: -4px 0 20px rgba(220, 38, 38, 0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

#notes-toggle-flag:hover {
  background: #ef4444;
  padding-left: 14px;
}

/* Sliding Drawer Overlay & Panel */
#notes-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#notes-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

#notes-drawer-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: #0c0c0c;
  border-left: 1px solid #262626;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
}

#notes-drawer-overlay.open #notes-drawer-panel {
  transform: translateX(0);
}

/* Custom Checkboxes (iOS Reminders Style) */
.note-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #525252;
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: transparent;
  flex-shrink: 0;
}

.note-checkbox:hover {
  border-color: #dc2626;
}

.note-checkbox:checked {
  background-color: #dc2626;
  border-color: #dc2626;
}

.note-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Notes Custom Scrollbar */
#notes-list-container::-webkit-scrollbar {
  width: 5px;
}
#notes-list-container::-webkit-scrollbar-track {
  background: #0a0a0a;
}
#notes-list-container::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 4px;
}


/* ========================================== */
/* FIKRA 3D INDUSTRIAL AI WIDGET STYLES       */
/* ========================================== */

/* Floating Borderless & Transparent Stacked Button */
#ai-chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  padding: 0;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#ai-chat-toggle:hover {
  background: transparent;
  transform: translateY(-3px) scale(1.08);
}

/* Logo Image Size */
#ai-chat-toggle img {
  width: 75px;
  height: 75px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.9));
}

/* Text Under Logo */
.chat-toggle-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

/* Chat Window Container */
#ai-chat-widget {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 420px;
  max-width: calc(100vw - 48px);
  background: #0c0c0c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom right;
}

#ai-chat-widget.hidden-chat {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95) translateY(10px);
}

/* Header - Enforces proper row layout (Title left, Close button right) */
.chat-header {
  background: #111111;
  color: #ffffff;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.chat-header-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-close-btn {
  background: transparent;
  border: none;
  color: #888888;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: color 0.2s;
  padding: 4px 8px;
}

.chat-close-btn:hover {
  color: #ffffff;
}

/* Message Output Area */
.chat-output {
  height: 360px;
  overflow-y: auto;
  padding: 16px;
  background: #080808;
  color: #e5e5e5;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-output::-webkit-scrollbar {
  width: 4px;
}
.chat-output::-webkit-scrollbar-track {
  background: #080808;
}
.chat-output::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 2px;
}

/* Centralized Chat Message Bubbles (Control font-size here globally) */
.chat-bubble {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.4;
  max-width: 85%;
}

.chat-bubble.user {
  background: #1f2937;
  color: #ffffff;
  border-top-right-radius: 2px;
  align-self: flex-end;
}

.chat-bubble.agent, 
.chat-bubble.system {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e5e5e5;
  border-top-left-radius: 2px;
  align-self: flex-start;
}

.chat-bubble.loading {
  color: #888888;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.chat-bubble.error {
  background: #450a0a;
  border: 1px solid #dc2626;
  color: #fca5a5;
  font-size: 12px;
}

/* Input Bar & Dark Input Styling */
.chat-input-container {
  display: flex;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  background: #111111;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: #1a1a1a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #ffffff !important;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: #dc2626 !important;
}

.chat-input::placeholder {
  color: #737373;
}

.chat-send-btn {
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.2s;
}

.chat-send-btn:hover {
  background: #b91c1c;
}
