/* The account area inside a salon website's frame (pur/compte): Mon espace's
   own stylesheet, stripped of the feed chrome. Loaded by this view only. */

/* Mon espace's stylesheet paints <html> grey; in a frame taller than the
   page that grey showed under the site's own background. */
:root { background: none; }

/* The card follows the page head directly, as on the Boutique: the generic
   section rhythm (72-128px) opened a ~200px gap under the head. */
.pur-account > .site-section { padding-top: 0; }

/* The site theme owns the colour: layouts.site paints --site-primary and
   --site-on-primary from the site's own theme (black on PUR). Re-point Mon
   espace's pink token so the tabs, pills, links and spinner follow it too;
   Glaura pink remains the fallback. */
.site-account {
  --mes-primary: var(--site-primary, #E50050);
  padding: 0;
  border-radius: var(--mes-radius-panel, 18px);
}

.site-account .mes-btn--primary {
  background: var(--site-primary, #E50050);
  color: var(--site-on-primary, #fff);
}

.site-account [hidden] { display: none !important; }

/* The dates are the page's only motion: keep the tab bar visible on mobile
   (mon-espace.css hides it in favour of its segmented control). */
.site-account .mes-tabbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.site-account .mes-tabbar-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.site-account__panel {
  margin-top: 18px;
}

.site-account__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 0;
  color: var(--mes-grey, #939393);
  font-size: 14px;
}

.site-account__loading p { margin: 0; }

.site-account__spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #E2E2E6;
  border-top-color: var(--mes-primary, #E50050);
  border-radius: 50%;
  animation: site-account-spin 0.75s linear infinite;
}

/* bookings.css reads the feed layout's colour variables. */
.site-account .spinner {
  border: 3px solid #E2E2E6;
  border-top-color: var(--mes-primary, #E50050);
}

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

/* Signed-out card */
.site-account__card {
  background: #fff;
  border: 1px solid var(--mes-border, #EFEFEF);
  border-radius: 20px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.site-account__lead {
  margin: 0;
  font-size: 14px;
  color: #6b6b70;
}

.site-account__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.site-account__book-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--mes-primary, #E50050);
  text-decoration: underline;
}

/* Lists */
.site-account__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-account__booking-status {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Booking cards (BookingCardHelpers.createSalonBookingCard), painted here so
   the page does not load the whole provider-services sheet. */
.salon-booking-card {
  width: 100%;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: none;
}

.salon-booking-card__content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
}

.salon-booking-card__details {
  flex: 1;
  min-height: 0;
}

.salon-booking-card__date {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #1a1a1a;
}

.salon-booking-card__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
}

.salon-booking-card__row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.salon-booking-card__row:last-of-type { margin-bottom: 0; }

.salon-booking-card__icon {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: #b58a98;
}

/* Account tab */
.site-account__profile {
  margin: 0;
  background: #fff;
  border: 1px solid var(--mes-border, #EFEFEF);
  border-radius: 16px;
  padding: 8px 18px;
}

.site-account__profile-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.site-account__profile-row + .site-account__profile-row {
  border-top: 1px solid var(--mes-border, #EFEFEF);
}

.site-account__profile-row dt {
  color: var(--mes-grey, #939393);
  font-weight: 600;
  font-size: 14px;
}

.site-account__profile-row dd {
  margin: 0;
  color: var(--mes-near-black, #1c1c1e);
  font-size: 14px;
  text-align: right;
  overflow-wrap: anywhere;
}

.site-account__profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
