/* --- Conduit Bending Suite Styles --- */

.conduit-body {
  background-color: #f8fafc !important; /* Off-white canvas */
  color: #0f172a !important;
}

/* Header link styles */
.app-header {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.app-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  text-decoration: none;
}

.app-logo span {
  color: #0d9488; /* Electric Teal */
}

/* 390px Mobile-Locked Primary Container */
.calc-container {
  max-width: 390px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 1.25rem !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03) !important;
}

/* Tab controls */
.tab-nav {
  display: flex;
  background-color: #f1f5f9;
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
  width: 100%;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 6px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  white-space: nowrap;
}

.tab-btn.active {
  background-color: #0d9488 !important; /* Electric Teal */
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tab-btn:hover:not(.active) {
  background-color: #e2e8f0;
  color: #0f172a;
}

/* Tab content panes */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Input Fields & Form Layout */
.input-group {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.35rem;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background-color: #f8fafc;
  font-size: 0.95rem;
  color: #0f172a;
  transition: all 0.15s ease;
  font-family: inherit;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
  background-color: #ffffff;
}

/* Results Card styling */
.results-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
}

.results-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.35rem;
}

/* Results Stats Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.35rem;
  width: 100%;
}

.result-stat {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.4rem;
  text-align: center;
  min-width: 0 !important; /* Prevents overflow */
}

.stat-label {
  display: block;
  font-size: 0.625rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Active Instruction Callout */
.instruction-text {
  font-size: 0.8rem;
  color: #334155;
  background-color: rgba(13, 148, 136, 0.04);
  border-left: 3px solid #0d9488;
  padding: 0.6rem 0.75rem;
  border-radius: 0 6px 6px 0;
  line-height: 1.4;
}

/* Mark listings */
.mark-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mark-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

.mark-name {
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mark-badge {
  background-color: #0d9488;
  color: #ffffff;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
}

.mark-values-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.mark-decimal {
  font-size: 0.75rem;
  color: #64748b;
  margin-right: 0.5rem;
  font-family: monospace;
}

.mark-value {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0d9488;
}

/* Dynamic tape visual component */
.tape-container {
  margin-top: 1rem;
  border-top: 1px dashed #e2e8f0;
  padding-top: 0.75rem;
}

.tape-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.zoom-toggle-btn {
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  color: #475569;
  transition: all 0.1s ease;
}

.zoom-toggle-btn:hover {
  border-color: #0d9488;
  color: #0d9488;
  background-color: rgba(13, 148, 136, 0.02);
}

.canvas-wrapper {
  background-color: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
  height: 120px;
}

#tapeCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Interactive elements tactile snap animations */
.tab-btn,
.zoom-toggle-btn,
input,
select {
  transition: background-color 0.1s ease, box-shadow 0.1s ease, transform 0.05s ease;
}

.tab-btn:active,
.zoom-toggle-btn:active {
  transform: scale(0.97);
  transition: none !important;
}
