/* =========================================================
   👁️ OBSERVER STYLE v1.1 (🚧)
   [Welcome System Styles — Observer Module]
   ========================================================= */

/*🧠 Архітектура:
  🧠 CSS для Observer модуля ADC
  🧠 Живе ВСЕРЕДИНІ .adc-workspace
  🧠 Layout, colors, fonts — з main-style-adc.css */

/*💡 Секції:
  💡 1. Root Wrapper
  💡 2. Grid Layout
  💡 3. Left Settings Column
  💡 4. Base Admin Section
  💡 5. Status Module Row
  💡 6. Neon Toggle
  💡 7. Debug Button
  💡 8. Inputs & Textarea
  💡 9. Slider Controls
  💡 10. Hint Text
  💡 11. Save Button
  💡 12. Last Saved Indicator
  💡 13. Hero Subtitle
  💡 14. Preview Canvas
  💡 15. Save Center
  💡 16. Welcome Block
  💡 17. Role Compact
  💡 18. Message Compact
  💡 19. File Upload
  💡 20. Spacing Helpers
  💡 21. Responsive */


/* ╔═══════════════════════════════════════════════════════════╗
   ║  📦 1. ROOT WRAPPER                                        ║
   ║  Кореневий контейнер модуля                                ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-observer {
  padding: 0;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  🧩 2. GRID LAYOUT                                         ║
   ║  Основна сітка модуля                                      ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.adc-full-width {
  grid-column: 1 / -1;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  📂 3. LEFT SETTINGS COLUMN                                ║
   ║  Ліва колонка налаштувань                                  ║
   ╚═══════════════════════════════════════════════════════════╝ */

.observer-settings {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.observer-left-stack {
  grid-column: 1 / 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  🧱 4. BASE ADMIN SECTION                                  ║
   ║  Базовий контейнер блоків                                  ║
   ╚═══════════════════════════════════════════════════════════╝ */

.admin-section {
  background: var(--bg-soft);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 20px;
  box-shadow:
    0 10px 30px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.admin-section h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-section.compact {
  padding: 16px;
}

.admin-section.compact h3 {
  margin-bottom: 10px;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  🧠 5. STATUS MODULE ROW                                   ║
   ║  Рядок статусу модуля                                      ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 64px;
  padding-inline: 160px;
}

.adc-status-left,
.adc-status-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.adc-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-muted);
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  💡 6. ADC NEON TOGGLE                                     ║
   ║  Перемикач стану модуля                                    ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-neon-toggle {
  display: inline-flex;
  cursor: pointer;
  user-select: none;
}

.adc-neon-toggle input {
  display: none;
}

/* Track */
.adc-neon-track {
  position: relative;
  width: 92px;
  height: 38px;
  padding: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0b0f1a, #05080f);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow:
    inset 0 4px 10px rgba(0,0,0,.9),
    0 8px 20px rgba(0,0,0,.7);
  overflow: hidden;
  transition: background .35s ease, box-shadow .35s ease;
}

/* Text */
.adc-neon-text {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .2em;
  color: #00000075;
  text-shadow: 0 1px 2px rgba(0,0,0,.32), 0 0 4px rgba(0,0,0,.32);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity .25s ease;
}

/* Thumb */
.adc-neon-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  z-index: 3;
  background: radial-gradient(circle at 30% 30%, #ffffff, #d9f7f2 45%, #9fded4 100%);
  box-shadow: 0 6px 14px rgba(0,0,0,.85), inset 0 2px 6px rgba(255,255,255,.9);
  transition: all .35s cubic-bezier(.4,0,.2,1);
}

/* ON State */
.adc-neon-toggle input:checked + .adc-neon-track {
  background: linear-gradient(90deg, #4dffd8, #2fffc3, #19e6a8);
  box-shadow:
    0 0 10px rgba(46,204,113,.55),
    0 0 22px rgba(46,204,113,.35),
    0 0 36px rgba(46,204,113,.20),
    inset 0 0 10px rgba(255,255,255,.25);
  animation: adcNeonBreath 3s ease-in-out infinite;
}

.adc-neon-toggle input:checked + .adc-neon-track .adc-neon-thumb {
  left: calc(100% - 34px);
  background: radial-gradient(circle at 30% 30%, #0e3d2c, #061e16 55%, #03110d 100%);
  box-shadow:
    0 0 12px rgba(46,204,113,.7),
    inset 0 0 10px rgba(46,204,113,.6),
    0 6px 14px rgba(0,0,0,.9);
}

.adc-neon-toggle input:checked + .adc-neon-track .adc-neon-text {
  opacity: 1;
}

@keyframes adcNeonBreath {
  0%, 100% {
    box-shadow:
      0 0 10px rgba(46,204,113,.45),
      0 0 20px rgba(46,204,113,.30),
      inset 0 0 8px rgba(255,255,255,.25);
  }
  50% {
    box-shadow:
      0 0 18px rgba(46,204,113,.65),
      0 0 32px rgba(46,204,113,.45),
      inset 0 0 12px rgba(255,255,255,.35);
  }
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  🛠 7. DEBUG BUTTON                                        ║
   ║  Кнопка дебагу                                             ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-debug-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.12);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 8px 18px rgba(0,0,0,.6);
}

.adc-debug-icon {
  font-size: 16px;
  opacity: .9;
}

.adc-debug-btn:hover {
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
  border-color: rgba(255,255,255,.22);
}

.adc-debug-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 4px 10px rgba(0,0,0,.6);
}

/* v1.1 - Loading state */
.adc-debug-btn.loading {
  opacity: 0.6;
  pointer-events: none;
}

.adc-debug-btn.loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  ✍ 8. INPUTS & TEXTAREA                                   ║
   ║  Поля вводу                                                ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-input,
.adc-textarea {
  width: 100%;
  padding: 12px 14px;
  background: #0b0d12;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: border .2s ease, box-shadow .2s ease;
}

.adc-input:focus,
.adc-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(88,101,242,.25);
}

.adc-input::placeholder,
.adc-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.adc-textarea {
  resize: vertical;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  🎚 9. SLIDER CONTROLS                                     ║
   ║  Слайдери та числові інпути                                ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.adc-slider-row label {
  font-size: 12px;
  color: var(--text-muted);
}

.adc-slider-control {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 12px;
  align-items: center;
}

.adc-slider-control input[type="range"] {
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(88,101,242,.7), rgba(155,92,255,.7));
}

.adc-slider-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 14px rgba(88,101,242,.8);
  cursor: pointer;
}

