/* =====================================================================
   YorSocSponsor shared styles
   Every page links to this file so the whole site looks consistent.
   ===================================================================== */

/* ---- Colours and fonts, defined once and reused below ---- */
:root {
  --blue: #0d5aa7;
  --blue-dark: #0a4886;
  --ink: #1a1a1f;          /* main text */
  --muted: #5f6368;        /* secondary grey text */
  --border: #e3e3e3;
  --panel: #f7f7f7;        /* light grey box background */
  --white: #ffffff;
  --radius: 20px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ---- Basics ---- */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
}

a { color: inherit; }

/* Clear outline when moving around with the keyboard (Tab key). */
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

/* ---- Header ---- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;  /* keeps the name centred */
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 2.5rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
}

/* Empty circle where the logo will go once it's designed. */
.logo-placeholder {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--panel);
}

.wordmark {
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.wordmark span { color: var(--blue); }

.login-box {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.75rem 0.75rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
}

.button {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: var(--blue);
  color: var(--white);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;   /* stops "Log in" wrapping onto two lines */
}

.button:hover { background: var(--blue-dark); }

/* <button> elements need a few resets to look like the link buttons. */
button.button {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button.button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.button-full {
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
}

/* ---- Homepage main section ---- */
.home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2.5rem 4rem;
}

.tagline {
  text-align: center;
  color: var(--muted);
  font-size: 1.25rem;
  margin: 0 0 2.5rem;
}

/* Two cards side by side on wide screens. */
.choice-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Each card is one big link, so clicking anywhere on it works. */
.choice-card {
  display: block;
  padding: 2.5rem 2.75rem;
  border-radius: var(--radius);
  border: 2px solid var(--blue);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.choice-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(13, 90, 167, 0.18);
}

.choice-card .eyebrow {
  margin: 0;
  font-size: 1.75rem;
}

.choice-card h2 {
  margin: 0.25rem 0 1.5rem;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.choice-card .description {
  margin: 0;
  font-size: 1.15rem;
}

.card-society {
  background: var(--white);
  color: var(--ink);
}

.card-society .eyebrow,
.card-society .description { color: var(--muted); }

.card-business {
  background: var(--blue);
  color: var(--white);
}

.about {
  max-width: 50rem;
  margin: 3rem auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 1.15rem;
}

/* ---- Sign-up and log-in pages ---- */
.auth {
  max-width: 32rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.auth h1 {
  margin: 0 0 2rem;
  font-size: 2.25rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* "You are registering as a business  [Change]" box. */
.type-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.75rem;
  padding: 0.85rem 1rem 0.85rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.type-banner p { margin: 0; }

.type-banner strong { color: var(--blue); }

.change-link {
  flex-shrink: 0;
  padding: 0.4rem 1rem;
  border: 2px solid var(--blue);
  border-radius: 8px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.change-link:hover {
  background: var(--blue);
  color: var(--white);
}

.field { margin-bottom: 1.25rem; }

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  border: 1px solid #c4c4c4;
  border-radius: 8px;
}

.field input:focus,
.field textarea:focus {
  outline: 3px solid rgba(13, 90, 167, 0.3);
  border-color: var(--blue);
}

/* Red asterisk after the label of every required box. */
label.required::after {
  content: " *";
  color: #c62828;
}

.required-note {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* The box that needs fixing gets a red border. */
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #c62828;
}

.hint {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-error {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #fdecea;
  color: #a50e0e;
}

/* "Forgot your password?" under the password box. */
.field-link {
  margin: 0.4rem 0 0;
  text-align: right;
  font-size: 0.9rem;
}

.field-link a,
.switch-link a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.field-link a:hover,
.switch-link a:hover { text-decoration: underline; }

.form-intro { margin: 0 0 1.25rem; }

.switch-link { margin-top: 1.5rem; }

.form-success {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #e6f4ea;
  color: #1e6b34;
}

.notice {
  padding: 1.5rem;
  border: 2px solid var(--blue);
  border-radius: var(--radius);
}

.notice h2 { margin-top: 0; }

/* Outlined blue button, for less important actions. */
.button-secondary {
  background: var(--white);
  color: var(--blue);
  border: 2px solid var(--blue) !important;
}

.button-secondary:hover {
  background: var(--blue);
  color: var(--white);
}

/* "Didn't get your confirmation email?" fold-out box. */
.resend {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.resend summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 700;
}

.resend form { margin-top: 1rem; }

/* Name / type / status list on the account page. */
.details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1rem;
}

.details dt { font-weight: 700; }

.details dd { margin: 0; }

/* =====================================================================
   Logged-in pages (profile, browse)
   ===================================================================== */

body.app { background: #f9f9f8; }

body.app .site-header { background: var(--white); }

.header-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Account name next to "Sign out". */
.header-name { color: var(--muted); }

/* White button with a thin grey border, e.g. "Sign out", "Cancel". */
.button-outline,
.button-outline:hover {
  background: var(--white);
  color: var(--ink);
  border: 1px solid #cfcfcf !important;
}

.button-outline:hover { background: var(--panel); }

.button-danger { background: #c62828; }
.button-danger:hover { background: #a51f1f; }

/* PROFILE | BROWSE */
.app-nav {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem 1rem 0;
  color: #9a9a9a;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-nav a {
  color: #9a9a9a;
  text-decoration: none;
}

.app-nav a:hover,
.app-nav a[aria-current="page"] { color: var(--blue); }

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2.5rem 4rem;
}

.page-eyebrow {
  margin: 0;
  color: var(--blue);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Account name before "| BUSINESS PROFILE": keeps its own capitals. */
.eyebrow-name { text-transform: none; letter-spacing: 0.02em; }

.page-title {
  margin: 0.25rem 0 2rem;
  font-size: 2.25rem;
  letter-spacing: -0.02em;
}

.banner-info {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: 8px;
  background: #fff6e0;
  color: #6b4e00;
}

/* Bio on the left; Details and Create on the right. */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.profile-side {
  display: grid;
  gap: 1.5rem;
}

.card {
  padding: 1.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card-title {
  display: block;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.card textarea {
  width: 100%;
  padding: 1rem;
  font: inherit;
  line-height: 1.5;
  background: #fbfbfa;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  resize: vertical;
}

.card textarea:focus {
  outline: 3px solid rgba(13, 90, 167, 0.3);
  border-color: var(--blue);
}

.save-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.save-status {
  margin: 0;
  color: #1e6b34;
  font-size: 0.95rem;
}

.save-status.is-error { color: #a50e0e; }

/* Details fold-out: the title row is the click target. */
.details-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none; /* hide the default triangle */
}

.details-card summary::-webkit-details-marker { display: none; }

.details-card summary .card-title { margin: 0; }

.summary-hint { color: var(--muted); }

.summary-hint::after {
  content: " ▼";
  font-size: 0.8em;
}

.details-card[open] .summary-hint::after { content: " ▲"; }

.details-card form { margin-top: 1.5rem; }

.details-hint { margin-bottom: 1rem; }

/* Dashed "Create sponsorship package" box. */
.create-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 14rem;
  padding: 2rem;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue);
  background: #eef5fd;
  border: 2px dashed #8fb3dc;
  border-radius: var(--radius);
  cursor: pointer;
}

.create-card:hover { background: #e3eefb; }

.create-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.plus {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1;
}

/* Package list */
.packages { margin-top: 3rem; }

.packages-heading {
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
}

.packages-count {
  margin-left: 0.5rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 400;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.package-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.package-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.package-top h3 {
  margin: 0;
  font-size: 1.4rem;
  overflow-wrap: anywhere;
}

.package-price {
  flex-shrink: 0;
  color: var(--blue);
  font-weight: 700;
  font-size: 1.25rem;
}

.package-description {
  flex-grow: 1;
  margin: 1rem 0 1.5rem;
  color: var(--muted);
  white-space: pre-line; /* keep line breaks the society typed */
  overflow-wrap: anywhere;
}

.package-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.button-small {
  padding: 0.4rem 1rem;
  font: inherit;
  font-weight: 700;
  background: var(--white);
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  cursor: pointer;
}

.button-small:hover { background: var(--panel); }

.link-button {
  padding: 0;
  font: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}

.link-button:hover { color: #c62828; }

/* Pop-up boxes (create/edit package, confirm delete) */
.dialog {
  width: min(32rem, calc(100vw - 2rem));
  padding: 2rem;
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.dialog::backdrop { background: rgba(0, 0, 0, 0.45); }

.dialog h2 { margin-top: 0; }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.checkbox {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-weight: 400 !important;
  cursor: pointer;
}

.checkbox input {
  width: auto !important;
  margin: 0;
}

.field input:disabled {
  background: var(--panel);
  color: #9a9a9a;
}

/* Heading row with a button on the right (e.g. the inbox icon). */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.page-head { margin-bottom: 2rem; }

.page-head .page-title { margin-bottom: 0; }

/* Square icon button, e.g. the inbox. */
.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  cursor: pointer;
}

.icon-button:hover { background: var(--panel); }

.icon-button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

/* Blue dot with a number on the inbox icon's top-right corner. */
.badge {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  background: var(--blue);
  border: 2px solid var(--white);
  border-radius: 999px;
}

.badge[hidden] { display: none; }

/* =====================================================================
   Inbox and conversation pages
   ===================================================================== */

.page-narrow { max-width: 760px; }

.back-link {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

.inbox-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.inbox-list:empty { display: none; }

.inbox-list li + li { border-top: 1px solid var(--border); }

.inbox-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  text-decoration: none;
}

.inbox-row:hover { background: var(--panel); }

.inbox-row:focus-visible { outline-offset: -3px; }

/* Keeps the same space whether or not the dot is showing. */
.unread-dot {
  flex-shrink: 0;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--blue);
}

.unread-dot[hidden] {
  display: block;
  visibility: hidden;
}

.inbox-main {
  flex: 1;
  min-width: 0; /* lets the preview shorten with "…" */
}

.inbox-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.inbox-name { font-weight: 700; }

.inbox-when {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.inbox-preview {
  margin: 0.2rem 0 0;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.is-unread .inbox-preview { color: var(--ink); }

/* Chat bubbles: mine on the right in blue, theirs on the left. */
.thread {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.message {
  max-width: 80%;
  padding: 0.85rem 1.1rem;
  border-radius: 16px;
  overflow-wrap: anywhere;
}

.message.theirs {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message.mine {
  align-self: flex-end;
  background: var(--blue);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.message-meta {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  opacity: 0.75;
}

.message-about {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.15rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(13, 90, 167, 0.1);
  color: var(--blue);
}

.message.mine .message-about {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.message-body {
  margin: 0;
  white-space: pre-line; /* keep line breaks */
}

.reply-form .card-title { margin-bottom: 0.75rem; }

/* =====================================================================
   Browse page
   ===================================================================== */

.head-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* "Filter" button next to the inbox icon. */
.button-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 3.5rem;
  padding: 0 1.25rem;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  cursor: pointer;
}

.button-filter:hover { background: var(--panel); }

.button-filter[aria-expanded="true"] { border-color: var(--blue); color: var(--blue); }

.search-box {
  position: relative;
  margin-bottom: 1rem;
}

.search-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.75rem;
  font: inherit;
  background: var(--white);
  border: 1px solid #d6d6d6;
  border-radius: 12px;
}

.search-box input:focus {
  outline: 3px solid rgba(13, 90, 167, 0.3);
  border-color: var(--blue);
}

.filter-panel { margin-bottom: 1rem; }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem 2rem;
}

.filter-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.filter-group legend,
.filter-group > label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.filter-group select,
.price-row input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  font: inherit;
  border: 1px solid #c4c4c4;
  border-radius: 8px;
  background: var(--white);
}

.price-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-row span { color: var(--muted); }

.clear-filters { margin-top: 1.25rem; }

.clear-filters:hover { color: var(--blue); }

/* Two-handled slider: two range inputs on top of each other. */
.range-value {
  margin: 0 0 0.5rem;
  color: var(--blue);
  font-weight: 700;
}

.range-slider {
  position: relative;
  height: 1.75rem;
}

.range-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  transform: translateY(-50%);
  background: #dcdcdc;
  border-radius: 999px;
}

.range-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--blue);
  border-radius: 999px;
}

.range-slider input[type="range"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  background: none;
  pointer-events: none;   /* only the round handles can be grabbed */
  -webkit-appearance: none;
  appearance: none;
}

.range-slider input[type="range"]::-webkit-slider-runnable-track { background: none; }

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--blue);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.range-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--blue);
  cursor: pointer;
}

.range-slider input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 3px solid rgba(13, 90, 167, 0.4);
}

.results-summary { margin: 0 0 1rem; }

/* One card per society */
.society-list {
  display: grid;
  gap: 1.75rem;
}

.society-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.society-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: #eef5fd;
  border-bottom: 1px solid var(--border);
}

.society-name {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

.society-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.society-contact a {
  color: var(--blue);
  font-weight: 700;
}

.society-count {
  flex-shrink: 0;
  margin-top: 0.4rem;
  color: var(--muted);
}

.society-body { padding: 1.5rem 2rem 2rem; }

.society-bio {
  max-width: 50rem;
  margin: 0 0 1.5rem;
  white-space: pre-line;
}

.package-card-browse { background: #fafafa; }

/* "Not all registered businesses are listed here." */
.browse-note { margin: 0 0 1.25rem; }

/* Blue "OPEN TO SPONSORSHIP" box on business cards. */
.sponsorship-box {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.5rem;
  background: #f3f7fd;
  border: 1px solid #b7cde9;
  border-radius: 12px;
}

.sponsorship-box-label {
  margin: 0 0 0.4rem;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sponsorship-box-text {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.button-compact {
  padding: 0.5rem 1.25rem;
  font-size: 0.95rem;
}

/* Message buttons are disabled until the business is approved. */
.button-compact:disabled { cursor: not-allowed; }

.dialog-actions a.button { display: inline-flex; align-items: center; }

/* "Open to Sponsorship" box */
.sponsorship-card {
  margin-top: 2rem;
  border: 2px solid var(--blue);
}

.sponsorship-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.sponsorship-head .card-title { margin: 0; }

#looking-hint { margin-top: 0.5rem; }

.sponsorship-card form { margin-top: 1.25rem; }

.card textarea.textarea-tinted {
  background: #f3f7fd;
  border-color: #b7cde9;
}

/* On/off switch: a real checkbox underneath, styled as a slider. */
.switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 3.5rem;
  height: 2rem;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;          /* invisible, but still clickable and keyboard-usable */
  cursor: pointer;
  z-index: 1;
}

.slider {
  position: absolute;
  inset: 0;
  background: #c9c9c9;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.slider::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.switch input:checked + .slider { background: var(--blue); }

.switch input:checked + .slider::before { transform: translateX(1.5rem); }

.switch input:focus-visible + .slider {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.switch input:disabled { cursor: wait; }

/* ---- Phones and narrow screens ---- */
/* Below 760px wide: stack the cards and tidy the header. */
@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 1.5rem 1rem;
  }

  .brand,
  .login-box,
  .header-actions {
    grid-column: 1;
    justify-self: center;
  }

  .logo-placeholder { width: 48px; height: 48px; }

  .home { padding: 2rem 1rem 3rem; }

  .choice-cards { grid-template-columns: 1fr; }

  .choice-card { padding: 2rem 1.5rem; }

  .page { padding: 1.5rem 1rem 3rem; }

  .profile-grid { grid-template-columns: 1fr; }

  .card,
  .package-card { padding: 1.25rem; }

  .create-card { min-height: 10rem; }

  .page-head { flex-wrap: wrap; }

  .society-head,
  .society-body { padding-left: 1.25rem; padding-right: 1.25rem; }
}
