/* ==========================================================
   TIP CALCULATOR
   Extracted from calculator-tools.css (lines 1958-2199)
   ========================================================== */
/* ----------------------------------------------------------
   TIP CALCULATOR — Tool-specific styles
   ---------------------------------------------------------- */

/* ===== TIP PRESET BUTTONS ===== */
.ct-tip-presets {
  display  : flex;
  flex-wrap: wrap;
  gap      : 8px;
  margin-bottom: var(--ct-sp-sm);
}

.ct-tip-preset {
  display        : inline-flex;
  align-items    : center;
  justify-content: center;
  padding        : 10px 18px;
  min-width      : 58px;
  font-size      : 14px;
  font-weight    : 700;
  font-family    : var(--ct-font);
  color          : var(--ct-text-secondary);
  background     : var(--ct-input-bg);
  border         : 2px solid var(--ct-input-border);
  border-radius  : var(--ct-r-md);
  cursor         : pointer;
  transition     : all .25s cubic-bezier(.4,0,.2,1);
  user-select    : none;
  white-space    : nowrap;
}

.ct-tip-preset:hover {
  border-color: var(--ct-primary-light);
  color       : var(--ct-primary);
  background  : rgba(99, 102, 241, .06);
  transform   : translateY(-2px);
  box-shadow  : 0 4px 12px rgba(99, 102, 241, .12);
}

.ct-tip-preset-active,
.ct-tip-preset-active:hover {
  background  : linear-gradient(135deg, var(--ct-primary), var(--ct-primary-hover));
  color       : #fff !important;
  border-color: var(--ct-primary) !important;
  box-shadow  : 0 4px 16px var(--ct-primary-glow);
  transform   : translateY(-2px);
}

.ct-tip-preset-custom {
  flex-grow: 1;
  min-width: 100px;
}

/* Custom tip input wrapper */
.ct-tip-custom-wrap {
  margin-top : var(--ct-sp-sm);
  max-width  : 260px;
  animation  : ctFadeUp .3s var(--ct-ease);
}

.ct-tip-custom-wrap[hidden] {
  display: none;
}

/* ===== PEOPLE STEPPER ===== */
.ct-tip-stepper {
  display       : flex;
  align-items   : center;
  gap           : 0;
  border        : 2px solid var(--ct-input-border);
  border-radius : var(--ct-r-md);
  overflow      : hidden;
  background    : var(--ct-input-bg);
  transition    : border-color .3s ease;
}

.ct-tip-stepper:focus-within {
  border-color: var(--ct-primary);
  box-shadow  : 0 0 0 4px rgba(99, 102, 241, .1);
}

.ct-tip-step-btn {
  display        : flex;
  align-items    : center;
  justify-content: center;
  width          : 38px;
  height         : 38px;
  font-size      : 22px;
  font-weight    : 800;
  font-family    : var(--ct-font);
  color          : var(--ct-primary);
  background     : rgba(99, 102, 241, .06);
  border         : none;
  cursor         : pointer;
  transition     : all .2s ease;
  user-select    : none;
  padding        : 0;
  line-height    : 1;
  flex-shrink    : 0;
}

.ct-tip-step-btn:hover {
  background: rgba(99, 102, 241, .15);
  color     : var(--ct-primary-hover);
}

.ct-tip-step-btn:active {
  background: rgba(99, 102, 241, .25);
  transform : scale(.92);
}

.ct-tip-people-input {
  width       : 100% !important;
  text-align  : center !important;
  font-size   : 20px !important;
  font-weight : 800 !important;
  border      : none !important;
  border-left : 1px solid var(--ct-input-border) !important;
  border-right: 1px solid var(--ct-input-border) !important;
  border-radius: 0 !important;
  background  : var(--ct-input-bg) !important;
  padding     : 10px 8px !important;
  outline     : none !important;
  box-shadow  : none !important;
  -moz-appearance   : textfield;
}

.ct-tip-people-input::-webkit-inner-spin-button,
.ct-tip-people-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ===== TIP QUALITY RATING ===== */
.ct-tip-rating {
  display        : flex;
  align-items    : center;
  justify-content: center;
  gap            : 10px;
  padding        : 14px 20px;
  border-radius  : var(--ct-r-md);
  margin-top     : var(--ct-sp-md);
  font-size      : 15px;
  font-weight    : 700;
  text-align     : center;
  transition     : all .3s ease;
}

.ct-tip-rating:empty {
  display: none;
}

.ct-tip-rating-low {
  background: rgba(239, 68, 68, .08);
  color     : #dc2626;
  border    : 1px solid rgba(239, 68, 68, .2);
}

.ct-tip-rating-fair {
  background: rgba(245, 158, 11, .08);
  color     : #d97706;
  border    : 1px solid rgba(245, 158, 11, .2);
}

.ct-tip-rating-good {
  background: rgba(16, 185, 129, .08);
  color     : #059669;
  border    : 1px solid rgba(16, 185, 129, .2);
}

.ct-tip-rating-great {
  background: rgba(99, 102, 241, .08);
  color     : var(--ct-primary);
  border    : 1px solid rgba(99, 102, 241, .2);
}

.ct-tip-rating-generous {
  background: linear-gradient(135deg, rgba(236,72,153,.08), rgba(99,102,241,.08));
  color     : #a855f7;
  border    : 1px solid rgba(168, 85, 247, .2);
}

/* Active row highlight in comparison table */
.ct-tip-compare-active {
  background: rgba(99, 102, 241, .08) !important;
  font-weight: 800;
}

.ct-tip-compare-active td {
  color: var(--ct-primary) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .ct-tip-presets {
    gap: 6px;
  }

  .ct-tip-preset {
    padding  : 8px 12px;
    min-width: 40px;
    font-size: 13px;
  }

  .ct-tip-step-btn {
    width    : 38px;
    height   : 38px;
    font-size: 20px;
  }

  .ct-tip-people-input {
    font-size: 18px !important;
  }
}

@media (max-width: 480px) {
  .ct-tip-presets {
    gap: 5px;
  }

  .ct-tip-preset {
    padding  : 8px 10px;
    min-width: 42px;
    font-size: 12px;
  }

  .ct-tip-preset-custom {
    min-width: 80px;
  }

  .ct-tip-step-btn {
    width    : 34px;
    height   : 34px;
    font-size: 18px;
  }

  .ct-tip-rating {
    flex-direction: column;
    gap           : 4px;
    font-size     : 14px;
  }
}
