/**
 * Range Card - Calibration Bridge Styles
 *
 * Modal styles for calibration preview, result, and hardpoint extraction.
 */

/* ===========================================
   Calibration Preview Overlay
   =========================================== */
.calibration-preview-overlay,
.calibration-result-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.calibration-preview-modal,
.calibration-result-modal {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.calibration-preview-modal h3,
.calibration-result-modal h3 {
  margin: 0 0 16px 0;
  color: #fff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calibration-preview-modal p,
.calibration-result-modal p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 16px 0;
  font-size: 0.875rem;
}

/* ===========================================
   Hardpoint Preview Table
   =========================================== */
.cal-preview-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.8125rem;
}

.cal-preview-table th {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 6px;
  text-align: left;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.cal-preview-table td {
  padding: 8px 6px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cal-preview-table tr:hover td {
  background: rgba(255, 255, 255, 0.05);
}

.cal-preview-table .offset-low {
  color: #ff6b6b;
}

.cal-preview-table .offset-high {
  color: #51cf66;
}

.cal-preview-note {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

/* ===========================================
   Calibration Result Grid
   =========================================== */
.cal-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.cal-result-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cal-result-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-result-value {
  font-size: 1.125rem;
  color: #fff;
  font-weight: 600;
}

.cal-result-value.cal-result-new {
  color: #51cf66;
}

.cal-result-delta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.cal-result-note {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

/* ===========================================
   Modal Buttons
   =========================================== */
.cal-preview-buttons,
.cal-result-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.cal-preview-cancel,
.cal-result-close {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
}

.cal-preview-cancel:hover,
.cal-result-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cal-preview-submit,
.cal-result-apply {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.cal-preview-submit:hover,
.cal-result-apply:hover {
  opacity: 0.9;
}

.cal-preview-submit:active,
.cal-result-apply:active {
  transform: scale(0.98);
}

.cal-preview-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===========================================
   Calibration Mode Toggle Button
   =========================================== */
.rc-calibration-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.rc-calibration-toggle:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.8);
}

.rc-calibration-toggle.active {
  background: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
  color: #667eea;
}

.rc-calibration-toggle .cal-icon {
  font-size: 1rem;
}

/* ===========================================
   Use for Calibration Menu Item
   =========================================== */
.kebab-dropdown .cal-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kebab-dropdown .cal-menu-item::before {
  content: '🎯';
}

.kebab-dropdown .cal-menu-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}
