/* =============================================================================
   My Account — the shell shared by Profile and My Bookings.

   A cover band, a sticky left rail, and a content column. Both pages use it, so
   moving between them feels like staying in one place rather than visiting two
   unrelated screens.
   ============================================================================= */

/* The band the shell pulls up over. Purely decorative, hence aria-hidden in the
   markup — it carries no information a screen reader needs.

   _Layout wraps every page in .container, so without breaking out the band
   would stop at the container's max-width and leave white gutters either side.
   This is the site's established full-bleed escape (see site.css) — the
   overflow-x:hidden on html/body there absorbs the scrollbar-width overshoot
   that 100vw causes on Windows. */
.acc-hero {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  height: 190px;
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(255, 255, 255, 0.16) 0%, transparent 55%),
    linear-gradient(135deg, #0f1b2d 0%, #1d3358 55%, #33507a 100%);
}

.acc-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 1.5rem;
  max-width: 1120px;
  margin: -110px auto 4rem;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

.acc-main {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 0;
}

/* ---------- Cards ---------- */
.acc-card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 1rem;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.04);
}

.acc-card-head {
  margin-bottom: 1.15rem;
}

.acc-card-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f1b2d;
}

.acc-card-head p {
  margin: 0;
  font-size: 0.84rem;
  color: #64748b;
}

/* ---------- Sidebar ---------- */
.acc-rail {
  position: sticky;
  top: 1.25rem;
  align-self: start;
}

.acn {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 1rem;
  padding: 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.04);
}

.acn-id {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.55rem 0.9rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.5rem;
  min-width: 0;
}

.acn-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d3358, #33507a);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.acn-id-text {
  min-width: 0;
}

.acn-id-text b {
  display: block;
  font-size: 0.9rem;
  color: #0f1b2d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acn-id-text small {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acn-label {
  padding: 0.6rem 0.6rem 0.25rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #a3aebd;
}

.acn-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.6rem;
  border-radius: 0.6rem;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.acn-item:hover {
  background: #f6f9fc;
  color: #0f1b2d;
}

.acn-item.is-active {
  background: #eef4ff;
  color: #1d3358;
}

.acn-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  opacity: 0.75;
}

.acn-item.is-active svg {
  opacity: 1;
}

.acn-item span {
  flex: 1 1 auto;
}

.acn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9534f;
  flex: 0 0 auto;
}

.acn-count {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #64748b;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
}

.acn-item.is-active .acn-count {
  background: #1d3358;
  color: #fff;
}

.acn-signout {
  margin: 0.5rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}

.acn-signout button {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.62rem 0.6rem;
  border: 0;
  border-radius: 0.6rem;
  background: none;
  color: #94a3b8;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.acn-signout button:hover {
  background: #fdf1ef;
  color: #b4483a;
}

.acn-signout svg {
  width: 16px;
  height: 16px;
}

/* ---------- Identity card ---------- */
.acc-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 1.1rem;
  align-items: center;
}

.acc-identity-avatar {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d3358, #33507a);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
}

.acc-identity-text h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f1b2d;
}

.acc-identity-text p {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.acc-progress {
  grid-column: 2;
}

.acc-progress-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.acc-progress-top span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1d3358;
}

.acc-progress-top small {
  font-size: 0.74rem;
  color: #94a3b8;
}

.acc-progress-track {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.acc-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1d3358, #4d7ec0);
  transition: width 0.35s ease;
}

/* ---------- Tabs ----------
   Pills on a card rather than an underline, so they read as switching what the
   panel below contains — distinct from the bookings page, where the underlined
   product tabs are page-level navigation. */
.acc-tabs {
  display: flex;
  gap: 0.3rem;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 0.8rem;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.04);
  overflow-x: auto;
  scrollbar-width: none;
}

.acc-tabs::-webkit-scrollbar {
  display: none;
}

.acc-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  justify-content: center;
  padding: 0.62rem 1.1rem;
  border: 0;
  border-radius: 0.6rem;
  background: none;
  color: #64748b;
  font: inherit;
  font-size: 0.89rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.acc-tab:hover {
  background: #f6f9fc;
  color: #0f1b2d;
}

