/* ==========================================================================
   Smart Mini-Tools (Dutch Pay, Discount, Unit Converter)
   ========================================================================== */

.tools-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Tool Sub-Navigation */
.subtool-nav {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
}

.subtool-btn {
  flex: 1;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.subtool-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.subtool-btn.active {
  background: var(--btn-num-bg);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Tool Panels */
.tool-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.2s ease-out forwards;
}

.tool-panel.active {
  display: flex;
}

/* Card Section */
.tool-card {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--panel-shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tool-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-title svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-accent);
}

/* Input Fields */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.tool-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.tool-input:focus {
  border-color: var(--text-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-unit {
  position: absolute;
  right: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}

/* Quick Pills (e.g. +10,000, 10%, 20%) */
.quick-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-btn {
  background: var(--card-bg);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-accent);
  background: rgba(99, 102, 241, 0.15);
}

.pill-btn.active {
  background: var(--btn-op-bg);
  border-color: var(--btn-op-border);
  color: var(--text-accent);
}

/* Stepper (People count) */
.stepper-control {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stepper-btn {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.stepper-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.stepper-val {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Tool Result Box */
.tool-result-box {
  background: var(--card-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.tool-result-box::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #6366f1, #d946ef);
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.result-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.result-val.highlight {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-accent);
}

.copy-result-btn {
  margin-top: 4px;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.copy-result-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-accent);
}

/* Select element styling for unit converter */
.tool-select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

.tool-select option {
  background: #1e293b;
  color: #fff;
}
