/* ============================================================
   TIP CALCULATOR — Extra CSS
   ============================================================ */

/* ===== CALCULATOR ===== */
.tip-calculator {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}

.tip-mode-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tip-mode-title i {
  color: var(--coral);
}

.tip-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tip-currency {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* ===== PRESETS ===== */
.tip-preset-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tip-preset-btn {
  padding: 6px 16px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
}

.tip-preset-btn:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.tip-preset-btn.active {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

/* ===== CUSTOM TIP ===== */
.tip-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tip-custom-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tip-custom-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.tip-custom-or {
  font-size: .78rem;
  color: var(--ink-faint);
  font-weight: 600;
}

/* ===== PEOPLE ===== */
.tip-people-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tip-people-btn {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tip-people-btn:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.tip-people-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.tip-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}

.tip-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--coral);
  cursor: pointer;
}

/* ===== RESULTS ===== */
.tip-results {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 14px;
  min-height: 320px;
  padding: 16px 18px;
}

.tip-results-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 280px;
  color: var(--ink-faint);
}

.tip-results-icon {
  font-size: 2.8rem;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.tip-results-text {
  font-size: .88rem;
  max-width: 280px;
  text-align: center;
}

.tip-results-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== MAIN GRID ===== */
.tip-main-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tip-main-item {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}

.tip-main-label {
  display: block;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-faint);
}

.tip-main-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--coral);
}

/* ===== PER PERSON ===== */
.tip-per-person {
  text-align: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.tip-per-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-faint);
}

.tip-per-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--coral);
}

.tip-per-sub {
  font-size: .72rem;
  color: var(--ink-soft);
}

/* ===== DISTRIBUTION ===== */
.tip-distribution {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}

.tip-distribution-bar {
  height: 12px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}

.tip-distribution-fill {
  height: 100%;
  background: linear-gradient(to right, var(--coral), var(--mint));
  border-radius: 999px;
  transition: width .3s ease;
}

.tip-distribution-labels {
  display: flex;
  justify-content: space-between;
  font-size: .6rem;
  font-weight: 600;
  color: var(--ink-faint);
  margin-top: 2px;
}

/* ===== SPLIT TABLE ===== */
.tip-split-table {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  max-height: 140px;
  overflow-y: auto;
}

.tip-split-title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.tip-split-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  font-size: .6rem;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  padding: 2px 0;
  border-bottom: 1px solid var(--border);
}

.tip-split-body {
  display: flex;
  flex-direction: column;
}

.tip-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  font-size: .72rem;
  padding: 2px 0;
  border-bottom: 1px solid var(--border);
}

.tip-split-row:last-child {
  border-bottom: none;
}

.tip-split-row .tip-split-person {
  font-weight: 600;
  color: var(--ink);
}

.tip-split-row .tip-split-amount {
  font-family: var(--font-mono);
  color: var(--ink-soft);
}

/* ===== TIP GUIDE ===== */
.tip-guide-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
  transition: border-color .2s;
  height: 100%;
}

.tip-guide-card:hover {
  border-color: var(--coral);
}

.tip-guide-pct {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--coral);
}

.tip-guide-desc {
  display: block;
  font-size: .72rem;
  color: var(--ink-soft);
}

.tip-guide-amount {
  display: block;
  font-family: var(--font-mono);
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
}

/* ===== BLOCK LABEL ===== */
.block-label {
  font-weight: 700;
  font-size: .82rem;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 6px;
}

.block-label i {
  color: var(--coral);
}

/* ===== FIELD HINT ===== */
.field-hint {
  font-size: .7rem;
  color: var(--ink-faint);
  margin-top: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .tip-results {
    min-height: 250px;
    padding: 12px 14px;
  }

  .tip-results-placeholder {
    height: 200px;
  }

  .tip-main-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tip-main-value {
    font-size: .95rem;
  }

  .tip-per-value {
    font-size: 1.2rem;
  }

  .tip-preset-btn {
    font-size: .7rem;
    padding: 4px 12px;
  }

  .tip-calculator {
    padding: 12px 14px;
  }
}

@media (max-width: 575px) {
  .tip-results {
    min-height: 200px;
    padding: 10px 12px;
  }

  .tip-results-placeholder {
    height: 160px;
  }

  .tip-results-icon {
    font-size: 2rem;
  }

  .tip-results-text {
    font-size: .78rem;
  }

  .tip-main-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tip-main-value {
    font-size: .82rem;
  }

  .tip-per-value {
    font-size: 1rem;
  }

  .tip-preset-btn {
    font-size: .65rem;
    padding: 3px 8px;
  }

  .tip-split-header,
  .tip-split-row {
    font-size: .6rem;
  }

  .tip-guide-pct {
    font-size: 1.1rem;
  }

  .tip-mode-title {
    font-size: .85rem;
  }
}