/* Tip calculator - layout + suwak (WebKit / Firefox) */

.tip-tool .tool-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-8);
  align-items: start;
}

.tool-ui-container {
  margin-bottom: var(--space-8);
  max-width: min(44rem, 100%);
}

.tip-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* Dwie kolumny: rachunek / osoby / podatek / waluta | napiwek + baza */
.tip-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6) var(--space-8);
  align-items: start;
}

.tip-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.tip-field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.tip-field input[type='text'],
.tip-field input[type='number'] {
  width: 100%;
  padding: 0 1rem;
  height: 48px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  box-sizing: border-box;
}

.tip-field input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
}

/* Suwak: pełny wygląd w assets/css/global.css (input[type=range]) */
.tip-range-wrap {
  margin-top: var(--space-3);
  padding: var(--space-2) 0 var(--space-1);
}

.tip-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-2);
}

.tip-presets button {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.tip-presets button:hover {
  border-color: var(--color-primary);
  background: color-mix(in oklch, var(--color-primary) 8%, var(--color-surface));
}

.tip-radio-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tip-radio-row label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
}

.tip-radio-row input[type='radio'] {
  accent-color: var(--color-primary);
}

.tip-help {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.tip-help--block {
  display: block;
  margin-bottom: var(--space-2);
}

.tip-field--radios .tip-help--block {
  margin-bottom: var(--space-3);
}

.tip-warn {
  margin: 0;
  font-size: 0.85rem;
  color: oklch(0.55 0.2 25);
  font-weight: 600;
}

.tip-results {
  margin-top: var(--space-2);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  display: grid;
  gap: var(--space-4);
}

.tip-result-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.tip-result-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tip-result-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.tip-result-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.tip-result-row.tip-result-total .tip-result-value {
  font-size: 1.75rem;
  color: var(--color-primary);
}

.tip-tool .tip-field .custom-select .cs-selected {
  height: 48px;
  border-radius: var(--radius-xl);
  font-weight: 600;
}

.tip-tool .tip-field .cs-option {
  font-weight: 600;
}

@media (max-width: 720px) {
  .tip-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
  .tip-tool .tool-layout {
    grid-template-columns: 1fr;
  }

  .tip-tool .ad-sidebar {
    display: none;
  }
}