.acc-tab.is-active {
  background: #0f1b2d;
  color: #fff;
}

.acc-tab svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.acc-tab.is-active svg {
  opacity: 1;
}

.acc-tabpanel {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.acc-tabpanel[hidden] {
  display: none;
}

/* ---------- Form ---------- */
.acc-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.acc-grid {
  display: grid;
  /* min() guards the floor so the pair cannot overflow a narrow window before
     the single-column breakpoint takes over. */
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 1rem 1.15rem;
}

.acc-field {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-width: 0;
}

.acc-field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7b8595;
}

.acc-input {
  width: 100%;
  padding: 0.68rem 0.85rem;
  border: 1px solid #dde5ef;
  border-radius: 0.6rem;
  background: #fff;
  color: #0f1b2d;
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.acc-input:focus {
  outline: none;
  border-color: #4d7ec0;
  box-shadow: 0 0 0 3px rgba(77, 126, 192, 0.14);
}

select.acc-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2394a3b8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}

/* A locked field looks like a field so the layout does not break, but is
   visibly not one — no white background, no caret. */
.acc-input-locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #f6f8fb;
  color: #64748b;
  cursor: not-allowed;
}

.acc-input-locked span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-input-locked svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  opacity: 0.6;
}

/* Document numbers are read back character by character, so they get a face
   that distinguishes 0 from O. */
.acc-input-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.acc-hint {
  font-size: 0.73rem;
  color: #94a3b8;
}

.acc-err {
  font-size: 0.75rem;
  color: #b4483a;
}

.acc-err:empty {
  display: none;
}

.acc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid #f1f5f9;
}

.acc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border: 1px solid #dde5ef;
  border-radius: 0.6rem;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.acc-btn-primary {
  border-color: #0f1b2d;
  background: #0f1b2d;
  color: #fff;
}

.acc-btn-primary:hover {
  border-color: #1d3358;
  background: #1d3358;
}

/* ---------- Flashes ---------- */
.acc-flash {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.05rem;
  border-radius: 0.7rem;
  font-size: 0.88rem;
}

.acc-flash svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.acc-flash-ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #2f6b4a;
}

.acc-flash-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b4483a;
}

/* The validation summary renders an empty div when there is nothing to say. */
.acc-flash-error:empty,
.acc-flash-error.validation-summary-valid {
  display: none;
}

/* ---------- Password form ----------
   _ChangePasswordForm is shared with the auth pages, so these class names are
   fixed by that partial rather than chosen here. */
.acc-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  border: 1px solid #dde5ef;
  border-radius: 0.6rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.acc-input-wrap:focus-within {
  border-color: #4d7ec0;
  box-shadow: 0 0 0 3px rgba(77, 126, 192, 0.14);
}

.acc-input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.68rem 0;
  border: 0;
  background: none;
  color: #0f1b2d;
  font: inherit;
  font-size: 0.92rem;
}

.acc-input-wrap input:focus {
  outline: none;
}

.acc-input-icon {
  display: inline-flex;
  color: #94a3b8;
}

.acc-input-icon svg {
  width: 16px;
  height: 16px;
}

.acc-toggle-pw {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
  border: 0;
  background: none;
  color: #94a3b8;
  cursor: pointer;
}

.acc-toggle-pw:hover {
  color: #475569;
}

.acc-toggle-pw svg {
  width: 16px;
  height: 16px;
}

