/* Branches page styles */

.page-header {
  padding-block: var(--space-xl) var(--space-lg);
}

.page-header h1 {
  color: var(--color-white);
}

.page-header p {
  color: var(--color-text-on-dark-muted);
  max-width: 36rem;
  margin-inline: auto;
}

.branch-search-bar {
  max-width: 28rem;
  margin: 0 auto var(--space-lg);
}

#branch-search {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--color-border-on-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
}

#branch-search:focus {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}

.branch-empty {
  text-align: center;
  color: var(--color-text-on-light-muted);
  margin-bottom: var(--space-lg);
}

/* Grid: HQ full-width on top, 4 branches in a 2×2 below */
.branch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  align-items: stretch;
}

/* Cards stretch to equal height within each row */
.branch-card {
  display: flex;
  flex-direction: column;
}

.branch-card-hq {
  border: 2px solid var(--color-red);
}

/* Card body fills available space, pushing actions to bottom */
.branch-card-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.branch-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.branch-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background-color: rgba(26, 36, 44, 0.08);
}

.branch-status.is-open {
  background-color: rgba(37, 211, 102, 0.15);
  color: #1a8a4a;
}

.branch-status.is-closed {
  background-color: rgba(227, 30, 36, 0.1);
  color: var(--color-red-dark);
}

.branch-address {
  color: var(--color-text-on-light-muted);
  margin-bottom: 0.2rem;
}

.branch-district {
  font-size: 0.85rem;
  color: var(--color-text-on-light-muted);
  margin-bottom: var(--space-sm);
}

.branch-features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: var(--space-sm);
}

.branch-features li {
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background-color: rgba(26, 36, 44, 0.05);
  color: var(--color-text-on-light-muted);
}

.branch-hours {
  font-size: 0.9rem;
  color: var(--color-text-on-light-muted);
}

.branch-phone {
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.branch-phone a {
  color: var(--color-navy);
  font-weight: 600;
  display: inline-block;
  padding-block: 0.5rem;
  min-height: 44px;
  line-height: 1.8;
}

.branch-phone a:hover {
  color: var(--color-red);
}

.branch-phone-note {
  font-size: 0.8rem;
  color: var(--color-text-on-light-muted);
  font-weight: 400;
}

.branch-note {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-on-light-muted);
  margin-bottom: var(--space-sm);
}

/* Actions always pinned to the bottom of each card */
.branch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: var(--space-sm);
}

.branch-actions .btn {
  padding: 0.7rem 1.1rem;
  font-size: 0.82rem;
  min-height: 44px;
}


@media (min-width: 600px) {
  .branch-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .branch-card-hq {
    grid-column: 1 / -1;
  }
}
