/* VIPURI — account area styles (additive; loaded after vipuri.css).
   Everything specific to the /user screens lives here: the account menu,
   list rows, order detail, tickets, notifications, addresses and reviews. */

/* --- Account menu ---------------------------------------------------------
   The theme's main.css turns `.sidebar-menu` into an off-canvas drawer below
   1200px, which hid the account navigation on tablets and phones. The menu
   uses its own class names so it always shows: a vertical list on desktop and
   a scrolling row of chips under the user header at ≤991px. */

.account-menu {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 10px;
}

.account-menu__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  color: hsl(var(--black) / 0.75);
  font-weight: 500;
  transition: 0.2s ease;
}

.account-menu__link .icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: hsl(var(--black) / 0.04);
  font-size: 18px;
  transition: 0.2s ease;
}

.account-menu__arrow {
  margin-left: auto;
  font-size: 14px;
  opacity: 0;
  transform: translateX(-4px);
  transition: 0.2s ease;
}

.account-menu__link:hover,
.account-menu__item.active .account-menu__link {
  background: hsl(var(--base) / 0.08);
  color: hsl(var(--base));
}

.account-menu__link:hover .icon {
  background: hsl(var(--base) / 0.14);
}

.account-menu__item.active .account-menu__link .icon {
  background: hsl(var(--base));
  color: hsl(var(--white));
}

.account-menu__link:hover .account-menu__arrow,
.account-menu__item.active .account-menu__arrow {
  opacity: 1;
  transform: none;
}

.account-menu__item--logout {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid hsl(var(--black) / 0.07);
}

.account-menu__item--logout .account-menu__link:hover {
  background: hsl(var(--danger) / 0.08);
  color: hsl(var(--danger));
}

.account-menu__item--logout .account-menu__link:hover .icon {
  background: hsl(var(--danger) / 0.14);
}

@media screen and (max-width: 991px) {
  .dashboard-sidebar__header {
    padding: 18px 16px;
  }

  .dashboard-user__thumb {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-width: 2px;
  }

  .dashboard-user__thumb--initials {
    font-size: 16px;
  }

  .account-menu {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: 12px;
  }

  .account-menu::-webkit-scrollbar {
    display: none;
  }

  .account-menu__item {
    flex: 0 0 auto;
  }

  .account-menu__item--logout {
    margin: 0;
    padding: 0 0 0 8px;
    border-top: 0;
    border-left: 1px solid hsl(var(--black) / 0.08);
  }

  .account-menu__link {
    gap: 6px;
    height: 36px;
    padding: 0 14px 0 10px;
    border: 1px solid hsl(var(--black) / 0.1);
    border-radius: 999px;
    font-size: 14px;
    white-space: nowrap;
    color: hsl(var(--dark));
  }

  .account-menu__link .icon {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    background: none;
    font-size: 17px;
  }

  .account-menu__link:hover .icon,
  .account-menu__item.active .account-menu__link .icon {
    background: none;
    color: inherit;
  }

  .account-menu__item.active .account-menu__link,
  .account-menu__item.active .account-menu__link:hover {
    background: hsl(var(--base));
    border-color: hsl(var(--base));
    color: hsl(var(--white));
  }

  .account-menu__arrow {
    display: none;
  }
}

/* --- Page heading ---------------------------------------------------------- */

.dashboard-header__action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-header__title {
  overflow-wrap: anywhere;
}

.account-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: -12px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--black) / 0.6);
}

.account-back:hover {
  color: hsl(var(--base));
}

.dashboard-header__action .account-back {
  margin: 0;
}

.account-stack > .checkout-card,
.account-stack > form {
  margin: 0;
}

/* Small inline buttons used inside cards and headers. */
.account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border: 1px solid hsl(var(--black) / 0.12);
  border-radius: 8px;
  background: hsl(var(--white));
  color: hsl(var(--dark));
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: 0.2s ease;
}

.account-btn:hover,
.account-btn:focus-visible {
  border-color: hsl(var(--base));
  color: hsl(var(--base));
}

.account-btn--danger {
  color: hsl(var(--danger));
}

.account-btn--danger:hover,
.account-btn--danger:focus-visible {
  border-color: hsl(var(--danger));
  background: hsl(var(--danger) / 0.06);
  color: hsl(var(--danger));
}

.account-btn:disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* --- Filter tabs (pill chips) --------------------------------------------- */

.account-tabs {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.account-tabs > li {
  flex: 0 0 auto;
}

.account-tabs__btn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border: 1px solid hsl(var(--black) / 0.12);
  border-radius: 999px;
  background: hsl(var(--white));
  color: hsl(var(--dark));
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: 0.2s ease;
}

