/* buttons.css — .btn + variants and sizes (12 §5). One primary button per view area. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--control-h);
  padding: 0 var(--sp-5);
  border: var(--border-w) solid transparent;
  border-radius: var(--r-md);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

/* Long labels wrap on phones instead of pushing the page wider than the screen. */
@media (max-width: 575.98px) {
  .btn { max-width: 100%; white-space: normal; padding-block: var(--sp-2); }
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .bi { font-size: var(--icon-md); line-height: 1; }

.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); color: var(--on-primary); }

.btn--secondary { background: var(--surface); border-color: var(--border); color: var(--text-strong); }
.btn--secondary:hover { border-color: var(--primary); color: var(--text-strong); background: var(--primary-tint); }

.btn--ghost { background: transparent; color: var(--link); padding-inline: var(--sp-3); }
.btn--ghost:hover { color: var(--link-hover); background: var(--primary-tint); }

/* Microsoft Store CTA: Windows icon + two text lines. */
.btn--store {
  background: var(--primary);
  color: var(--on-primary);
  min-height: var(--control-h-lg);
  text-align: left;
}

.btn--store:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn--store .bi { font-size: var(--icon-lg); }
.btn--store__text { display: flex; flex-direction: column; line-height: var(--lh-tight); }
.btn--store__small { font-size: var(--fs-xs); font-weight: var(--fw-medium); opacity: .9; }
.btn--store__big { font-size: var(--fs-body); font-weight: var(--fw-bold); }

.btn--sm { min-height: var(--control-h-sm); padding-inline: var(--sp-4); font-size: var(--fs-sm); }
.btn--lg { min-height: var(--control-h-lg); padding-inline: var(--sp-6); font-size: var(--fs-h4); }

@media (max-width: 575.98px) {
  .btn--block { display: flex; width: 100%; }
}

/* Icon-only button (theme toggle, search, close). Always give it an aria-label. */
.btn-icon {
  display: inline-grid;
  place-items: center;
  width: var(--touch-min);
  height: var(--touch-min);
  border-radius: var(--r-md);
  color: var(--text-strong);
}

.btn-icon:hover { background: var(--bg-subtle); color: var(--text-strong); }
.btn-icon .bi { font-size: var(--icon-md); }
