/* Buttons. Primary (midnight navy, a soft gradient) is the main action of an area; accent (electric teal) is for
   the few key actions that should stand out (e.g. "Finish setup" in the reminder). Everything else is outline or light. */
.btn {
  --bs-btn-border-radius: 999px; /* every button is a pill (icon-only square ones become circles) */
  --bs-btn-font-weight: 600;
  --bs-btn-focus-shadow-rgb: var(--lb-primary-rgb);
  --bs-btn-padding-x: var(--lb-btn-pad-x);
  --bs-btn-padding-y: var(--lb-btn-pad-y);
  --bs-btn-font-size: var(--lb-btn-font-size);
  min-width: var(--lb-btn-min-width);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

/* One size: .btn-sm and .btn-lg are kept so old markup works, but they no longer change anything. */
.btn-sm,
.btn-lg {
  --bs-btn-padding-x: var(--lb-btn-pad-x);
  --bs-btn-padding-y: var(--lb-btn-pad-y);
  --bs-btn-font-size: var(--lb-btn-font-size);
  --bs-btn-border-radius: 999px;
}

/* The one smaller button, for crowded rows (Edit / Delete in a list). Same pill shape and colours. */
.btn-compact {
  --bs-btn-padding-x: 0.7rem;
  --bs-btn-padding-y: 0.22rem;
  --bs-btn-font-size: 0.78rem;
  min-width: 0;
}

/* Text-less buttons are not stretched to the minimum width. */
.btn-icon,
.btn-link,
.btn-close { min-width: 0; }

/* Main actions sit slightly raised. */
.btn-primary,
.btn-accent,
.btn-success { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 12px rgba(var(--lb-accent-rgb), 0.28); } /* the Check in look, for every green button */

.btn-primary:hover { background-image: linear-gradient(135deg, #1B4A94 0%, var(--lb-primary-hover) 100%); }

.btn-primary:hover,
.btn-accent:hover,
.btn-success:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 16px rgba(var(--lb-accent-rgb), 0.38); transform: translateY(-1px); }

.btn-primary {
  background-image: var(--lb-gradient);
  --bs-btn-bg: var(--lb-primary);
  --bs-btn-border-color: var(--lb-primary);
  --bs-btn-hover-bg: var(--lb-primary-hover);
  --bs-btn-hover-border-color: var(--lb-primary-hover);
  --bs-btn-active-bg: var(--lb-primary-active);
  --bs-btn-active-border-color: var(--lb-primary-active);
  --bs-btn-disabled-bg: var(--lb-primary);
  --bs-btn-disabled-border-color: var(--lb-primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--lb-primary);
  --bs-btn-border-color: var(--lb-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--lb-primary);
  --bs-btn-hover-border-color: var(--lb-primary);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--lb-primary-hover);
  --bs-btn-active-border-color: var(--lb-primary-hover);
}

.btn-outline-secondary {
  --bs-btn-color: var(--lb-ink);
  --bs-btn-border-color: var(--lb-border);
  --bs-btn-hover-color: var(--lb-ink);
  --bs-btn-hover-bg: var(--lb-hover);
  --bs-btn-hover-border-color: var(--lb-border);
  --bs-btn-active-color: var(--lb-ink);
  --bs-btn-active-bg: var(--lb-border-soft);
  --bs-btn-active-border-color: var(--lb-border);
}

/* Key actions and positive actions ("Verify", "Mark done") use the accent. */
.btn-accent,
.btn-success {
  background-image: var(--lb-gradient-accent);
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--lb-accent-strong);
  --bs-btn-border-color: var(--lb-accent-strong);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--lb-accent-hover);
  --bs-btn-hover-border-color: var(--lb-accent-hover);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--lb-accent-hover);
  --bs-btn-active-border-color: var(--lb-accent-hover);
  --bs-btn-focus-shadow-rgb: var(--lb-accent-rgb);
}

.btn-accent:hover,
.btn-success:hover { background-image: linear-gradient(180deg, #0A8273 0%, var(--lb-accent-hover) 100%); }

.btn-outline-success:hover { background-image: var(--lb-gradient-accent); }
.btn-outline-success {
  --bs-btn-color: var(--lb-accent-strong);
  --bs-btn-border-color: var(--lb-accent-strong);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--lb-accent-strong);
  --bs-btn-hover-border-color: var(--lb-accent-strong);
  --bs-btn-active-bg: var(--lb-accent-hover);
}

.btn-link {
  --bs-btn-color: var(--lb-primary);
  --bs-btn-hover-color: var(--lb-primary-active);
  font-weight: 600;
  text-decoration: none;
}

/* Icon-only buttons (remove a row, close): a circle. */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
}

.btn-icon.btn-sm { width: 2.4rem; height: 2.4rem; }


/* Approve / reject on a request: the Approve button, then one pill that holds the reason and the Reject button, all the
   same height and lined up on the right. Wraps under the Approve button when the column is narrow. */
.decision-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.decision-actions form { margin: 0; }
.decision-actions .btn { height: 2.4rem; display: inline-flex; align-items: center; justify-content: center; }

.reason-pill {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.2rem 0.2rem 0.9rem;
  background: var(--lb-surface);
  border: 1px solid var(--lb-border);
  border-radius: 999px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.reason-pill:focus-within { border-color: var(--lb-primary); box-shadow: 0 0 0 0.2rem rgba(var(--lb-primary-rgb), 0.12); }

.reason-pill input {
  width: 13rem;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  font-size: 0.875rem;
  background: transparent;
  border: 0;
  outline: 0;
}

.reason-pill input::placeholder { color: #93A0B6; }
.reason-pill .btn { height: 2rem; }


/* The reason box that opens under the Approve / Reject buttons: its own full-width line, aligned to the right. */
.decision-actions .decision-reason { flex: 0 0 100%; }
.decision-actions .decision-reason.show,
.decision-actions .decision-reason.collapsing { display: flex; justify-content: flex-end; }
.decision-actions .decision-reason .reason-pill { width: 100%; max-width: 20rem; }
.decision-actions .decision-reason .reason-pill input { flex: 1; width: auto; }
.decision-actions .decision-reason .btn { height: 2rem; }
