/* ── NEXUS Cyber-Calendar & Auto-Scheduler Styles ──────────────── */

.calendar-split-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  height: calc(100vh - var(--topbar-h) - 48px);
}

.calendar-main-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.calendar-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.cal-title { font-size: 18px; font-weight: 700; min-width: 140px; text-align: center; font-family: 'Outfit', sans-serif; letter-spacing: 0.05em; }
.cal-nav { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-dim); cursor: pointer; transition: all 0.15s; }
.cal-nav:hover { background: var(--bg-hover); color: var(--text); }
.cal-legend { display: flex; gap: 12px; margin-left: auto; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-dim); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }

.calendar-grid-wrapper {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}
.calendar-grid-wrapper::-webkit-scrollbar { width: 6px; }
.calendar-grid-wrapper::-webkit-scrollbar-track { background: transparent; }
.calendar-grid-wrapper::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 6px 0;
  text-transform: uppercase;
}
.cal-day {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  min-height: 105px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.cal-day::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  background: radial-gradient(80px circle at var(--x, 0px) var(--y, 0px), rgba(139,92,246,0.08), transparent 80%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.cal-day:hover::before { opacity: 1; }
.cal-day:hover {
  border-color: rgba(139,92,246,0.4);
  background: var(--bg-raise);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.08);
  transform: translateY(-2px);
}
.cal-day.today {
  border-color: var(--purple);
  box-shadow: 0 0 14px rgba(139,92,246,0.25);
  background: rgba(139,92,246,0.02);
}
.cal-day.other-month { opacity: 0.25; }
.cal-day-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}
.cal-day.today .cal-day-num {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  box-shadow: 0 0 8px rgba(139,92,246,0.5);
}

/* Quick add hover button */
.cal-day-quick-add {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--purple);
  z-index: 5;
}
.cal-day-quick-add svg { width: 12px; height: 12px; stroke-width: 3; }
.cal-day:hover .cal-day-quick-add {
  opacity: 1;
  transform: scale(1);
}
.cal-day-quick-add:hover {
  background: #fff;
  color: var(--purple);
  box-shadow: 0 0 12px #fff;
  transform: scale(1.1) !important;
}

.cal-posts { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.cal-post-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-post-indicator .indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Neon Auto-Scheduler Side-Panel ───────────────── */
.calendar-auto-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}
.calendar-auto-panel::-webkit-scrollbar { display: none; }

.neon-glow-border {
  border: 1px solid var(--border) !important;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.calendar-auto-panel:hover {
  border-color: rgba(139,92,246,0.3) !important;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.05), var(--shadow);
}

.auto-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.auto-engine-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(6,182,212,0.15));
  border: 1px solid rgba(139,92,246,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  box-shadow: 0 0 10px rgba(139,92,246,0.2);
}
.laser-spin {
  animation: neon-pulse 2s infinite ease-in-out;
}
.auto-panel-header h3 { font-size: 14.5px; font-weight: 700; color: #fff; }
.auto-panel-header .subtitle { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--cyan); text-transform: uppercase; margin-top: 1px; }

.auto-panel-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }

