/* Basildon Delivery customer interface
 *
 * Loaded after assets/ui.css on customer-facing account pages.
 * Keep rules scoped to customer pages so changes cannot leak into the
 * client, rider, admin, or general storefront interfaces.
 */


/* Customer account, orders, addresses and support shell - April 2026
 * Extracted from assets/ui.css during CSS architecture phase 2. */
.customer-profile-card h2 {
  margin: 0 0 4px;
}

.customer-avatar {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 22px;
  background: linear-gradient(135deg, #102a43, #186faf);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(24, 111, 175, 0.18);
}

.customer-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-account-layout {
  margin-top: 18px;
}

.customer-account-panel {
  margin-bottom: 18px;
}

.customer-order-list,
.customer-address-list {
  display: grid;
  gap: 14px;
}

.customer-order-card,
.customer-address-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(188, 204, 220, 0.8);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.055);
}

.customer-order-card h3,
.customer-address-card h3 {
  margin: 0 0 5px;
}

.customer-order-card p,
.customer-address-card p {
  margin: 0;
  color: var(--muted);
}

.customer-order-card-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  text-align: right;
}

.customer-order-card-side strong {
  font-size: 1.1rem;
}

.customer-order-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: 18px;
}

.customer-order-hero h1 {
  margin: 0;
  letter-spacing: -0.045em;
}

.customer-address-card {
  align-items: flex-start;
  flex-direction: column;
}

.customer-address-card .shop-form-actions {
  width: 100%;
}

@media (max-width: 760px) {
  .customer-order-card,
  .customer-order-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-order-card-side {
    justify-content: flex-start;
    text-align: left;
  }
}

/* Customer registration international phone field - July 2026 */
.international-phone-field {
  display: grid;
  gap: 7px;
}

.international-phone-field > .field-label {
  color: var(--text);
  font-weight: 700;
}

.international-phone-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.international-phone-row select,
.international-phone-row input {
  min-width: 0;
}

.international-phone-field small {
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 560px) {
  .international-phone-row {
    grid-template-columns: 1fr;
  }
}


/* Customer registration terms row - July 2026 */
.form-grid .customer-registration-terms {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.45;
}

.form-grid .customer-registration-terms input[type="checkbox"] {
  flex: 0 0 auto;
  width: auto;
  margin: 3px 0 0;
  padding: 0;
}

.form-grid .customer-registration-terms span {
  min-width: 0;
}

/* Customer account dashboard: use the page's normal document scroll. */
@media (min-width: 981px) {
  .customer-account-layout > .shop-summary-aside {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* Customer dashboard visual polish - July 2026 */
.customer-dashboard-page {
  --customer-brand-green: #73bf43;
  --customer-brand-green-deep: #277247;
  --customer-brand-ink: #0f2f46;
  background-color: #eef8f1;
  background-image:
    radial-gradient(circle at 12% 4%, rgba(115, 191, 67, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(24, 111, 175, 0.14), transparent 30rem),
    linear-gradient(180deg, #eef8f1 0%, #f1faf4 310px, #edf7f1 100%);
}

.customer-dashboard-page .app-shell {
  position: relative;
  isolation: isolate;
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 48px;
  overflow: visible;
}

.customer-dashboard-page .app-shell::before,
.customer-dashboard-page .app-shell::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: clamp(250px, 32vw, 440px);
  aspect-ratio: 1;
  background: url("../img/basildon-delivery-icon.png") center / contain no-repeat;
  opacity: 0.032;
  pointer-events: none;
}

.customer-dashboard-page .app-shell::before {
  left: clamp(-210px, -13vw, -120px);
  top: 540px;
  transform: rotate(16deg);
}

.customer-dashboard-page .app-shell::after {
  right: clamp(-220px, -14vw, -125px);
  top: 1080px;
  transform: rotate(-14deg);
}

/* Keep dashboard artwork behind the page content without overriding the
   shared sticky positioning used by the customer navigation. */
.customer-dashboard-page .app-shell > *:not(.shop-topnav) {
  position: relative;
  z-index: 1;
}

.customer-dashboard-page .customer-account-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
}

/* Keep the dashboard as separate cards rather than placing them inside one
   large blue-grey hero panel. */
.customer-dashboard-page .customer-account-hero::before,
.customer-dashboard-page .customer-account-hero::after {
  display: none;
}

.customer-dashboard-page .customer-account-hero .shop-hero-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid rgba(188, 204, 220, 0.72);
  border-radius: 28px;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.98) 0%, rgba(237, 255, 243, 0.97) 58%, rgba(245, 253, 248, 0.96) 100%);
  box-shadow: 0 18px 46px rgba(15, 47, 70, 0.10);
}

