/* ===========================
   Tip Calculator Online
   Custom Styles
   =========================== */

html {
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
}

/* Tip Preset Buttons */
.tip-preset {
  transition: all 0.2s ease;
}

.tip-preset.active {
  background-color: #34A853;
  color: white;
  border-color: #34A853;
}

.dark .tip-preset.active {
  background-color: #34A853;
  border-color: #34A853;
}

/* Result Cards Animation */
.result-card {
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Number Input — hide spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
}

.dark input[type="range"] {
  background: #3D3D3D;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #34A853;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.dark input[type="range"]::-webkit-slider-thumb {
  border-color: #2D2D2D;
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #34A853;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* People Counter Buttons */
.people-btn {
  transition: all 0.15s ease;
}

.people-btn:active {
  transform: scale(0.92);
}

/* FAQ Accordion */
details summary {
  cursor: pointer;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  border-radius: 50%;
  background: #f3f4f6;
  font-weight: 700;
  color: #34A853;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.dark details summary::before {
  background: #3D3D3D;
}

details[open] summary::before {
  content: '−';
}

/* Ad Containers */
.ad-container {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border-radius: 8px;
  overflow: hidden;
}

.dark .ad-container {
  background: #2D2D2D;
}

/* Cookie Consent */
#cookie-consent {
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

#cookie-consent.show {
  transform: translateY(0);
}

/* Focus styles */
:focus-visible {
  outline: 2px solid #34A853;
  outline-offset: 2px;
}

/* Responsive table wrapper */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Loading spinner for results */
.calc-loading {
  opacity: 0.5;
  pointer-events: none;
}