.neon-text-purple { color: #c084fc; text-shadow: 0 0 8px rgba(192,132,252,0.2); }
.neon-text-cyan { color: #22d3ee; text-shadow: 0 0 8px rgba(34,211,238,0.2); }
.neon-text-pink { color: #f472b6; text-shadow: 0 0 8px rgba(244,114,182,0.2); }
.neon-text-blue { color: #60a5fa; text-shadow: 0 0 8px rgba(96,165,250,0.2); }

.neon-focus:focus {
  border-color: var(--purple) !important;
  box-shadow: 0 0 12px rgba(139,92,246,0.3) !important;
}

.badge-neon-cyan {
  background: rgba(6,182,212,0.15) !important;
  color: var(--cyan) !important;
  border: 1px solid rgba(6,182,212,0.3);
  box-shadow: 0 0 8px rgba(6,182,212,0.2);
}

/* Neon Slider Custom Styling */
.neon-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-raise);
  border-radius: 10px;
  outline: none;
  border: 1px solid var(--border);
}
.neon-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 8px var(--cyan);
  transition: transform 0.1s;
}
.neon-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Platform Toggles for Auto-Scheduler */
.auto-platform-checkboxes {
  display: flex;
  gap: 8px;
}
.platform-chk-lbl {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.platform-chk-lbl .chk-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transition: transform 0.2s;
}
.platform-chk-lbl.selected {
  color: #fff;
  border-color: var(--purple);
  background: rgba(139,92,246,0.06);
  box-shadow: 0 0 10px rgba(139,92,246,0.15);
}
.platform-chk-lbl.selected .chk-indicator {
  transform: scale(1.5);
  box-shadow: 0 0 6px currentColor;
}

/* Ignition Button and Progress Bar */
.ignition-container {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-neon-ignite {
  background: linear-gradient(135deg, var(--purple), var(--blue), var(--cyan));
  color: #fff;
  border: none;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 20px rgba(139,92,246,0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}
.btn-neon-ignite:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(6,182,212,0.6);
}
.btn-neon-ignite:active { transform: translateY(0); }

.neon-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-deep);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
.neon-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  box-shadow: 0 0 10px var(--cyan);
  border-radius: 10px;
  transition: width 0.1s linear;
}

@keyframes neon-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(139,92,246,0.4)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 8px rgba(139,92,246,0.8)); }
}

/* ── Day Detail Panel ─────────────────────────────── */
.day-detail-panel {
  position: absolute;
  top: 60px;
  right: 360px;
  width: 320px;
  background: var(--bg-deep);
  border: 1px solid rgba(139,92,246,0.3) !important;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 0 32px rgba(139,92,246,0.15), var(--shadow);
  z-index: 100;
  animation: slideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.day-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.day-detail-header h3 { font-size: 14px; font-weight: 700; color: #fff; }
.day-post-item {
  background: var(--bg-raise);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  border-left: 3px solid var(--purple);
  transition: border-color 0.2s;
}
.day-post-item:hover {
  border-left-color: var(--cyan);
}
.day-post-time { font-size: 10px; color: var(--text-dim); margin-bottom: 4px; font-family: 'JetBrains Mono', monospace; }
.day-post-text { font-size: 12.5px; color: var(--text); line-height: 1.5; }
.day-post-platforms { display: flex; gap: 4px; margin-top: 6px; }
.day-post-plat {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 700;
  background: var(--bg-surface);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* ── Custom High-Fidelity Textbox, Textarea, & Input Styling ── */
.field-input,
.compose-textarea,
textarea {
  background: var(--bg-void) !important;
  border: 1px solid var(--border-dim) !important;
  color: var(--text-primary) !important;
  border-radius: 8px !important;
  outline: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.field-input::placeholder,
.compose-textarea::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.2) !important;
}

.field-input:hover,
.compose-textarea:hover,
textarea:hover {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.field-input:focus,
.compose-textarea:focus,
textarea:focus {
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.22) !important;
}

/* Specific focus state for Subject field (purple theme) */
#auto-subject:focus {
  border-color: var(--neon-violet) !important;
  box-shadow: 0 0 12px rgba(176, 38, 255, 0.25) !important;
}

/* Custom indicator filters for calendar date pickers */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85) sepia(1) saturate(10000%) hue-rotate(280deg); /* Glowing neon pink calendar indicator icon! */
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Textarea Custom Scrollbar styling */
textarea::-webkit-scrollbar {
  width: 6px;
}
textarea::-webkit-scrollbar-track {
  background: transparent;
}
textarea::-webkit-scrollbar-thumb {
  background: var(--border-dim);
  border-radius: 3px;
}
textarea::-webkit-scrollbar-thumb:hover {
  background: var(--neon-cyan);
}

