/* ZGO Support (Awesome Support inside My Account) — v0.3.0
   Loaded only on /my-account/support/* ; every rule is scoped to .zgo-support. */

.zgo-support {
  --zs-pink: var(--z-pink, #ff2d78);
  --zs-pink-600: var(--z-pink-600, #e61e66);
  --zs-pink-50: var(--z-pink-50, #fff0f5);
  --zs-ink: var(--z-ink, #080c1c);
  --zs-g700: var(--z-g700, #334155);
  --zs-g600: var(--z-g600, #475569);
  --zs-g500: var(--z-g500, #64748b);
  --zs-g300: var(--z-g300, #cbd5e1);
  --zs-g200: var(--z-g200, #e2e8f0);
  --zs-g100: var(--z-g100, #f1f5f9);
  --zs-g50: var(--z-g50, #f8fafc);
  --zs-r: var(--z-r, 16px);
  font-family: var(--z-font, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  color: var(--zs-g700);
  font-size: 15px;
  line-height: 1.55;
  min-width: 0;
}
.zgo-support *, .zgo-support *::before, .zgo-support *::after { box-sizing: border-box; }

/* ——— Header ——— */
.zgo-support__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
}
.zgo-support__title {
  margin: 0 0 4px !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: -.01em;
  color: var(--zs-ink) !important;
  overflow-wrap: anywhere;
}
.zgo-support__lead, .zgo-support__meta {
  margin: 0 !important;
  font-size: 14px !important;
  color: var(--zs-g500) !important;
}
.zgo-support__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.zgo-support__meta span + span::before { content: "·"; margin-right: 14px; color: var(--zs-g300); }
.zgo-support__meta a { color: var(--zs-pink) !important; font-weight: 700; text-decoration: none; }
.zgo-support__back {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 14px;
  font-size: 14px; font-weight: 700;
  color: var(--zs-g600) !important;
  text-decoration: none !important;
}
.zgo-support__back:hover { color: var(--zs-pink) !important; }
.zgo-support__h3 { margin: 0 0 12px !important; font-size: 16px !important; font-weight: 800 !important; color: var(--zs-ink) !important; }
.zgo-muted { color: var(--zs-g300); }

/* ——— Buttons (pill) ——— */
.zgo-support .zgo-support__btn,
.zgo-support .wpas-form button[type="submit"],
.zgo-support .wpas-form .wpas-btn {
  display: inline-flex !important;
  align-items: center; justify-content: center;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 22px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--zs-pink) !important;
  color: #fff !important;
  font: 800 15px/1 var(--z-font, inherit) !important;
  letter-spacing: -.01em;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 10px 22px -10px rgba(255,45,120,.7) !important;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.zgo-support .zgo-support__btn:hover,
.zgo-support .wpas-form button[type="submit"]:hover { background: var(--zs-pink-600) !important; transform: translateY(-1px); }
.zgo-support .zgo-support__btn--ghost {
  background: #fff !important;
  color: var(--zs-ink) !important;
  border: 1.5px solid var(--zs-g200) !important;
  box-shadow: none !important;
  min-height: 40px;
  padding: 0 18px !important;
  font-size: 14px !important;
}
.zgo-support .zgo-support__btn--ghost:hover { background: var(--zs-pink-50) !important; border-color: var(--zs-pink) !important; color: var(--zs-pink) !important; }

/* ——— Status pills ——— */
.zgo-pill {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 11px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 800; line-height: 1;
  white-space: nowrap;
  background: var(--zs-g100); color: var(--zs-g600);
}
.zgo-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; opacity: .9; }
.zgo-pill--open     { background: var(--z-teal-50, #e6faf6); color: var(--z-teal-600, #00a88c); }
.zgo-pill--progress { background: #eef2ff; color: #4f46e5; }
.zgo-pill--hold     { background: var(--z-yellow-50, #fffbe0); color: #a16207; }
.zgo-pill--closed   { background: var(--zs-g100); color: var(--zs-g500); }
.zgo-pill--new      { background: var(--zs-pink-50); color: var(--zs-pink); }

/* ——— Ticket list ——— */
.zgo-tickets {
  border: 1px solid var(--zs-g200);
  border-radius: var(--zs-r);
  overflow: hidden;
  background: #fff;
}
.zgo-tickets__row {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 128px 70px 132px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--zs-g100);
  font-size: 14.5px;
  color: var(--zs-ink);
  transition: background .12s ease;
}
.zgo-tickets__row:last-child { border-bottom: 0; }
.zgo-tickets__row:not(.zgo-tickets__row--head):hover { background: var(--zs-g50); }
.zgo-tickets__row--head {
  background: var(--zs-g50);
  border-bottom: 1px solid var(--zs-g200);
  padding-top: 11px; padding-bottom: 11px;
  font-size: 11.5px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--zs-g500);
}
.zgo-tickets__id { font-weight: 800; color: var(--zs-g500); font-variant-numeric: tabular-nums; }
.zgo-tickets__subject { min-width: 0; }
.zgo-support a.zgo-tickets__link {
  color: var(--zs-ink) !important;
  font-weight: 700;
  text-decoration: none !important;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
/* whole row clickable */
.zgo-support a.zgo-tickets__link::after { content: ""; position: absolute; inset: 0; }
.zgo-tickets__row:hover a.zgo-tickets__link { color: var(--zs-pink) !important; }
.zgo-tickets__row.is-unread a.zgo-tickets__link { font-weight: 800; }
.zgo-tickets__status { display: flex; flex-wrap: wrap; gap: 6px; }
.zgo-tickets__order a { position: relative; z-index: 1; color: var(--zs-pink) !important; font-weight: 700; text-decoration: none !important; }
.zgo-tickets__updated { color: var(--zs-g500); font-size: 13.5px; white-space: nowrap; }
.zgo-support__pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }

/* ——— Empty state ——— */
.zgo-support__empty {
  text-align: center;
  padding: 36px 20px;
  border: 1.5px dashed var(--zs-g200);
  border-radius: var(--zs-r);
  background: var(--zs-g50);
}
.zgo-support__empty-icon {
  width: 48px; height: 48px; margin: 0 auto 10px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--zs-pink-50); color: var(--zs-pink);
  font-weight: 800; font-size: 22px;
}
.zgo-support__empty-title { margin: 0 0 4px !important; font-size: 17px !important; font-weight: 800; color: var(--zs-ink) !important; }
.zgo-support__empty p { margin: 0 0 16px; color: var(--zs-g500); }

/* ——— Cards / forms ——— */
.zgo-support__card {
  border: 1px solid var(--zs-g200);
  border-radius: var(--zs-r);
  background: #fff;
  padding: 20px;
}
.zgo-support__form { padding: 22px; }
/* plugin chrome we do not need here */
.zgo-support .wpas-ticket-buttons-top,
.zgo-support .wpas-reply .checkbox,
.zgo-support #wpas-new-reply .checkbox,
.zgo-support .wpas-link-privacy,
.zgo-support .wpas-credit,
.zgo-support .wpas-pagi { display: none !important; }
.zgo-support .wpas, .zgo-support .wpas .container { margin: 0 !important; padding: 0 !important; max-width: none !important; width: auto !important; }

.zgo-support .wpas-form-group { margin: 0 0 16px; }
.zgo-support .wpas-form label {
  display: block;
  margin: 0 0 6px !important;
  font-size: 13px !important; font-weight: 700 !important;
  color: var(--zs-g700) !important;
}
.zgo-support .wpas-form input[type="text"],
.zgo-support .wpas-form select,
.zgo-support .wpas-form textarea {
  display: block;
  width: 100% !important;
  min-height: 48px;
  padding: 11px 14px !important;
  border: 1.5px solid var(--zs-g200) !important;
  border-radius: 14px !important;
  background: #fff !important;
  font: 400 16px/1.5 var(--z-font, inherit) !important;
  color: var(--zs-ink) !important;
  box-shadow: none !important;
}
.zgo-support .wpas-form select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px !important;
  background: #fff 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='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center !important;
}
.zgo-support .wpas-form textarea { min-height: 150px; resize: vertical; }
.zgo-support .wpas-form input:focus,
.zgo-support .wpas-form select:focus,
.zgo-support .wpas-form textarea:focus {
  border-color: var(--zs-pink) !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px rgba(255,45,120,.15) !important;
}

/* Attachments field styled as a drop zone (native multi-file input, works with or without JS) */
.zgo-support #wpas_files_wrapper { position: relative; }
.zgo-support input[type="file"].wpas-form-control {
  display: block;
  width: 100% !important;
  height: auto !important;
  min-height: 68px;
  padding: 16px 16px 16px 46px !important;
  border: 1.5px dashed var(--zs-g300) !important;
  border-radius: 14px !important;
  background: var(--zs-g50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ff2d78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E") no-repeat 16px center !important;
  font: 500 14px/1.4 var(--z-font, inherit) !important;
  color: var(--zs-g600) !important;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.zgo-support input[type="file"].wpas-form-control:hover,
.zgo-support input[type="file"].wpas-form-control:focus { border-color: var(--zs-pink) !important; background-color: var(--zs-pink-50) !important; outline: 0; }
.zgo-support input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 8px 14px;
  border: 1.5px solid var(--zs-g200);
  border-radius: 999px;
  background: #fff;
  font: 700 13px/1 var(--z-font, inherit);
  color: var(--zs-ink);
  cursor: pointer;
}
.zgo-support .wpas-help-block { margin: 8px 0 0 !important; font-size: 12.5px !important; color: var(--zs-g500) !important; line-height: 1.5; }
.zgo-support .wpas-help-block code { padding: 0; background: none; font: inherit; color: inherit; }
.zgo-support .wpas-form button[type="submit"] { margin-top: 4px; }

/* ——— Thread ——— */
.zgo-thread { display: grid; gap: 14px; margin: 0 0 20px; }
.zgo-msg {
  max-width: 88%;
  padding: 14px 16px 16px;
  border: 1px solid var(--zs-g200);
  border-radius: 18px;
  background: #fff;
}
.zgo-msg--customer { justify-self: end; background: var(--zs-pink-50); border-color: #ffd3e3; border-bottom-right-radius: 6px; }
.zgo-msg--support  { justify-self: start; background: var(--zs-g50); border-bottom-left-radius: 6px; }
.zgo-msg__head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.zgo-msg__avatar {
  flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff;
  background: var(--zs-ink);
}
.zgo-msg--customer .zgo-msg__avatar { background: var(--zs-pink); }
.zgo-msg__who { font-size: 14px; font-weight: 800; color: var(--zs-ink); }
.zgo-msg__time { margin-left: auto; padding-left: 8px; font-size: 12.5px; color: var(--zs-g500); white-space: nowrap; }
.zgo-msg__body { font-size: 15px; color: var(--zs-ink); overflow-wrap: anywhere; }
.zgo-msg__body p { margin: 0 0 8px !important; color: inherit !important; }
.zgo-msg__body p:last-child { margin-bottom: 0 !important; }
.zgo-msg__body a { color: var(--zs-pink) !important; }

/* AS attachment list inside a message */
.zgo-msg .wpas-reply-attachements { margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid rgba(8,12,28,.07); }
.zgo-msg .wpas-reply-attachements > strong { display: block; margin: 0 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--zs-g500); }
.zgo-msg .wpas-reply-attachements ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.zgo-msg .wpas-reply-attachements li {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--zs-g200);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px; color: var(--zs-g500);
}
.zgo-msg .wpas-reply-attachements li::before {
  content: ""; flex: 0 0 auto; width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ff2d78' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E") no-repeat center;
}
.zgo-msg .wpas-reply-attachements a { color: var(--zs-ink) !important; font-weight: 700; font-size: 13px; text-decoration: none !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.zgo-msg .wpas-reply-attachements a:hover { color: var(--zs-pink) !important; }
.zgo-msg .wpas-reply-attachements .btn_delete_attachment { display: none !important; }

/* Reply + close */
.zgo-support__reply #wpas-reply-box { margin: 0 0 14px; }
.zgo-support__close {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  margin: 14px 0 0;
  font-size: 14px; color: var(--zs-g500);
}
.zgo-support__closed { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--zs-g50); }
.zgo-support__closed p { margin: 0 !important; font-weight: 600; color: var(--zs-g700) !important; }

/* AS notices (success / errors) */
.zgo-support__notices { margin: 0 0 16px; }
.zgo-support .wpas-alert {
  margin: 0 0 10px; padding: 12px 16px;
  border-radius: 14px; border: 1px solid var(--zs-g200);
  background: var(--zs-g50); color: var(--zs-g700);
  font-size: 14px; font-weight: 600;
}
.zgo-support .wpas-alert p { margin: 0 !important; color: inherit !important; }
.zgo-support .wpas-alert-success { background: var(--z-teal-50, #e6faf6); border-color: #b3efe3; color: #006b59; }
.zgo-support .wpas-alert-danger,
.zgo-support .wpas-alert-failure { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.zgo-support .wpas-alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.zgo-support .wpas-alert a { color: inherit !important; text-decoration: underline; }

/* ——— Tablet / narrow content column ——— */
@media (max-width: 1100px) {
  .zgo-tickets__row { grid-template-columns: 56px minmax(0, 1fr) 128px 120px; }
  .zgo-tickets__order { display: none; }
  .zgo-tickets__row--head span:nth-child(4) { display: none; }
}

/* ——— Mobile ≤ 640px ——— */
@media (max-width: 640px) {
  .zgo-support__head { flex-direction: column; align-items: stretch; gap: 12px; }
  .zgo-support__head .zgo-support__btn { width: 100%; }
  .zgo-support__head--ticket { flex-direction: column-reverse; align-items: flex-start; gap: 8px; }
  .zgo-support__title { font-size: 18px !important; }

  .zgo-tickets { border: 0; border-radius: 0; overflow: visible; background: transparent; display: grid; gap: 10px; }
  .zgo-tickets__row--head { display: none; }
  .zgo-tickets__row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "subject subject" "status status" "order updated";
    gap: 8px 12px;
    padding: 14px 16px;
    border: 1px solid var(--zs-g200) !important;
    border-radius: var(--zs-r);
    background: #fff;
  }
  .zgo-tickets__id { position: absolute; top: 14px; right: 16px; font-size: 13px; }
  .zgo-tickets__subject { grid-area: subject; padding-right: 60px; }
  .zgo-support a.zgo-tickets__link { -webkit-line-clamp: 3; }
  .zgo-tickets__status { grid-area: status; }
  .zgo-tickets__order { grid-area: order; display: block; font-size: 13px; color: var(--zs-g500); }
  .zgo-tickets__order::before { content: attr(data-label) " "; font-weight: 600; }
  .zgo-tickets__updated { grid-area: updated; text-align: right; font-size: 12.5px; }

  .zgo-msg { max-width: 100%; padding: 12px 14px 14px; }
  .zgo-msg--customer { margin-left: 18px; }
  .zgo-msg--support { margin-right: 18px; }
  .zgo-msg__head { flex-wrap: wrap; row-gap: 2px; }
  .zgo-support__card, .zgo-support__form { padding: 16px; }
  .zgo-support .wpas-form button[type="submit"] { width: 100%; }
  .zgo-support__close { justify-content: space-between; }
  .zgo-support__closed { flex-direction: column; align-items: stretch; text-align: center; }
}
