/* AIDEV-NOTE: v4 component classes — buttons, cards, badges, accordions */

/* Buttons */
.v4-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  line-height: 1.25rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.v4-btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}
.v4-btn-primary:hover {
  background: hsl(0, 0%, 20%);
}

.v4-btn-orange {
  background: var(--brand-orange);
  color: #fff;
}
.v4-btn-orange:hover {
  background: var(--brand-orange-hover);
}

.v4-btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}
.v4-btn-outline:hover {
  background: var(--muted);
}

.v4-btn-ghost {
  background: transparent;
  color: var(--primary);
}
.v4-btn-ghost:hover {
  background: var(--muted);
}

.v4-btn-light {
  background: #f0eded;
  color: #000;
}
.v4-btn-light:hover {
  background: hsl(0, 0%, 25%);
  color: #fff;
}

.v4-btn-lg {
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
}
/* AIDEV-NOTE: White primary button — used on dark backgrounds (heroes, slogan, calculator CTAs).
   Source: bg-white text-black shadow-lg rounded-full, 220px fixed width on hero/CTA rows. */
.v4-btn-white {
  background: #fff;
  color: #000;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
.v4-btn-white:hover {
  background: #f3f4f6;
}
/* AIDEV-NOTE: Ghost outline button on dark backgrounds — 2px solid white border. */
.v4-btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}
.v4-btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
}
/* Fixed-width variant for hero/CTA button rows (source uses w-[220px]) */
.v4-btn-fixed {
  width: 220px;
  padding-left: 0;
  padding-right: 0;
}

.v4-btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
}

/* Cards */
.v4-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease;
}
.v4-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.v4-card-dark {
  background: hsl(222, 47%, 11%);
  border-color: hsl(222, 30%, 20%);
  color: #fff;
}

/* AIDEV-NOTE: Badge — matches ww2 v4 pill eyebrow: uppercase, bordered, no fill */
/* Badge */
.v4-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: transparent;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
}
.v4-badge-orange {
  background: var(--brand-orange-light);
  color: var(--brand-orange);
}
.v4-badge-teal {
  background: var(--brand-teal-light);
  color: var(--brand-teal);
}

/* Accordion */
.v4-accordion-item {
  border-bottom: 1px solid var(--border);
}
.v4-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 0;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}
.v4-accordion-trigger svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.v4-accordion-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.v4-accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.v4-accordion-content.open {
  max-height: 500px;
  padding-bottom: 1rem;
}

/* Tabs */
.v4-tab-list {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.v4-tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.v4-tab:hover {
  color: var(--foreground);
}
.v4-tab.active {
  color: var(--foreground);
  border-bottom-color: var(--primary);
}
.v4-tab-panel {
  display: none;
}
.v4-tab-panel.active {
  display: block;
}

/* AIDEV-NOTE: ROI calculator components */
.v4-range-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  outline: none;
}
.v4-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.v4-range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.v4-calc-output-card {
  background: #111827;
  border: 1px solid rgb(31, 41, 55);
  border-radius: 1rem;
  padding: 1.25rem;
}
.v4-calc-output-card--green {
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.06);
}
.v4-calc-compare-card {
  background: #111827;
  border: 1px solid rgb(31, 41, 55);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
}
/* AIDEV-NOTE: Calculator label/value row */
.v4-calc-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.v4-calc-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #d1d5db;
  line-height: 1.25rem;
}
.v4-calc-value {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25rem;
}
/* Red multiplier pill in compare cards */
.v4-calc-badge-red {
  display: inline-block;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

/* ── Wrap-sizes card components ── */
/* AIDEV-NOTE: Pill-shaped accordion trigger for wrap-sizes cards (distinct from FAQ accordion) */
.v4-accordion-trigger-pill {
  font-size: 0.75rem;
  font-weight: 400;
  color: #374151;
  padding: 0.625rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f3f4f6;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  width: 100%;
  overflow: hidden;
  text-align: center;
  line-height: 1rem;
}
.v4-accordion-trigger-pill svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.v4-accordion-trigger-pill[aria-expanded="true"] svg:last-child {
  transform: rotate(180deg);
}
/* Green check circle in accordion content */
.v4-check-circle {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
/* Check item row (circle + text) */
.v4-check-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
/* Check items container (vertical stack inside accordion content) */
.v4-check-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.75rem 0.75rem 0.25rem;
}
/* Check item text */
.v4-check-text {
  font-size: 0.75rem;
  color: #374151;
}
/* Accordion trigger pill span (inner label with check icon + text) */
.v4-accordion-trigger-pill-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  line-height: 1rem;
}
/* Amber bottom pill in wrap cards */
.v4-card-pill-amber {
  padding: 0.5rem 0.75rem;
  background: #fffbeb;
  border-radius: 0.5rem;
}
.v4-card-pill-amber p {
  font-size: 0.75rem;
  color: #78350f;
  font-weight: 500;
  line-height: 1rem;
  margin: 0;
}
/* Wrap card image container */
.v4-card-img-wrap {
  background: #f3f4f6;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.v4-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Thumbnail button for example photos */
.v4-thumb-btn {
  width: 3.875rem;
  height: 3.875rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  padding: 0;
  cursor: pointer;
  background: none;
}
.v4-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Before/After components ── */
.v4-ba-label {
  position: absolute;
  top: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 0.25rem;
  z-index: 2;
}
.v4-ba-label-before {
  left: 0.75rem;
}
.v4-ba-label-after {
  right: 0.75rem;
}
.v4-ba-handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2.5rem;
  height: 2.5rem;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
