/* ─── GammaVision Chart Drawings Module ─────────────────────────────────────── */

/* ── Top Bar Widget Container ── */
.desk-draw-tools-widget {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* ── Top Bar Button: Identical to other .desk-tab buttons ── */
#desk-tab-draw-tools {
  /* Inherits standard styling from .desk-tab */
}

/* ── Horizontal Black Toolbar Dropdown (Directly Under STRUMENTI) ── */
.gv-drawing-toolbar {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.95) !important;
  padding: 3px 6px;
  z-index: 10050 !important;
  user-select: none;
  box-sizing: border-box;
  white-space: nowrap;
  animation: gvDropIn 0.12s ease;
}

.gv-drawing-toolbar.gv-hidden {
  display: none !important;
}

@keyframes gvDropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tool Buttons (Pure White Icons on Black) */
.gv-draw-btn {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: background 0.12s ease;
}

.gv-draw-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.gv-draw-btn.active {
  background: #2a2e39 !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.gv-draw-btn svg {
  width: 17px;
  height: 17px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* Tooltip on Hover (Below Button) */
.gv-draw-btn[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #111318;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 10060;
}

/* Vertical Separator */
.gv-draw-sep-vert {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 3px;
}

/* Danger / Delete All Button */
.gv-draw-btn-danger:hover {
  background: rgba(255, 82, 82, 0.25) !important;
  color: #ff5252 !important;
}
.gv-draw-btn-danger:hover svg {
  stroke: #ff5252;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROPERTIES MODAL (Minimal Black & White Apple Style - Matching the Site)
   ═══════════════════════════════════════════════════════════════════════════ */

.gv-draw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gvModalFade 0.12s ease;
}

@keyframes gvModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gv-draw-modal {
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-top: 1.5px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 10px !important;
  width: 380px;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif !important;
  overflow: visible;
}

.gv-draw-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #08090b;
  border-radius: 10px 10px 0 0;
}

.gv-draw-modal-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.gv-draw-modal-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.12s ease;
}
.gv-draw-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.gv-draw-modal-body {
  padding: 14px 18px;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gv-draw-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.gv-draw-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.gv-draw-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Color Input Swatch */
.gv-draw-color-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s ease;
}
.gv-draw-color-input:hover {
  border-color: #ffffff;
}
.gv-draw-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.gv-draw-color-input::-webkit-color-swatch { border: none; border-radius: 4px; }

/* ── Custom Apple-Style Dropdown Select (Exact match to uploaded Image 2) ── */
.gv-custom-select-wrap {
  position: relative;
  display: inline-block;
}

.gv-custom-select-trigger {
  background: #18191d !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 5px 10px !important;
  min-width: 95px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s ease;
}

.gv-custom-select-trigger:hover {
  background: #222328 !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.gv-select-arrow {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

.gv-custom-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #1c1d22 !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 8px !important;
  padding: 4px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.95) !important;
  z-index: 100200 !important;
  min-width: 105px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: gvDropIn 0.1s ease;
}

.gv-custom-select-menu.gv-hidden {
  display: none !important;
}

.gv-select-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #e5e7eb;
  cursor: pointer;
  user-select: none;
  transition: all 0.1s ease;
}

.gv-select-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.gv-select-item.selected {
  background: #3875f6 !important; /* Exact match to user Image 2 macOS blue pill */
  color: #ffffff !important;
  font-weight: 600 !important;
}

.gv-select-check {
  display: inline-block;
  width: 12px;
  font-size: 11px;
  color: #ffffff;
  font-weight: 800;
  text-align: center;
}

/* Text Input */
.gv-draw-text-input {
  background: #18191d;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  outline: none;
}
.gv-draw-text-input:focus {
  border-color: #ffffff;
}

/* Slider Wrap (White / Gray minimal, NO blue) */
.gv-draw-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 160px;
}
.gv-draw-slider {
  flex: 1;
  accent-color: #ffffff !important;
  cursor: pointer;
}
.gv-draw-slider-val {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  min-width: 34px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Fibonacci Levels Table */
.gv-fib-levels-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
  font-size: 11px;
}
.gv-fib-levels-table th {
  text-align: left;
  padding: 4px 6px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.gv-fib-levels-table td {
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.gv-fib-levels-table input[type="checkbox"] {
  accent-color: #ffffff;
  cursor: pointer;
}

/* Modal Footer Buttons (Minimal White & Black, NO BLUE) */
.gv-draw-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #08090b;
  border-radius: 0 0 10px 10px;
}

/* White Apple CTA Button */
.gv-draw-btn-primary {
  background: #ffffff !important;
  color: #000000 !important;
  border: none !important;
  padding: 6px 16px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  letter-spacing: 0.02em;
}
.gv-draw-btn-primary:hover {
  background: rgba(255, 255, 255, 0.88) !important;
  transform: translateY(-0.5px);
}
.gv-draw-btn-primary:active {
  transform: translateY(0);
}

/* Dark Neutral Button */
.gv-draw-btn-secondary {
  background: #18191d !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
.gv-draw-btn-secondary:hover {
  background: #24252a !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Subtle Danger Button */
.gv-draw-btn-modal-danger {
  background: rgba(255, 82, 82, 0.12) !important;
  color: #ff5252 !important;
  border: 1px solid rgba(255, 82, 82, 0.28) !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
.gv-draw-btn-modal-danger:hover {
  background: #ff5252 !important;
  color: #ffffff !important;
}
