/*
 * Propshaft serves every file in this directory as its own fingerprinted asset —
 * there is no manifest concatenation. The layout's `stylesheet_link_tag :app`
 * links each one, so a new stylesheet is dropped in here, not registered
 * anywhere. Files are linked in load-path order, so don't rely on one file
 * overriding another's rules for the same selector; distinct class names keep
 * cascade order from mattering.
 *
 * Propshaft serves app/assets; Vite owns everything under app/frontend. The two
 * do not overlap. Styling here is deliberately minimal — the POC has no design
 * system. These rules cover the page chrome (header, flash), the door pages
 * (sign-in, sign-up), and the signed-in pages (root, locations). The admin
 * panel's own rules live in admin.css; the shared ones it leans on — body,
 * .flash, .button — stay here.
 */

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f6f7f9;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.page__lede {
  color: #555;
}

/* Record-page headings: a labelled parent link, a kind label, then the h1. */
.page__parent {
  margin-bottom: 1.25rem;
}

.page__kind {
  margin: 0 0 0.125rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}

.page__kind + h1 {
  margin-top: 0;
}

.panel {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #dcdfe4;
  border-radius: 8px;
}

.panel h2 {
  margin-top: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}

.panel__value {
  font-size: 1.25rem;
  font-weight: 600;
}

.panel__meta {
  color: #777;
  font-size: 0.875rem;
}

.panel__note {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: #444;
}

.panel__subhead {
  margin: 1rem 0 0.25rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}

.panel__list {
  margin: 0;
  padding-left: 1.25rem;
  color: #333;
}

.panel__locations {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.panel button {
  font: inherit;
  padding: 0.4rem 0.9rem;
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
}

/* Page chrome — the layout renders it for signed-in visitors only. */
.session-control {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: #7E3DD4;
  color: #fff;
}

/* The Homebase mark at the far left of the purple bar. The source image is
   square with its own purple ground, so it needs no background of its own —
   only a matching corner radius so it does not read as a pasted-on square. */
.session-control__logo {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
}

.session-control__identity {
  display: flex;
  flex-direction: column;
}

.session-control__brand {
  font-weight: 600;
}

.session-control__tagline {
  font-size: 0.75rem;
  color: #e3d8f7;
}

/* Pushes the session cluster (email + sign-out) to the far right. */
.session-control__email {
  margin-left: auto;
}

.session-control .button_to {
  margin: 0;
}

/* Inverts the shared .button, which is dark on light. */
.session-control .button {
  padding: 0.25rem 0.75rem;
  border-color: #fff;
  background: transparent;
  font-size: 0.875rem;
}

.button {
  display: inline-block;
  font: inherit;
  padding: 0.4rem 0.9rem;
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}

/* Flash — notice and alert distinguishable at a glance. */
.flash {
  padding: 0.75rem 1rem;
  border: 1px solid;
  border-radius: 6px;
}

.flash--notice {
  background: #edf6ed;
  border-color: #b7d9b7;
  color: #2c642c;
}

.flash--alert {
  background: #fdefec;
  border-color: #efb9af;
  color: #9e3324;
}

/* Sign-in — a narrower card centered within the page. */
.sign-in {
  max-width: 22rem;
  margin: 3rem auto;
}

.sign-in__title {
  margin-top: 0;
}

.sign-in__lede {
  color: #555;
  font-size: 0.9375rem;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: #555;
}

.form-field input {
  box-sizing: border-box;
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.75rem;
  border: 1px solid #c4c9d1;
  border-radius: 6px;
}

.form-field input:focus {
  outline: 2px solid #1a1a1a;
  outline-offset: 1px;
  border-color: #1a1a1a;
}

/* The checkbox variant: the input is not a full-width block, and the label
   text sits beside it rather than above. */
.form-field--checkbox label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-field--checkbox input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.form-field__hint {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: #555;
}

/* The location form's company-level billing notice. */
.location-form__arrangement {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: #555;
}

.sign-in__submit {
  width: 100%;
  margin-top: 0.5rem;
}

/* Cart — the checkout page's form. */
.cart h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}

.cart__tiers {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cart__tier {
  flex: 1;
  min-width: 10rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #dcdfe4;
  border-radius: 8px;
  cursor: pointer;
}

.cart__tier--selected {
  border-color: #1a1a1a;
  outline: 2px solid #1a1a1a;
}

.cart__tier h3 {
  margin-top: 0;
}

.cart__price {
  margin-bottom: 0;
}

.cart__period {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9375rem;
}

.cart__addon {
  display: block;
  margin-bottom: 0.5rem;
}

.cart__total {
  font-size: 1.25rem;
  font-weight: 600;
}

/* The saved-card picker. A select rather than a radio list, so its height does
   not grow with the number of vaulted cards. */
.cart__payment-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: #555;
}

.cart__payment-select {
  box-sizing: border-box;
  max-width: 24rem;
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.75rem;
  border: 1px solid #c4c9d1;
  border-radius: 6px;
  background: #fff;
}

.cart__payment-select:focus {
  outline: 2px solid #1a1a1a;
  outline-offset: 1px;
  border-color: #1a1a1a;
}

.cart__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.cart__actions-or {
  color: #6b7280;
  font-size: 0.875rem;
}

/* A refused subscribe's banner — an alert, not body copy. */
.cart__failure {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #dc2626;
  border-radius: 8px;
}

.cart__failure p {
  margin: 0;
}

/* Every form error line (cart validation, capture, sign-up). */
.form-field__error {
  color: #b91c1c;
}

/* The shared billing section's subscription table (company + location pages), and the
   bundles page's list. */
.billing__table {
  width: 100%;
  margin-top: 0.75rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.billing__table th {
  padding: 0.375rem 0.75rem 0.375rem 0;
  border-bottom: 1px solid #dcdfe4;
  font-size: 0.8125rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
}

.billing__table td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid #eceef1;
  vertical-align: top;
}

.billing__table tbody tr:last-child td {
  border-bottom: 0;
}

/* The checkout page's location picker. */
.acting-location {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
}

.acting-location select {
  padding: 0.25rem 0.5rem;
  font: inherit;
}