.account-tabs__btn:hover {
  border-color: hsl(var(--base) / 0.5);
  color: hsl(var(--base));
}

.account-tabs__btn.active,
.account-tabs__btn.active:hover {
  background: hsl(var(--base));
  border-color: hsl(var(--base));
  color: hsl(var(--white));
}

/* --- List rows -------------------------------------------------------------
   `.order-list` rows are reused for orders, payments, tickets and
   notifications. On phones they become a two-line grid: icon + main line +
   amount on top, status pill underneath, so nothing wraps letter by letter. */

.order-list__number,
.order-list__meta {
  overflow-wrap: anywhere;
}

.order-list__item > .status-pill {
  flex-shrink: 0;
}

/* A row that holds a link plus a separate control (notifications). */
.order-list__row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
}

.order-list__row > .order-list__item {
  flex: 1 1 auto;
  min-width: 0;
}

div.order-list__item {
  cursor: default;
}

div.order-list__item:hover {
  background: none;
}

.order-list__row--unread {
  background: hsl(var(--base) / 0.05);
}

.order-list__icon--neutral {
  background: hsl(var(--dark) / 0.06);
  color: hsl(var(--dark));
}

.order-list__title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 600;
  color: hsl(var(--dark));
  overflow-wrap: anywhere;
}

.order-list__row--read .order-list__title {
  font-weight: 500;
}

.account-dot {
  margin-top: 8px;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: hsl(var(--base));
}

.account-icon-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  margin-right: 8px;
  display: grid;
  place-items: center;
  border: 1px solid hsl(var(--black) / 0.12);
  border-radius: 50%;
  background: hsl(var(--white));
  color: hsl(var(--black) / 0.6);
  font-size: 16px;
  transition: 0.2s ease;
}

.account-icon-btn:hover,
.account-icon-btn:focus-visible {
  border-color: hsl(var(--success));
  background: hsl(var(--success) / 0.1);
  color: hsl(var(--success-h) var(--success-s) 35%);
}

@media screen and (max-width: 575px) {
  .order-list__item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas:
      'icon main main'
      'icon pill total';
    column-gap: 12px;
    row-gap: 6px;
    align-items: center;
    padding: 12px 4px;
  }

  .order-list__item > .order-list__icon {
    grid-area: icon;
    align-self: start;
  }

  .order-list__item > .order-list__main {
    grid-area: main;
  }

  .order-list__item > .status-pill {
    grid-area: pill;
    justify-self: start;
  }

  .order-list__item > .order-list__total {
    grid-area: total;
    min-width: 0;
  }

  .order-list__item > .order-list__arrow {
    display: none;
  }

  .order-list__row > .order-list__item {
    grid-template-areas: 'icon main main';
  }

  .dashboard .checkout-card {
    padding: 18px 16px;
  }
}

/* --- Order detail ---------------------------------------------------------- */

.checkout-item__unit {
  display: block;
  font-size: 13px;
  color: hsl(var(--black) / 0.55);
}

.checkout-item__variant {
  display: block;
  font-size: 13px;
  color: hsl(var(--black) / 0.6);
}

.checkout-item__content {
  min-width: 0;
  flex: 1 1 auto;
}

.checkout-item__title {
  overflow-wrap: anywhere;
}

.checkout-item__price {
  flex-shrink: 0;
  white-space: nowrap;
}

.account-detail-text {
  margin: 0;
  line-height: 1.7;
  color: hsl(var(--black) / 0.75);
}

.account-detail-text strong {
  color: hsl(var(--dark));
}

.account-detail-meta {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: hsl(var(--black) / 0.65);
}

.account-detail-meta li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-detail-meta li + li {
  margin-top: 6px;
}

.account-detail-meta i {
  color: hsl(var(--base));
  font-size: 18px;
}

.account-summary {
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-summary li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  color: hsl(var(--black) / 0.75);
}

.account-summary li > span:last-child {
  white-space: nowrap;
  color: hsl(var(--dark));
  font-weight: 500;
}

.account-summary li.account-summary__included {
  padding: 0 0 6px 14px;
  font-size: 13px;
  color: hsl(var(--black) / 0.5);
}

.account-summary li.account-summary__included > span:last-child {
  color: hsl(var(--black) / 0.5);
  font-weight: 400;
}

.account-summary li.account-summary__discount > span:last-child {
  color: hsl(var(--success-h) var(--success-s) 35%);
}

.account-summary__total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px dashed hsl(var(--black) / 0.15);
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 600;
  color: hsl(var(--dark));
}

.account-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: hsl(var(--warning) / 0.12);
  font-size: 14px;
  color: hsl(var(--warning-h) var(--warning-s) 30%);
}

