/**
 * @file tool-modal.css
 * @description Shared styles for tool modals (DOPE, Glass Penetration, etc.)
 * @created PRD-62 T3-A debt cleanup
 * @date 2026-02-27
 */

/* =============================================================================
   TOOL MODAL BASE
   ============================================================================= */

.tool-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 620px;
  max-height: 85vh;
  background: var(--dark-bg-1-solid, rgba(15, 25, 35, 0.98));
  border: 1px solid var(--cyan-30, rgba(0, 200, 255, 0.3));
  border-radius: 12px;
  z-index: 10002;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.tool-modal--visible {
  display: flex;
}

/* =============================================================================
   TOOL MODAL BACKDROP
   ============================================================================= */

.tool-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10001;
  display: none;
}

.tool-modal-backdrop--visible {
  display: block;
}

/* =============================================================================
   TOOL MODAL HEADER (Draggable)
   ============================================================================= */

.tool-modal__header {
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.tool-modal__header--dragging {
  cursor: grabbing;
}

/* =============================================================================
   TOOL MODAL TABS
   ============================================================================= */

.tool-modal__tab {
  background: transparent;
  border-color: var(--border-subtle, rgba(255,255,255,0.1));
  color: var(--text-secondary, #aaa);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.tool-modal__tab--active {
  background: var(--cyan-20, rgba(0, 200, 255, 0.2));
  border-color: var(--cyan-40, rgba(0, 200, 255, 0.4));
  color: var(--text-primary, #fff);
}

/* =============================================================================
   TOOL MODAL CONTENT
   ============================================================================= */

.tool-modal__content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.tool-modal__tab-content {
  display: none;
}

.tool-modal__tab-content--active {
  display: block;
}

/* =============================================================================
   TOOL MODAL ACTIONS
   ============================================================================= */

.tool-modal__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
}

.tool-modal__close {
  background: none;
  border: none;
  color: var(--text-secondary, #aaa);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.tool-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary, #fff);
}

/* =============================================================================
   INTERACTIVE ROWS (e.g., proof variable rows)
   ============================================================================= */

.tool-modal__clickable-row {
  cursor: pointer;
  transition: background 0.15s;
}

.tool-modal__clickable-row:hover {
  background: rgba(0, 200, 255, 0.1);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
  .tool-modal {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    top: 0;
    left: 0;
    transform: none;
  }
}
