/* ============================================================
 * Binovax — TREND INDICATORS SYSTEM STYLES (Part 1)
 * Premium Glassmorphic UI, Search, Active Manager & Settings Sheet
 * ============================================================ */

/* ── Modal Overlay ── */
.ind-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ind-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ── Modal Box (Desktop) ── */
.ind-modal {
  width: 580px;
  max-width: 95vw;
  max-height: 88vh;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(11, 15, 25, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 200, 83, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ind-modal-overlay.show .ind-modal {
  transform: translateY(0) scale(1);
}

/* ── Modal Header ── */
.ind-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.ind-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ind-header-icon {
  font-size: 22px;
  filter: drop-shadow(0 0 8px rgba(0, 200, 83, 0.4));
}

.ind-header-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.ind-header-badge {
  font-size: 10px;
  font-weight: 800;
  background: rgba(0, 200, 83, 0.15);
  color: #00e676;
  border: 1px solid rgba(0, 200, 83, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.ind-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ind-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* ── Navigation Tabs ── */
.ind-nav-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ind-tab-btn {
  background: none;
  border: none;
  color: #94a3b8;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ind-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.ind-tab-btn.active {
  background: rgba(0, 200, 83, 0.15);
  color: #00e676;
  border: 1px solid rgba(0, 200, 83, 0.3);
  box-shadow: 0 0 12px rgba(0, 200, 83, 0.15);
}

.ind-tab-count {
  background: rgba(0, 200, 83, 0.25);
  color: #00e676;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}

/* ── Search Bar ── */
.ind-search-wrap {
  padding: 12px 22px 6px;
  position: relative;
}

.ind-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px 10px 38px;
  color: #ffffff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.ind-search-input:focus {
  border-color: #00e676;
  background: rgba(0, 200, 83, 0.05);
  box-shadow: 0 0 12px rgba(0, 200, 83, 0.15);
}

.ind-search-icon {
  position: absolute;
  left: 34px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 14px;
  pointer-events: none;
}

/* ── Scroll Body ── */
.ind-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 22px 22px;
}

.ind-body::-webkit-scrollbar {
  width: 5px;
}

.ind-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* ── Indicator Grid (Browse) ── */
.ind-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.ind-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
}

.ind-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 200, 83, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.ind-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.ind-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 200, 83, 0.15), rgba(0, 229, 255, 0.1));
  border: 1px solid rgba(0, 200, 83, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.ind-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.ind-card-desc {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.4;
}

.ind-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ind-tag {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ind-add-btn {
  background: rgba(0, 200, 83, 0.15);
  border: 1px solid rgba(0, 200, 83, 0.35);
  color: #00e676;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ind-add-btn:hover {
  background: #00e676;
  color: #0d1117;
  box-shadow: 0 0 10px rgba(0, 200, 83, 0.4);
}

/* ── Active Indicators List ── */
.ind-active-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ind-active-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.ind-active-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.ind-active-item.hidden-item {
  opacity: 0.5;
}

.ind-active-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ind-active-color-preview {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.ind-active-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.ind-active-params {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 1px;
}

.ind-active-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ind-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ind-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.ind-action-btn.edit-btn:hover {
  background: rgba(0, 200, 83, 0.2);
  color: #00e676;
  border-color: rgba(0, 200, 83, 0.4);
}

.ind-action-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ── Indicator Settings Modal / Drawer ── */
.ind-settings-modal {
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.99) 0%, rgba(10, 14, 23, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ind-settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px 22px;
}

.ind-settings-section-title {
  font-size: 11px;
  font-weight: 800;
  color: #00e676;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 14px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ind-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

.ind-form-group.full-width {
  grid-column: span 2;
}

.ind-label {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
}

.ind-input,
.ind-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  color: #ffffff;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.ind-input:focus,
.ind-select:focus {
  border-color: #00e676;
  background: rgba(0, 200, 83, 0.06);
}

.ind-color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ind-color-input {
  -webkit-appearance: none;
  appearance: none;
  width: 36px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: none;
  cursor: pointer;
  padding: 0;
}

.ind-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.ind-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 5px;
}

.ind-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ind-btn-sec {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ind-btn-sec:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.ind-btn-pri {
  background: linear-gradient(135deg, #00c853, #00e676);
  border: none;
  color: #0d1117;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
}

.ind-btn-pri:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 200, 83, 0.45);
}

/* ── Mobile Responsive / Bottom Sheet Drawer ── */
@media (max-width: 767px) {
  .ind-modal-overlay {
    align-items: flex-end;
  }

  .ind-modal,
  .ind-settings-modal {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    border-bottom: none;
  }

  .ind-modal-overlay.show .ind-modal,
  .ind-modal-overlay.show .ind-settings-modal {
    transform: translateY(0);
  }

  .ind-grid {
    grid-template-columns: 1fr;
  }

  .ind-settings-grid {
    grid-template-columns: 1fr;
  }

  .ind-form-group.full-width {
    grid-column: span 1;
  }

  .ind-header {
    padding: 16px 18px 12px;
  }

  .ind-body,
  .ind-settings-body {
    padding: 12px 18px 18px;
  }

  .ind-footer {
    padding: 12px 18px;
  }
}

/* ============================================================
 * ── OSCILLATOR SUB-PANELS SYSTEM STYLES (Part 2) ──
 * ============================================================ */

#oscillatorPanelsContainer,
#mobileOscillatorPanelsContainer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  padding: 0 4px 12px 4px;
}

.osc-panel-wrap {
  background: rgba(13, 17, 23, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.osc-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  user-select: none;
}

.osc-panel-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.osc-panel-title {
  font-size: 11px;
  font-weight: 800;
  color: #00e676;
  letter-spacing: 0.3px;
}

.osc-panel-val {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  font-family: 'Inter', monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
}

.osc-panel-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.osc-btn {
  background: none;
  border: none;
  color: #94a3b8;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.osc-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.osc-btn.edit-btn:hover {
  color: #00e676;
}

.osc-btn.delete-btn:hover {
  color: #f87171;
}

.osc-panel-body {
  width: 100%;
  height: 130px;
  position: relative;
}

.osc-panel-wrap.collapsed .osc-panel-body {
  display: none;
}

/* ── Mobile Responsive Visual Polish ── */
@media (max-width: 768px) {
  #mobileOscillatorPanelsContainer {
    gap: 6px;
    padding: 0 2px 10px 2px;
  }

  .osc-panel-wrap {
    border-radius: 10px;
  }

  .osc-panel-header {
    padding: 5px 8px;
  }

  .osc-panel-title-group {
    gap: 6px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .osc-panel-title {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .osc-panel-val {
    font-size: 9.5px;
    padding: 1px 4px;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .osc-panel-actions {
    gap: 2px;
    flex-shrink: 0;
  }

  .osc-btn {
    width: 26px;
    height: 26px;
    font-size: 11px;
    border-radius: 6px;
  }

  .osc-panel-body {
    height: 105px;
  }

  .ind-modal {
    width: 96%;
    max-height: 85vh;
    border-radius: 16px;
  }

  .ind-settings-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ind-form-group {
    margin-bottom: 6px;
  }

  .ind-input, .ind-select {
    height: 38px;
    font-size: 12px;
  }

  .ind-color-input {
    height: 38px;
  }
}