.acc-strength {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.acc-strength-bar {
  flex: 1 1 auto;
  height: 5px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.acc-strength-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: #d9534f;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.acc-strength[data-level="2"] .acc-strength-bar span { background: #d98b34; }
.acc-strength[data-level="3"] .acc-strength-bar span { background: #4d7ec0; }
.acc-strength[data-level="4"] .acc-strength-bar span { background: #2f8b57; }

.acc-strength-label {
  font-size: 0.73rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.acc-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.68rem 1.5rem;
  border: 0;
  border-radius: 0.6rem;
  background: #0f1b2d;
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.acc-submit:hover {
  background: #1d3358;
}

.acc-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: acc-spin 0.7s linear infinite;
}

.acc-submit.is-busy .acc-spinner {
  display: inline-block;
}

@keyframes acc-spin {
  to { transform: rotate(360deg); }
}

.acc-form .text-danger {
  font-size: 0.75rem;
  color: #b4483a;
}

/* ---------- Bookings inside the shell ---------- */
/* my-bookings.css sizes .mb-shell as a standalone page; inside the account
   shell the rail already provides the width and gutter. */
.acc-main.mb-shell {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .acc-shell {
    grid-template-columns: 1fr;
    margin-top: -90px;
  }

  .acc-rail {
    position: static;
  }

  /* The rail becomes a horizontal strip so it costs one row rather than a
     screen's worth of scrolling before the content starts. */
  .acn {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .acn::-webkit-scrollbar {
    display: none;
  }

  .acn-id,
  .acn-label {
    display: none;
  }

  .acn-item,
  .acn-signout {
    flex: 0 0 auto;
    margin: 0;
    padding-top: 0;
    border: 0;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .acc-hero {
    height: 150px;
  }

  .acc-shell {
    margin-top: -80px;
    padding-inline: 0.9rem;
  }

  .acc-card {
    padding: 1.15rem;
  }

  .acc-identity {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .acc-identity-avatar {
    width: 54px;
    height: 54px;
    font-size: 1.15rem;
  }

  .acc-identity-text h1 {
    font-size: 1.15rem;
  }

  /* Below this width the two-column identity grid squeezes the bar to nothing,
     so it takes its own full-width row. */
  .acc-progress {
    grid-column: 1 / -1;
    margin-top: 0.7rem;
  }

  .acc-actions {
    justify-content: stretch;
  }

  .acc-actions .acc-btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .acc-input,
  .acc-btn,
  .acn-item,
  .acn-signout button,
  .acc-progress-fill,
  .acc-input-wrap,
  .acc-strength-bar span {
    transition: none;
  }

  /* The spinner still needs to read as "working", so it slows rather than
     stopping — a frozen spinner looks like a hang. */
  .acc-spinner {
    animation-duration: 2.4s;
  }
}

/* ============================================================================
   My enquiries — replaces the old bookings list. Read-only cards: an enquiry is
   progressed by an agent in the CRM, so there is nothing here to act on beyond
   reopening the page it came from.
   ========================================================================== */

.enq-list { display: grid; gap: var(--pt-gap); }

.enq {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--pt-gap);
    align-items: start;
    padding: var(--pt-gap-lg);
    background: var(--pt-paper);
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-radius-lg);
    transition: border-color .25s var(--pt-ease), box-shadow .25s var(--pt-ease);
}

.enq:hover { border-color: var(--pt-blue-200); box-shadow: var(--pt-shadow); }

@media (min-width: 720px) {
    .enq { grid-template-columns: auto 1fr auto; align-items: center; }
}

.enq__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 13px;
    background: var(--pt-blue-100);
    color: var(--pt-blue-600);
}

.enq__icon svg { width: 20px; height: 20px; }

.enq__body { min-width: 0; }

.enq__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    margin-bottom: .3rem;
}

.enq__top h3 { font-size: var(--pt-text-lg); margin: 0; }

.enq__status--open { background: var(--pt-blue-100); color: var(--pt-blue-700); }
.enq__status--won { background: var(--pt-success-soft); color: var(--pt-success); }
.enq__status--closed { background: var(--pt-sand-deep); color: var(--pt-slate-600); }

.enq__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .75rem;
    margin: 0 0 .4rem;
    font-size: var(--pt-text-sm);
    color: var(--pt-text-faint);
}

/* Dot separators drawn rather than typed, so they never wrap onto a line of
   their own. */
.enq__meta > span + span::before { content: "·"; margin-right: .75rem; opacity: .55; }

.enq__note {
    margin: 0 0 .4rem;
    color: var(--pt-slate-700);
    font-size: var(--pt-text-sm);
    line-height: 1.6;
    white-space: pre-line;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.enq__sent { margin: 0; font-size: var(--pt-text-xs); color: var(--pt-slate-400); }
