/* ============================================================================
 * WinTradely — Professional Chart Drawings Tools UI & Overlay Styles
 * ============================================================================ */

/* ── Toolbar Button ── */
.drawings-toolbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text, #cbd5e1);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.drawings-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.drawings-toolbar-btn.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(59, 130, 246, 0.25));
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}

.drawings-toolbar-btn svg {
  transition: transform 0.2s ease;
}

.drawings-toolbar-btn:hover svg {
  transform: scale(1.1);
}

/* Mobile toolbar icon button */
.m-ind-btn#mDrawingsBtn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.m-ind-btn#mDrawingsBtn.active {
  background: rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* ── Overlay Canvas inside Chart Containers ── */
.chart-drawings-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important;
  z-index: 25;
}

/* Dynamic cursor classes on chart container without blocking chart scrolling */
.tv-chart-container.dw-active-tool,
.tv-chart-container.dw-active-tool canvas {
  cursor: crosshair !important;
}

.tv-chart-container.dw-hover-grab,
.tv-chart-container.dw-hover-grab canvas {
  cursor: grab !important;
}

.tv-chart-container.dw-hover-pointer,
.tv-chart-container.dw-hover-pointer canvas {
  cursor: pointer !important;
}

.tv-chart-container.dw-dragging,
.tv-chart-container.dw-dragging canvas,
.tv-chart-container.dw-dragging *,
body.dw-is-dragging,
body.dw-is-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* ── Floating Drawing Helper Toast / Instruction Banner ── */
.dw-instruction-toast {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45), 0 0 15px rgba(59, 130, 246, 0.2);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: dwToastFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

@keyframes dwToastFadeIn {
  from { opacity: 0; transform: translate(-50%, -10px) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.dw-instruction-toast .dw-toast-cancel {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dw-instruction-toast .dw-toast-cancel:hover {
  background: rgba(239, 68, 68, 0.8);
  color: #fff;
}

/* ── Floating Drawing Properties Bar (When selected) ── */
.drawing-properties-bar {
  position: absolute;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 12px rgba(255, 255, 255, 0.05);
  z-index: 110;
  animation: dwBarPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

@keyframes dwBarPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.dw-color-swatches {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.dw-color-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dw-color-circle:hover {
  transform: scale(1.2);
}

.dw-color-circle.active {
  border-color: #fff;
  box-shadow: 0 0 8px currentColor;
  transform: scale(1.15);
}

.dw-select-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.dw-bar-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  outline: none;
}

.dw-bar-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
}

.dw-bar-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.dw-bar-btn.active {
  background: rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
  color: #60a5fa;
}

.dw-bar-btn.dw-delete-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #f87171;
}

/* ── Drawings Popup / Sidebar Panel Overlay ── */
.drawings-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawings-panel-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.drawings-panel {
  background: var(--bg2, #111827);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  width: 92%;
  max-width: 660px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 25px rgba(59, 130, 246, 0.15);
  overflow: hidden;
  transform: scale(0.92) translateY(15px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawings-panel-overlay.show .drawings-panel {
  transform: scale(1) translateY(0);
}

/* Panel Header */
.dw-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

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

.dw-panel-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(59, 130, 246, 0.4));
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.dw-panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.dw-panel-subtitle {
  margin: 0;
  font-size: 11px;
  color: var(--text3, #94a3b8);
}

.dw-panel-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
}

.dw-panel-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
}

/* Category Filter Pills */
.dw-category-pills {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dw-category-pills::-webkit-scrollbar {
  display: none;
}

.dw-cat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text, #cbd5e1);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.dw-cat-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.dw-cat-pill.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Panel Body / Grid */
.dw-panel-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dw-category-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dw-category-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text3, #64748b);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dw-category-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.dw-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

/* Tool Item Card */
.drawing-tool-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.drawing-tool-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35);
}

.drawing-tool-item.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(59, 130, 246, 0.15));
  border-color: #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.25);
}

.dw-tool-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  transition: all 0.2s ease;
}

.drawing-tool-item:hover .dw-tool-icon-wrap {
  background: rgba(59, 130, 246, 0.2);
  color: #fff;
  transform: scale(1.08);
}

.drawing-tool-item.active .dw-tool-icon-wrap {
  background: #3b82f6;
  color: #fff;
}

.dw-tool-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #e2e8f0);
  line-height: 1.3;
}

.dw-tool-desc {
  display: none !important; /* Redundant text descriptions removed as requested */
}

