/* ============================================
   Cutting Type Toggle — Standard vs Custom Size
   Author: Daiva Reinike
   ============================================ */

.nh-cutting-group {
  margin: 0 0 0.75rem;
}

/* Label text */
.nh-cutting-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--nh-forest, #111827);
  margin: 0 0 0.35rem;
}

/* Toggle wrapper */
.nh-cut-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start; /* top-align when button heights differ */
}

/* Toggle buttons – match attribute buttons */
.nh-cut-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;                /* space between icon + text */
  padding: 6px 14px;
  box-sizing: border-box;
  min-height: 36px;
  line-height: 1.5;
  border-width: 1px;
  border-style: solid;
  border-color: var(--ui-border, #C3E8C6);
  border-radius: 4px;
  background: var(--ui-bg-content, #fff);
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  color: var(--nh-green, #00704A);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.02s ease;
}

/* Make <a> look identical to <span> in all states */
.nh-cut-btn:link,
.nh-cut-btn:visited {
  text-decoration: none;
}

/* Icon inside button */
.nh-cut-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

/* Adjust paths/filenames to your actual icons */
.nh-cut-icon-standard {
  background-image: url('../icons/cutting-standard.svg');
}

.nh-cut-icon-custom {
  background-image: url('../icons/cutting-custom.svg');
}

/* Default icon tone (inactive) */
.nh-cut-btn .nh-cut-icon {
  filter: none; /* keep original dark icon */
}

/* Active button → light/white icon on green background */
.nh-cut-btn.is-active .nh-cut-icon {
  filter: invert(1) brightness(110) contrast(110);
}

/* Hover (soft cream tone) */
.nh-cut-btn:hover {
  background: var(--nh-cream, #F1E6D6);
  border-color: var(--nh-green, #00704A);
  color: var(--nh-forest, #1E3932);
  transform: translateY(-1px);
}

/* Active */
.nh-cut-btn.is-active {
  background: var(--nh-green, #00704A);
  color: #fff;
  border-color: var(--nh-green, #00704A);
  cursor: default;
  transform: none;
}

/* Active + hover → darker forest */
.nh-cut-btn.is-active:hover {
  background: var(--nh-forest, #1E3932) !important;
  border-color: var(--nh-forest, #1E3932) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  html {
    scroll-behavior: smooth;
  }

  #cutting-type {
    scroll-margin-top: 70px; /* tweak to match mobile header height */
  }
}

/* ============================================
   Dark Mode — improved UX (tinted inactive)
   ============================================ */

body.dark-mode .nh-cutting-label {
  color: color-mix(in srgb, var(--dm-text) 85%, var(--dm-primary) 15%);
  font-weight: 700;
  opacity: 0.95;
  letter-spacing: 0.02em;
}

/* Inactive (clickable): soft tint so it doesn't look disabled */
body.dark-mode .nh-cut-btn {
  background: color-mix(in srgb, var(--dm-bg) 86%, var(--dm-primary) 14%);
  border-color: color-mix(in srgb, var(--dm-border) 65%, var(--dm-primary) 35%);
  color: var(--dm-text);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.02s ease;
}

/* Hover: slightly stronger tint + white text for clarity */
body.dark-mode .nh-cut-btn:hover {
  background: color-mix(in srgb, var(--dm-bg) 78%, var(--dm-primary) 22%);
  border-color: var(--dm-primary);
  color: #fff;
  transform: translateY(-1px);
}

/* Keyboard focus: accessible outline (keeps tint) */
body.dark-mode .nh-cut-btn:focus-visible {
  outline: 2px solid var(--dm-primary);
  outline-offset: 2px;
}

/* Active/selected: solid primary (high contrast) */
body.dark-mode .nh-cut-btn.is-active {
  background: var(--dm-primary);
  border-color: var(--dm-primary);
  color: #0f2019;
  transform: none;
}

/* Pressed on active: forest tone for feedback */
body.dark-mode .nh-cut-btn.is-active:hover {
  background: var(--dm-forest);
  border-color: var(--dm-forest);
  color: #fff;
  transform: translateY(-1px);
}

/* Optional: disabled state */
body.dark-mode .nh-cut-btn[aria-disabled="true"],
body.dark-mode .nh-cut-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.2);
  transform: none !important;
}