.account-note i {
  font-size: 18px;
  line-height: 1.3;
}

.checkout-card .form-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.form-actions--start {
  justify-content: flex-start;
}

@media screen and (max-width: 575px) {
  .checkout-card .form-actions > .btn {
    flex: 1 1 auto;
  }
}

/* Order progress: oldest at the top, the latest step filled green. */
.order-timeline__dot {
  background: hsl(var(--white));
  border: 2px solid hsl(var(--black) / 0.25);
  box-shadow: none;
}

.order-timeline__item--current .order-timeline__dot {
  background: hsl(var(--success));
  border-color: hsl(var(--success));
  box-shadow: 0 0 0 4px hsl(var(--success) / 0.18);
}

.order-timeline__title {
  margin: 0 0 2px;
  font-size: 15px;
  color: hsl(var(--black) / 0.7);
}

.order-timeline__item--current .order-timeline__title {
  color: hsl(var(--dark));
}

.order-timeline__time {
  display: block;
  font-size: 13px;
  color: hsl(var(--black) / 0.5);
}

.order-timeline__remark {
  margin: 4px 0 0;
  font-size: 14px;
  color: hsl(var(--black) / 0.7);
}

/* --- Support tickets ------------------------------------------------------- */

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticket-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 85%;
}

.ticket-msg--mine {
  align-self: flex-end;
  align-items: flex-end;
}

.ticket-msg__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  padding: 0 4px;
  font-size: 12px;
  color: hsl(var(--black) / 0.5);
}

.ticket-msg__author {
  font-weight: 600;
  color: hsl(var(--dark));
}

.ticket-msg__bubble {
  padding: 12px 16px;
  border-radius: 14px;
  border-top-left-radius: 4px;
  background: hsl(var(--black) / 0.04);
  border: 1px solid hsl(var(--black) / 0.06);
  color: hsl(var(--black) / 0.8);
  overflow-wrap: anywhere;
}

.ticket-msg--mine .ticket-msg__bubble {
  border-top-left-radius: 14px;
  border-top-right-radius: 4px;
  background: hsl(var(--base) / 0.1);
  border-color: hsl(var(--base) / 0.18);
}

.ticket-msg__text {
  margin: 0;
  white-space: pre-line;
}

.ticket-msg .ticket-attachments {
  margin-top: 10px;
}

.ticket-reply {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid hsl(var(--black) / 0.07);
}

.ticket-closed-note {
  margin: 20px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: hsl(var(--black) / 0.04);
  font-size: 14px;
  color: hsl(var(--black) / 0.6);
  text-align: center;
}

@media screen and (max-width: 575px) {
  .ticket-msg {
    max-width: 92%;
  }
}

/* --- Addresses ------------------------------------------------------------- */

.account-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.address-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.address-card__icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: hsl(var(--base) / 0.1);
  color: hsl(var(--base));
  font-size: 20px;
}

.address-card__title {
  margin: 0;
  font-size: 16px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.address-card__head .status-pill {
  margin-left: auto;
  flex-shrink: 0;
}

.address-card__body {
  margin: 0;
  line-height: 1.7;
  color: hsl(var(--black) / 0.7);
  overflow-wrap: anywhere;
}

.address-card__body strong {
  color: hsl(var(--dark));
  font-weight: 600;
}

.address-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid hsl(var(--black) / 0.06);
}

.address-card--editing {
  border-color: hsl(var(--base) / 0.5);
  box-shadow: 0 0 0 3px hsl(var(--base) / 0.12);
}

/* --- Reviews --------------------------------------------------------------- */

.review-thumb {
  display: block;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 12px;
  object-fit: cover;
  background: hsl(var(--black) / 0.04);
  border: 1px solid hsl(var(--black) / 0.06);
}

.review-card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
}

.review-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.review-card__name {
  margin: 0 0 8px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.review-card__name a {
  color: hsl(var(--dark));
}

.review-card__name a:hover {
  color: hsl(var(--base));
}

.review-card__status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.review-stars {
  display: inline-flex;
  gap: 2px;
  color: hsl(var(--black) / 0.2);
  font-size: 15px;
}

.review-stars .is-on {
  color: #f7b500;
}

.review-star-input {
  display: flex;
  gap: 4px;
}

.review-star-input button {
  padding: 0;
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: hsl(var(--black) / 0.2);
}

.review-star-input button.is-on {
  color: #f7b500;
}

/* Empty states read as a heading, not fine print. */
.account-empty__title {
  font-size: 17px;
}

.order-list__row + .order-list__row--unread,
.order-list__row--unread + .order-list__row {
  margin-top: 4px;
}
