html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
/* Home page cards */
.home-card .card-header {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

/* Occasion detail: collapsible "Spend per person" card */
.spend-toggle {
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.spend-toggle:focus-visible {
  outline: 2px solid #258cfb;
  outline-offset: -2px;
}

.spend-chevron {
  display: inline-block;
  transition: transform 0.2s ease;
}

.spend-toggle:not(.collapsed) .spend-chevron {
  transform: rotate(180deg);
}

/* Keep the money columns together on wide screens instead of spreading across the page;
   on a phone the table simply fills the card. */
.spend-table {
  max-width: 36rem;
}

.spend-table td:not(:first-child),
.spend-table th:not(:first-child) {
  white-space: nowrap;
  width: 1%;
  padding-left: 0.75rem;
}

/* Occasion detail: each person's gifts as a boxed block with a gap between blocks */
.gift-group {
  border: 1px solid var(--bs-border-color);
}

.gift-group-gap td {
  height: 1rem;
  padding: 0;
  border: 0;
}

.gift-subtotal > * {
  border-top: 2px solid var(--bs-border-color);
}

/* Occasion detail: notes in a soft grey outlined box */
.gift-notes {
  white-space: pre-wrap;
  border: 1px solid var(--bs-gray-300);
  background-color: var(--bs-gray-100);
  color: var(--bs-secondary-color);
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
}

/* Occasion detail: keep the status column only as wide as its dropdown */
.gift-status-cell {
  width: 1%;
  white-space: nowrap;
}

.gift-status {
  width: auto;
}

.gift-status-idea {
  background-color: var(--bs-secondary-bg);
  border-color: var(--bs-secondary);
}

.gift-status-ordered {
  background-color: var(--bs-primary-bg-subtle);
  border-color: var(--bs-primary);
}

.gift-status-delivered {
  background-color: var(--bs-info-bg-subtle);
  border-color: var(--bs-info);
}

.gift-status-wrapped {
  background-color: var(--bs-success-bg-subtle);
  border-color: var(--bs-success);
}

/* Occasion detail: light column headings above the gift blocks */
.gift-head th {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bs-secondary-color);
  border-bottom-width: 0;
}

/* Icon-only row buttons (edit, remove): a comfortable tap target on phones */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.25rem;
  line-height: 1;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

/* Item names start 3.25rem in, and the "Item" heading matches. The 1rem pencil sits centred in
   the space before the name: 0.625rem padding + 0.5rem of button either side of the icon
   + 0.625rem gap, so 1.125rem clear on each side. */
.gift-head th.gift-item-head-edit {
  padding-left: 3.25rem;
}

.gift-group td.gift-item-cell {
  padding-left: 0.625rem;
}

.gift-item-cell .icon-btn {
  margin-right: 0.625rem;
}
