/**
 * Compact Tesseract Modal Styles
 * 2-column layout with progressive disclosure
 */

/* Compact modal wrapper */
.ballistics-modal--compact .ballistics-modal-content {
  max-width: 820px;
  width: 95vw;
}

/* Header adjustments */
.ballistics-modal--compact .ballistics-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-dark, #0a1628);
  border-bottom: 1px solid var(--border-color, #1e3a5f);
}

.ballistics-modal--compact .ballistics-modal-header h2 {
  margin: 0;
  font-size: 1.1em;
  letter-spacing: 0.15em;
  color: var(--accent-cyan, #00d4ff);
}

.ballistics-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 2-column body grid */
.ballistics-compact-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px;
  background: var(--bg-panel, #0d1d32);
}

.ballistics-compact-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Section cards */
.ballistics-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color, #1e3a5f);
  border-radius: 6px;
  padding: 12px;
}

.ballistics-section h3 {
  margin: 0 0 10px 0;
  font-size: 0.75em;
  font-weight: 600;
  color: var(--accent-cyan, #00d4ff);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Input rows */
.ballistics-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ballistics-input-row:last-child {
  margin-bottom: 0;
}

.ballistics-input-row label {
  flex: 0 0 60px;
  font-size: 0.8em;
  color: var(--text-muted, #8899aa);
  text-align: right;
}

.ballistics-input-row input,
.ballistics-input-row select {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  font-size: 0.85em;
  background: var(--bg-input, #0a1628);
  border: 1px solid var(--border-color, #1e3a5f);
  border-radius: 4px;
  color: var(--text-primary, #e0e8f0);
}

.ballistics-input-row input:focus,
.ballistics-input-row select:focus {
  outline: none;
  border-color: var(--accent-cyan, #00d4ff);
}

/* Multi-column rows */
.ballistics-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ballistics-row-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.ballistics-row-2col .ballistics-input-row,
.ballistics-row-3col .ballistics-input-row {
  margin-bottom: 0;
}

.ballistics-row-2col .ballistics-input-row label,
.ballistics-row-3col .ballistics-input-row label {
  flex: 0 0 45px;
  font-size: 0.75em;
}

/* Bullet info display */
.ballistics-bullet-info {
  background: rgba(0, 212, 255, 0.05);
  border-left: 2px solid var(--accent-cyan, #00d4ff);
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 0.8em;
  color: var(--text-secondary, #a0b0c0);
}

/* Collapsible subsections */
.ballistics-subsection {
  margin-top: 8px;
  border: 1px solid var(--border-color, #1e3a5f);
  border-radius: 4px;
}

.ballistics-subsection summary {
  padding: 6px 10px;
  font-size: 0.75em;
  color: var(--text-muted, #8899aa);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
}

.ballistics-subsection summary:hover {
  color: var(--accent-cyan, #00d4ff);
}

.ballistics-subsection-content {
  padding: 10px;
}

/* Action grid */
.ballistics-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ballistics-action-grid .btn {
  padding: 8px 12px;
  font-size: 0.8em;
}

/* Results section */
.ballistics-results-section,
.ballistics-profiles-section {
  border-top: 1px solid var(--border-color, #1e3a5f);
}

.ballistics-table-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 0.85em;
  color: var(--accent-cyan, #00d4ff);
  cursor: pointer;
  background: rgba(0, 212, 255, 0.03);
}

.ballistics-table-bar:hover {
  background: rgba(0, 212, 255, 0.06);
}

.ballistics-table-bar .badge {
  background: var(--accent-cyan, #00d4ff);
  color: var(--bg-dark, #0a1628);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75em;
  font-weight: 600;
}

/* Results table */
.ballistics-results-table {
  max-height: 300px;
  overflow-y: auto;
  padding: 0 16px 16px;
}

/* Saved profiles grid */
.saved-profiles-grid {
  padding: 12px 16px;
  max-height: 250px;
  overflow-y: auto;
}

.profile-empty-msg {
  color: var(--text-muted, #8899aa);
  font-size: 0.85em;
  text-align: center;
  padding: 20px;
}

/* Primary action button */
.ballistics-primary-btn {
  background: var(--accent-cyan, #00d4ff);
  color: var(--bg-dark, #0a1628);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.ballistics-primary-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.ballistics-primary-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 700px) {
  .ballistics-compact-body {
    grid-template-columns: 1fr;
  }

  .ballistics-modal--compact .ballistics-modal-content {
    width: 100vw;
    max-width: none;
    height: 100vh;
    border-radius: 0;
  }
}