.adc-slider-control input[type="number"] {
  background: #0b0d12;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 6px 8px;
  color: #ffffff;
  font-size: 12px;
  text-align: center;
}

/* v1.1 - Settings Group */
.adc-settings-group {
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  💡 10. HINT TEXT                                          ║
   ║  Текстові підказки                                         ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.adc-hint code {
  background: rgba(255,255,255,.08);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  💾 11. SAVE BUTTON                                        ║
   ║  Кнопка збереження                                         ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-save-btn,
#observerSaveBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-width: 220px;
  padding: 15px 24px;
  border: none;
  border-radius: 16px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .8px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #ffffff;
  box-shadow: 0 0 26px rgba(88,101,242,.55);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.adc-save-btn:hover,
#observerSaveBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(88,101,242,.8);
}

.adc-save-btn:disabled,
#observerSaveBtn:disabled {
  opacity: .35;
  cursor: not-allowed;
  box-shadow: none;
  background: linear-gradient(135deg, #444, #333);
}

/* v1.1 - Has changes indicator */
.adc-save-btn.has-changes,
#observerSaveBtn.has-changes {
  animation: pulse-save 2s ease-in-out infinite;
}

@keyframes pulse-save {
  0%, 100% { box-shadow: 0 0 26px rgba(88,101,242,.55); }
  50% { box-shadow: 0 0 40px rgba(88,101,242,.9), 0 0 60px rgba(155,92,255,.5); }
}

/* v1.1 - Saving state */
.adc-save-btn.saving,
#observerSaveBtn.saving {
  opacity: 0.7;
  pointer-events: none;
}