/* Panel Footer / Delete All */
.dw-panel-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dw-footer-info {
  font-size: 11px;
  color: var(--text3, #94a3b8);
}

.drawings-clear-all-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.drawings-clear-all-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ============================================================================
 * WinTradely — Left Dock Desktop Drawings Flyout Menu (.clt-drawings-flyout)
 * Ultra-professional, compact, animated drawing tools menu for left dock
 * ============================================================================ */
.clt-drawings-flyout {
  position: absolute;
  left: calc(100% + 10px);
  top: -110px;
  width: 326px;
  max-height: min(580px, calc(100vh - 120px));
  background: rgba(13, 17, 28, 0.97);
  border: 1px solid rgba(168, 85, 247, 0.32);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(168, 85, 247, 0.18);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 0;
  display: none;
  flex-direction: column;
  z-index: 10000;
  user-select: none;
  overflow: hidden;
  animation: cltDwFlyoutIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.clt-drawings-flyout.show {
  display: flex !important;
}

@keyframes cltDwFlyoutIn {
  from {
    opacity: 0;
    transform: translateX(-14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ── Flyout Header ── */
.clt-dw-header {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.12), transparent);
}

.clt-dw-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clt-dw-badge-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(99, 102, 241, 0.3));
  border: 1px solid rgba(168, 85, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

.clt-dw-title-box {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.clt-dw-head-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.clt-dw-head-sub {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.2;
}

.clt-dw-close-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
}

.clt-dw-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
}

/* ── Flyout Search Box ── */
.clt-dw-search-wrap {
  padding: 8px 10px;
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.clt-dw-search-ico {
  position: absolute;
  left: 20px;
  width: 14px;
  height: 14px;
  stroke: #a855f7;
  pointer-events: none;
}

.clt-dw-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 6px 26px 6px 30px;
  font-size: 11.5px;
  color: #fff;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.clt-dw-search-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

.clt-dw-search-input::placeholder {
  color: #64748b;
  font-size: 11px;
}

.clt-dw-search-clear {
  position: absolute;
  right: 18px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  line-height: 1;
}

.clt-dw-search-clear:hover {
  color: #fff;
}

/* ── Category Filter Pills ── */
.clt-dw-nav-tabs {
  padding: 8px 10px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.15);
}

.clt-dw-nav-tabs::-webkit-scrollbar {
  display: none;
}

.clt-dw-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  outline: none;
}

.clt-dw-tab:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.clt-dw-tab.active {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-color: #c084fc;
  color: #fff;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.35);
}

.clt-dw-active-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 1px 5px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

/* ── Tools List Container ── */
.clt-dw-tools-list {
  padding: 6px 8px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 160px;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.3) transparent;
}

.clt-dw-tools-list::-webkit-scrollbar {
  width: 4px;
}

.clt-dw-tools-list::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.35);
  border-radius: 4px;
}

.clt-dw-tools-list::-webkit-scrollbar-track {
  background: transparent;
}

/* Category section header inside tool list */
.clt-dw-cat-label {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 6px 6px 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.clt-dw-cat-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

/* ── Individual Tool Row (Compact, Sleek, One-by-One Cascading) ── */
.clt-dw-tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  user-select: none;
  animation: cltDwCascadeIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--dw-i, 0) * 0.016s);
}

@keyframes cltDwCascadeIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.clt-dw-tool-row:hover {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.16), rgba(99, 102, 241, 0.08));
  border-color: rgba(168, 85, 247, 0.45);
  transform: translateX(3px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.clt-dw-tool-row.active {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.25), rgba(99, 102, 241, 0.18));
  border-color: #c084fc;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.3);
}

.clt-dw-tool-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c084fc;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.clt-dw-tool-icon-box svg {
  width: 15px;
  height: 15px;
}

.clt-dw-tool-row:hover .clt-dw-tool-icon-box {
  background: rgba(168, 85, 247, 0.28);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

.clt-dw-tool-meta {
  flex: 1;
  padding: 0 8px;
  min-width: 0;
}

.clt-dw-tool-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.clt-dw-tool-row:hover .clt-dw-tool-name {
  color: #fff;
}

.clt-dw-tool-end {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.clt-dw-pts-badge {
  font-size: 9.5px;
  font-weight: 600;
  color: #a78bfa;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 1px 5px;
  border-radius: 6px;
  letter-spacing: -0.2px;
}

.clt-dw-add-btn {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: all 0.15s ease;
}

.clt-dw-tool-row:hover .clt-dw-add-btn {
  background: #a855f7;
  border-color: #c084fc;
  color: #fff;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
  transform: scale(1.08);
}

/* ── Active Drawings Tab Rows ── */
.clt-dw-active-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  gap: 6px;
}

.clt-dw-active-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.clt-dw-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.clt-dw-active-name {
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clt-dw-active-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.clt-dw-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
}

.clt-dw-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.clt-dw-action-btn.del-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fff;
}

/* ── Empty State ── */
.clt-dw-empty {
  text-align: center;
  padding: 24px 12px;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.clt-dw-empty-icon {
  font-size: 22px;
  opacity: 0.6;
}

.clt-dw-empty-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
}

.clt-dw-empty-desc {
  font-size: 10px;
  color: #64748b;
}

/* ── Flyout Footer ── */
.clt-dw-footer {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

.clt-dw-footer-hint {
  font-size: 9.5px;
  color: #64748b;
}

.clt-dw-clear-btn {
  height: 22px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.clt-dw-clear-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fff;
}

/* ── Left Toolbar Badge for Active Drawings Count ── */
.clt-val-badge.clt-dw-count {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

/* Responsive for Mobile & Tablet */
@media (max-width: 768px) {
  .clt-drawings-flyout {
    display: none !important;
  }

  .drawings-panel {
    width: 96%;
    max-height: 88vh;
  }
  
  .dw-tools-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  
  .drawing-tool-item {
    padding: 10px 6px;
  }
  
  .dw-tool-name {
    font-size: 11px;
  }
  
  .dw-tool-desc {
    display: none !important;
  }

  .drawing-properties-bar {
    top: 50px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 95%;
    flex-wrap: wrap;
    justify-content: center;
  }
}
