/* vband-tx-trainer.css (extracted from inline <style> blocks, order preserved) */

/* --- <style> block 1 --- */
/* Global menu styles */
    .morse-logo {
      font-family: 'Courier New', monospace;
      font-size: 16px;
      letter-spacing: 2px;
      color: #60a5fa;
      padding: 8px 12px;
      background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
      border-radius: 8px;
      border: 1px solid #4b5563;
      display: inline-block;
    }
    
    .professional-header {
      background: linear-gradient(135deg, #1f2937, #111827);
      border-bottom: 2px solid #374151;
    }
    
    .nav-link {
      position: relative;
      transition: all 0.3s ease;
    }
    
    .nav-link:hover::after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, #60a5fa, #3b82f6);
      border-radius: 1px;
    }
    
    /* VBand-specific styles - integrated with Tailwind */
    .vband-container {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }
    .vband-panel {
      background: linear-gradient(135deg, #1f2937, #374151);
      border: 1px solid #4b5563;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
      transition: transform 0.2s ease;
    }
    .vband-panel:hover {
      transform: translateY(-1px);
    }
    .row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 15px;
    }
    .key-indicator {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background-color: #4b5563;
      border: 2px solid #6b7280;
      display: inline-block;
      transition: all 0.1s ease;
    }
    .key-active {
      background-color: #ef4444;
      border-color: #f87171;
      box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
    }
    .output-text {
      font-family: monospace;
      white-space: pre-wrap;
      margin-top: 20px;
      padding: 15px;
      border: 1px solid #4b5563;
      border-radius: 8px;
      min-height: 120px;
      max-height: 300px;
      overflow-y: auto;
      background-color: rgba(31, 41, 55, 0.8);
      color: #f3f4f6;
      font-size: 16px;
      line-height: 1.5;
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    .status {
      font-weight: bold;
      margin-bottom: 10px;
      color: #2c3e50;
    }
    .button {
      padding: 10px 15px;
      background-color: #4CAF50;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      transition: background-color 0.2s;
    }
    .button:hover {
      background-color: #45a049;
    }
    .button:disabled {
      background-color: #cccccc;
      cursor: not-allowed;
    }
    .button-red {
      background-color: #f44336;
    }
    .button-red:hover {
      background-color: #d32f2f;
    }
    .button-blue {
      background-color: #2196F3;
    }
    .button-blue:hover {
      background-color: #0b7dda;
    }
    h1, h2, h3 {
      color: #2c3e50;
    }
    label {
      min-width: 150px;
      display: inline-block;
      font-weight: 500;
    }
    select, input[type="range"], input[type="number"] {
      min-width: 200px;
      padding: 5px;
      border-radius: 4px;
      border: 1px solid #ddd;
    }
    select {
      height: 35px;
    }
    .touch-paddle-container {
      display: flex;
      gap: 20px;
      margin-top: 20px;
    }
    .touch-paddle {
      flex: 1;
      height: 120px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #374151, #4b5563);
      border: 2px solid #6b7280;
      border-radius: 8px;
      cursor: pointer;
      user-select: none;
      font-size: 18px;
      font-weight: bold;
      color: #f3f4f6;
      transition: all 0.2s ease;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    .touch-paddle.active {
      background: linear-gradient(135deg, #ef4444, #dc2626);
      border-color: #f87171;
      transform: scale(0.98);
      box-shadow: inset 0 0 10px rgba(0,0,0,0.3), 0 0 15px rgba(239, 68, 68, 0.4);
    }
    .touch-paddle:hover {
      background: linear-gradient(135deg, #4b5563, #6b7280);
      border-color: #9ca3af;
    }
    .clear-button {
      margin-top: 10px;
      padding: 5px 10px;
      background-color: #f8f9fa;
      color: #333;
      border: 1px solid #ddd;
      border-radius: 4px;
      cursor: pointer;
    }
    .clear-button:hover {
      background-color: #e9ecef;
    }
    .info-panel {
      background-color: #e3f2fd;
      border-left: 4px solid #2196F3;
      padding: 15px;
      margin-bottom: 20px;
      border-radius: 0 5px 5px 0;
    }
    .warning {
      background-color: #fff3cd;
      border-left: 4px solid #ffc107;
      padding: 15px;
      margin: 15px 0;
      border-radius: 0 5px 5px 0;
    }

    .waveform-selector {
      display: flex;
      gap: 10px;
      margin-top: 10px;
    }
    .waveform-option {
      padding: 5px 10px;
      border: 1px solid #ddd;
      border-radius: 4px;
      cursor: pointer;
    }
    .waveform-option.selected {
      background-color: #e3f2fd;
      border-color: #2196F3;
    }
    .settings-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 15px;
    }
    .checkbox-row {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .checkbox-row input[type="checkbox"] {
      width: 18px;
      height: 18px;
    }
    .log-panel {
      font-family: monospace;
      background-color: #000;
      color: #0f0;
      padding: 10px;
      border-radius: 5px;
      height: 100px;
      overflow-y: auto;
      margin-top: 15px;
    }
    .current-element {
      font-size: 24px;
      font-weight: bold;
      margin-top: 10px;
      color: #60a5fa;
      text-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
      min-height: 32px;
    }
    
    /* Keyer indicator labels styling */
    .vband-panel .row span {
      color: #e5e7eb;
      font-weight: 600;
      font-size: 16px;
      min-width: 40px;
      display: inline-block;
    }
    
    /* Stats display styling */
    #stats-display {
      background: rgba(31, 41, 55, 0.9) !important;
      border: 1px solid #4b5563 !important;
      color: #f3f4f6 !important;
    }
    
    #stats-display h3 {
      color: #60a5fa !important;
      margin-bottom: 10px;
      font-weight: 600;
    }
    
    #stats-display .row div {
      color: #e5e7eb !important;
      font-weight: 500;
    }
    
    #stats-display span {
      color: #34d399 !important;
      font-weight: 600;
    }
    .timing-display {
      display: flex;
      gap: 20px;
      margin-top: 15px;
      font-family: monospace;
    }
    .timing-item {
      background: rgba(59, 130, 246, 0.2);
      color: #dbeafe;
      padding: 8px 12px;
      border-radius: 6px;
      border: 1px solid rgba(59, 130, 246, 0.3);
    }
    
    /* Override button styles for dark theme */
    .button {
      padding: 10px 20px;
      border-radius: 6px;
      font-weight: 600;
      transition: all 0.2s ease;
      border: none;
      cursor: pointer;
    }
    .button-blue {
      background: linear-gradient(135deg, #3b82f6, #1d4ed8);
      color: white;
      box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    }
    .button-blue:hover {
      background: linear-gradient(135deg, #1d4ed8, #1e40af);
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
    }
    .button:disabled {
      background: #4b5563;
      color: #9ca3af;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }
    
    /* Dark theme inputs */
    input[type="range"], input[type="text"], select {
      background: rgba(31, 41, 55, 0.8) !important;
      border: 1px solid #4b5563 !important;
      color: white !important;
      border-radius: 4px;
      font-family: inherit !important;
      font-size: 14px !important;
    }
    input[type="range"]:focus, input[type="text"]:focus, select:focus {
      border-color: #3b82f6 !important;
      box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
      outline: none;
    }
    
    /* Fix for dropdown options */
    select option {
      background: #374151 !important;
      color: white !important;
      padding: 8px !important;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
      font-size: 14px !important;
    }
    
    /* Additional dropdown styling */
    select {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
      -webkit-appearance: none !important;
      -moz-appearance: none !important;
      appearance: none !important;
    }
    
    /* Ensure text is properly displayed */
    select, select * {
      text-rendering: optimizeLegibility !important;
      -webkit-font-smoothing: antialiased !important;
    }
    
    /* Dark theme labels */
    label {
      color: #d1d5db;
      font-weight: 500;
    }
    
    /* Status text styling */
    .status {
      color: #10b981;
      font-weight: 600;
    }
    
    /* Warning boxes */
    .warning {
      background: rgba(245, 158, 11, 0.1);
      border-left: 4px solid #f59e0b;
      padding: 12px 16px;
      margin: 15px 0;
      border-radius: 0 6px 6px 0;
      color: #fef3c7;
    }
    
    /* Clear button styling */
    .clear-button {
      background: linear-gradient(135deg, #6b7280, #4b5563);
      color: white;
      border: 1px solid #374151;
      padding: 8px 16px;
      border-radius: 6px;
      cursor: pointer;
      font-weight: 500;
      transition: all 0.2s ease;
    }
    .clear-button:hover {
      background: linear-gradient(135deg, #4b5563, #374151);
      transform: translateY(-1px);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

/* --- <style> block 2 --- */
/* --- UI Fixes: Word Length dropdown + Connection panel --- */
.fixed-select { 
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-color: var(--panel-bg, #1f2937);
  color: var(--text, #e5e7eb);
  border: 1px solid var(--border, #374151);
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.2;
}
.fixed-select:focus { outline: none; box-shadow: 0 0 0 2px rgba(59,130,246,.5); }
.word-length-wrapper { overflow: visible !important; }

.card-connection {
  margin-top: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--border, #374151);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 12px rgba(0,0,0,.20);
}
.card-connection h3 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.card-row { display: flex; gap: 12px; flex-wrap: wrap; }
.card-row .button { flex: 1 1 220px; }

/* --- <style> block 3 --- */
/* UI refinement: hide any HID status label and ensure the two-button layout shows */
#hid-status{ display:none !important; }
.card-connection .card-row{ display:flex; gap:12px; flex-wrap:wrap; }
.card-connection .card-row .button{ flex:1 1 260px; min-width:200px; }

/* --- <style> block 4 --- */
/* --- Connection Strip (two buttons, no card box) --- */
#connection-strip{display:flex;gap:12px;margin:12px 0 0 0;}
#connection-strip .button{flex:1 1 50%;min-width:200px;}
/* Hide any old HID status labels wherever they are */
#hid-status{display:none!important;}

/* --- <style> block 5 --- */
/* Training Session: two-button row (50%/50%) */
#training-connect-row{display:flex;gap:12px;margin-bottom:12px;}
#training-connect-row .button{flex:1 1 50%;min-width:230px;}

/* --- <style> block 6 --- */
/* --- State styles for connect/audio buttons --- */
.button-danger, .connected-btn {
  background: linear-gradient(180deg, #ef4444, #b91c1c) !important;
  border-color: #7f1d1d !important;
  color: #fff !important;
}
.button-danger:disabled, .connected-btn:disabled {
  opacity: 0.95;
}
.button-teal, .audio-on {
  background: linear-gradient(180deg, #14b8a6, #0f766e) !important;
  border-color: #115e59 !important;
  color: #0b1220 !important;
  font-weight: 600;
}

/* --- <style> block 7 --- */
/* Live Stats overlay inside the Statistics card */
#live-stats{display:flex;flex-wrap:wrap;gap:16px;margin-top:8px;font-size:.95rem;}
#live-stats .item{min-width:110px;color:#a7f3d0;}
#hid-only-wrap{display:flex;align-items:center;gap:8px;justify-content:flex-end;margin:-4px 0 8px 0;}
#hid-only-toggle{transform:scale(1.05);}