.customer-dashboard-page .customer-account-hero .shop-hero-copy::after {
  content: "";
  position: absolute;
  right: clamp(-74px, -5vw, -30px);
  bottom: clamp(-94px, -7vw, -54px);
  width: clamp(210px, 27vw, 350px);
  aspect-ratio: 1;
  background: url("../img/basildon-delivery-icon.png") center / contain no-repeat;
  opacity: 0.055;
  transform: rotate(-10deg);
  pointer-events: none;
}

.customer-dashboard-page .customer-account-hero .shop-hero-copy > * {
  position: relative;
  z-index: 1;
}

.customer-dashboard-page .customer-account-hero .page-kicker,
.customer-dashboard-page .customer-account-panel .page-kicker {
  color: var(--customer-brand-green-deep);
}

.customer-dashboard-page .customer-account-hero h1,
.customer-dashboard-page .customer-account-panel h2,
.customer-dashboard-page .shop-summary-aside .shop-panel h2 {
  color: var(--customer-brand-ink);
}

.customer-dashboard-page .customer-account-hero .shop-hero-copy > p:not(.page-kicker) {
  max-width: 62ch;
  color: #34516a;
  line-height: 1.62;
}

.customer-dashboard-page .customer-profile-card {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid rgba(39, 114, 71, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(15, 47, 70, 0.10);
}

.customer-dashboard-page .customer-avatar {
  background: linear-gradient(135deg, var(--customer-brand-green), var(--customer-brand-green-deep));
  box-shadow: 0 14px 28px rgba(39, 114, 71, 0.20);
}

.customer-dashboard-page .customer-summary-grid div {
  border-color: rgba(39, 114, 71, 0.16);
  background: rgba(247, 255, 249, 0.82);
}

.customer-dashboard-page .shop-panel {
  border-color: rgba(188, 204, 220, 0.72);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 42px rgba(15, 47, 70, 0.085);
  backdrop-filter: blur(10px);
}

.customer-dashboard-page .customer-account-panel {
  padding: clamp(18px, 3vw, 24px);
}

.customer-dashboard-page .customer-order-card {
  border-color: rgba(188, 204, 220, 0.68);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 255, 249, 0.90));
  box-shadow: 0 10px 28px rgba(15, 47, 70, 0.065);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.customer-dashboard-page .customer-order-card:hover {
  transform: translateY(-2px);
  border-color: rgba(39, 114, 71, 0.26);
  box-shadow: 0 16px 34px rgba(15, 47, 70, 0.10);
}

.customer-dashboard-page .button.primary {
  border-color: rgba(39, 114, 71, 0.22);
  background: var(--customer-brand-green-deep);
}

.customer-dashboard-page .shop-text-link {
  color: var(--customer-brand-green-deep);
}

.customer-dashboard-page .shop-summary-aside .shop-panel {
  position: relative;
  overflow: hidden;
}

.customer-dashboard-page .shop-summary-aside .shop-panel::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 108px;
  aspect-ratio: 1;
  background: url("../img/basildon-delivery-icon.png") center / contain no-repeat;
  opacity: 0.022;
  transform: rotate(-12deg);
  pointer-events: none;
}

.customer-dashboard-page .shop-summary-aside .shop-panel > * {
  position: relative;
  z-index: 1;
}