.save-icon {
  font-size: 18px;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  🕐 12. LAST SAVED INDICATOR                               ║
   ║  Індикатор останнього збереження                           ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-last-saved {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.adc-last-saved.saved {
  color: var(--green);
  opacity: 1;
}

.adc-last-saved.saved .last-saved-text::before {
  content: "✓ ";
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  📊 13. HERO SUBTITLE                                      ║
   ║  Підзаголовок героя                                        ║
   ╚═══════════════════════════════════════════════════════════╝ */

.hero-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

/* v1.1 - Observer Icon */
.observer-icon {
  background: radial-gradient(
    circle at center,
    transparent 36%,
    rgba(46,204,113,0.28) 40%,
    rgba(46,204,113,0.18) 70%,
    rgba(0,0,0,0.65) 100%
  );
  box-shadow: 0 0 50px rgba(46,204,113,0.55), inset 0 0 28px rgba(255,255,255,0.08);
}

.observer-icon svg {
  fill: #4cff9a;
  filter: drop-shadow(0 0 8px rgba(46,204,113,0.6));
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  🖼 14. PREVIEW CANVAS                                     ║
   ║  Discord превʼю                                            ║
   ╚═══════════════════════════════════════════════════════════╝ */

.discord-preview {
  width: 100%;
  max-width: 500px;
  height: 570px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  background-color: rgba(0, 0, 0, 0);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
}

.discord-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 1;
  pointer-events: none;
}

.discord-preview > * {
  position: relative;
  z-index: 2;
}

/* Header */
.discord-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.discord-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.discord-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discord-author {
  font-weight: 600;
  font-size: 14px;
}

/* v1.1 - Timestamp */
.discord-timestamp {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Message */
.discord-message-text {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(88, 101, 242, 0.18);
  font-size: 14px;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  max-width: 100%;
  word-break: break-word;
}

/* User Label */
.discord-user-label {
  font-size: 13px;
  opacity: 0.9;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* Bot Badge */
.discord-bot {
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
}

/* Bot Image + Canvas */
.discord-bot-image {
  margin-top: auto;
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  border-radius: 8px;
}

.canvas-preview-wrapper {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.canvas-preview-wrapper canvas {
  width: 1024px;
  height: 1024px;
  transform: scale(0.41);
  transform-origin: top left;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  💾 15. SAVE CENTER                                        ║
   ║  Центрований блок збереження                               ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-save-center {
  text-align: center;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  🖼 16. WELCOME BLOCK                                      ║
   ║  Вітальний блок                                            ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-welcome-block {
  grid-column: 1 / -1;
  padding: 18px;
}

.adc-center-title {
  text-align: center;
  margin-bottom: 16px;
}

.adc-welcome-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.adc-subtitle {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #ffffff;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  🎭 17. ROLE — COMPACT BLOCK                               ║
   ║  Компактний блок ролі                                      ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-role-compact,
.adc-channel-compact {
  padding: 14px;
}

.adc-role-row,
.adc-channel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: center;
}

.adc-role-preview,
.adc-channel-preview {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border-soft);
  font-size: 13px;
  color: #ffffff;
  opacity: .85;
  transition: all 0.2s ease;
}

/* v1.1 - Preview states */
.adc-role-preview.valid,
.adc-channel-preview.valid {
  border-color: var(--green);
  color: var(--green);
}

.adc-role-preview.invalid,
.adc-channel-preview.invalid {
  border-color: var(--red);
  color: var(--red);
}

.adc-role-preview.warning,
.adc-channel-preview.warning {
  border-color: var(--yellow);
  color: var(--yellow);
}

.adc-role-preview.loading,
.adc-channel-preview.loading {
  opacity: 0.5;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  ✉ 18. MESSAGE — COMPACT                                   ║
   ║  Компактний блок повідомлення                              ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-message-compact {
  grid-column: 1 / 2;
  padding: 14px;
  max-width: 100%;
}

.adc-message-input {
  min-height: 80px;
  max-height: 160px;
}

/* v1.1 - Char count */
.adc-char-count {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

.adc-char-count .over-limit {
  color: var(--red);
  font-weight: 600;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  📤 19. FILE / BACKGROUND UPLOAD                           ║
   ║  Завантаження файлів та фону                               ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-background-upload {
  padding: 14px;
}

.adc-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.adc-upload-btn {
  padding: 10px 16px;
  font-size: 13px;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border-soft);
  color: #ffffff;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.adc-upload-btn:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.22);
}

.adc-upload-btn:active {
  transform: translateY(1px);
}

/* v1.1 - Upload submit button */
.adc-upload-submit {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-color: transparent;
}

.adc-upload-submit:hover {
  box-shadow: 0 0 20px rgba(88,101,242,0.5);
}

.adc-upload-submit.loading {
  opacity: 0.6;
  pointer-events: none;
}

.adc-upload-filename {
  flex: 1;
  min-width: 150px;
  opacity: .85;
  cursor: default;
}

/* v1.1 - Reset button */
.adc-reset-btn {
  margin-top: 12px;
  padding: 8px 14px;
  font-size: 12px;
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255,77,79,0.1);
  border: 1px solid rgba(255,77,79,0.3);
  color: var(--red);
  transition: all 0.2s ease;
}

.adc-reset-btn:hover {
  background: rgba(255,77,79,0.2);
  border-color: var(--red);
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  📐 20. SPACING HELPERS                                    ║
   ║  Допоміжні класи відступів                                 ║
   ╚═══════════════════════════════════════════════════════════╝ */

.adc-no-margin {
  margin: 0 !important;
}

.adc-no-gap {
  gap: 0 !important;
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  📱 21. RESPONSIVE                                         ║
   ║  Адаптивні стилі                                           ║
   ╚═══════════════════════════════════════════════════════════╝ */

@media (max-width: 900px) {
  .adc-grid-2 {
    grid-template-columns: 1fr;
  }
  
  .observer-left-stack {
    grid-column: 1;
  }
  
  .adc-welcome-layout {
    grid-template-columns: 1fr;
  }
  
  .adc-status-row {
    flex-direction: column;
    padding-inline: 20px;
    gap: 24px;
  }
  
  .adc-role-row,
  .adc-channel-row {
    grid-template-columns: 1fr;
  }
  
  .discord-preview {
    max-width: 100%;
  }
}

/* ╔═══════════════════════════════════════════════════════════╗
   ║  ✅ END OF OBSERVER STYLE v1.1                            ║
   ╚═══════════════════════════════════════════════════════════╝ */