@media (max-width: 980px) {
  .customer-dashboard-page .customer-account-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .customer-dashboard-page .app-shell::before,
  .customer-dashboard-page .app-shell::after {
    display: none;
  }

  .customer-dashboard-page .customer-account-hero .shop-hero-copy::after {
    right: -76px;
    bottom: -76px;
    width: 230px;
    opacity: 0.04;
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-dashboard-page .customer-account-hero,
  .customer-dashboard-page .customer-account-hero::before,
  .customer-dashboard-page .customer-account-hero::after {
    animation: none;
  }

  .customer-dashboard-page .customer-order-card {
    transition: none;
  }
}

/* Customer dashboard structural wrappers: keep the layout, not the tinted sheet. */
.customer-dashboard-page .app-shell,
.customer-dashboard-page .customer-account-layout,
.customer-dashboard-page .customer-account-layout > .shop-summary-aside {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0;
  box-shadow: none;
}

/* Customer dashboard: keep the page background clean between cards. */
.customer-dashboard-page .customer-account-hero .shop-hero-copy,
.customer-dashboard-page .customer-profile-card,
.customer-dashboard-page .shop-panel,
.customer-dashboard-page .customer-order-card {
  box-shadow: none !important;
}

.customer-dashboard-page .shop-panel {
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.customer-dashboard-page .customer-order-card:hover {
  transform: none;
  box-shadow: none !important;
}

/* Customer order detail: failed delivery refund summary polish - July 2026 */
.ui-interface-customer .customer-refund-card {
  margin: 0 0 18px;
  padding: clamp(20px, 2.5vw, 28px);
  border: 1px solid rgba(188, 204, 220, 0.88);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.ui-interface-customer .customer-refund-card--summary {
  background:
    radial-gradient(circle at top right, rgba(115, 191, 67, 0.12), transparent 13rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 251, 247, 0.98));
}

.ui-interface-customer .customer-refund-card--pending {
  background:
    radial-gradient(circle at top right, rgba(24, 111, 175, 0.08), transparent 12rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98));
}

.ui-interface-customer .customer-refund-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.ui-interface-customer .customer-refund-card__header h2 {
  margin: 4px 0 0;
  letter-spacing: -0.04em;
}

.ui-interface-customer .customer-refund-card__intro {
  margin: 0 0 18px;
  max-width: 78ch;
  color: var(--text);
}

.ui-interface-customer .customer-refund-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid transparent;
}

.ui-interface-customer .customer-refund-status-pill.retained {
  color: #0f5c3b;
  background: rgba(115, 191, 67, 0.16);
  border-color: rgba(115, 191, 67, 0.28);
}

.ui-interface-customer .customer-refund-status-pill.full {
  color: #0e5a80;
  background: rgba(24, 111, 175, 0.12);
  border-color: rgba(24, 111, 175, 0.2);
}

.ui-interface-customer .customer-refund-status-pill.pending {
  color: #8b5200;
  background: rgba(255, 198, 106, 0.2);
  border-color: rgba(232, 166, 59, 0.26);
}

.ui-interface-customer .customer-refund-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.ui-interface-customer .customer-refund-metric {
  min-width: 0;
  padding: 16px 17px;
  border-radius: 22px;
  border: 1px solid rgba(188, 204, 220, 0.82);
  background: rgba(255, 255, 255, 0.9);
}

.ui-interface-customer .customer-refund-metric--primary {
  background: linear-gradient(135deg, rgba(39, 114, 71, 0.08), rgba(24, 111, 175, 0.12));
  border-color: rgba(39, 114, 71, 0.15);
}

.ui-interface-customer .customer-refund-metric--retained {
  background: linear-gradient(135deg, rgba(255, 198, 106, 0.14), rgba(255, 255, 255, 0.94));
  border-color: rgba(232, 166, 59, 0.2);
}

.ui-interface-customer .customer-refund-metric__label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.ui-interface-customer .customer-refund-metric__value {
  display: block;
  color: var(--customer-brand-ink);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.ui-interface-customer .customer-refund-note {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(15, 47, 70, 0.045);
  color: var(--text);
}

.ui-interface-customer .customer-refund-note strong {
  color: var(--customer-brand-ink);
}

@media (max-width: 760px) {
  .ui-interface-customer .customer-refund-card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ui-interface-customer .customer-refund-status-pill {
    min-height: 34px;
  }

  .ui-interface-customer .customer-refund-metrics {
    grid-template-columns: 1fr;
  }
}
