/* HG Store - shared vendor/admin components; scoped styles only. */

.hg-vendor-dashboard,
.hg-vendor-apply,
.hg-store-admin {
  --hg-blue: #1748a5;
  --hg-red: #c8273b;
  --hg-border: #dae4ef;
  --hg-ink: #182c4c;
  color: var(--hg-ink);
}

.hg-vendor-dashboard *,
.hg-vendor-apply *,
.hg-store-admin * {
  box-sizing: border-box;
}

.hg-vendor-dashboard {
  max-width: 1320px;
  margin: 24px auto;
  padding: 0 clamp(12px,2.5vw,30px);
}

.hg-vendor-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(110deg,var(--hg-blue),#132b57);
  border-radius: 16px;
  color: white;
  padding: clamp(20px,4vw,45px);
}

.hg-vendor-header h1 {
  color: inherit;
  font-size: clamp(25px,4vw,38px);
  margin: 0;
  overflow-wrap: anywhere;
}

.hg-vendor-header a {
  color: #fff;
  border: 1px solid #ffffffaa;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
}

.hg-vendor-nav {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 16px 0;
  margin-bottom: 8px;
}

.hg-vendor-nav a {
  scroll-snap-align: start;
  flex: 0 0 auto;
  padding: 12px 15px;
  border-radius: 9px;
  text-decoration: none;
  background: #eff3f9;
  color: #183e6d;
  font-weight: 700;
  white-space: nowrap;
}

.hg-vendor-nav a[aria-current=page] {
  background: var(--hg-blue);
  color: #fff;
}

.hg-vendor-dashboard .hg-panel,
.hg-store-admin .hg-panel {
  background: #fff;
  border: 1px solid var(--hg-border);
  border-radius: 13px;
  padding: clamp(14px,2.5vw,24px);
  margin: 17px 0;
}

.hg-vendor-dashboard .hg-panel h2 {
  margin: 0 0 16px;
}

.hg-vendor-dashboard .hg-actions,
.hg-store-admin .hg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 13px 0;
  align-items: center;
}

.hg-vendor-dashboard .button,
.hg-vendor-apply button {
  background: var(--hg-blue);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.35;
  min-height: 42px;
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  justify-content: center;
}

.hg-vendor-dashboard .hg-table-scroll,
.hg-store-admin .hg-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.hg-form-grid,
.hg-store-admin .hg-form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 15px;
  align-items: end;
  margin: 17px 0;
}

.hg-form-grid label,
.hg-design-form label,
.hg-vendor-apply label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
  font-weight: 650;
}

.hg-form-grid input,
.hg-form-grid select,
.hg-form-grid textarea,
.hg-design-form input,
.hg-design-form select,
.hg-design-form textarea,
.hg-vendor-apply input,
.hg-vendor-dashboard input,
.hg-vendor-dashboard textarea,
.hg-vendor-dashboard select {
  max-width: 100%;
  width: 100%;
  padding: 9px 10px;
  border-radius: 7px;
  border: 1px solid #bac9da;
  background: #fff;
  color: var(--hg-ink);
  font-size: 15px;
  min-height: 40px;
}

.hg-form-grid input[type=checkbox],
.hg-design-form input[type=radio],
.hg-vendor-apply input[type=checkbox],
.hg-checkbox-grid input {
  width: auto;
  min-height: 0;
}

.hg-form-grid .hg-wide,
.hg-store-admin .hg-form-grid .hg-wide {
  grid-column: 1/-1;
}

.hg-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(120px,1fr));
  gap: 8px;
}

.hg-checkbox-grid label {
  flex-direction: row;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
}

.hg-media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hg-media-grid img {
  width: 85px;
  height: 85px;
}

.hg-media-grid label {
  font-size: 12px;
}

.hg-edit-product {
  border: 1px solid #ccd8e6;
  border-radius: 12px;
  padding: 15px;
  background: #f7faff;
  margin: 15px 0;
}

.hg-edit-product summary {
  font-size: 17px;
  font-weight: 750;
  cursor: pointer;
  color: #153c76;
}

.hg-feedback {
  background: #e4f4e9;
  color: #185d36;
  border-left: 4px solid #29914f;
  padding: 12px 16px;
  margin: 14px 0;
  border-radius: 6px;
}

.hg-tiny-thumb {
  height: 45px;
  width: 45px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 9px;
}

.hg-pages {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 14px 0;
}

.hg-pages a {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #aebfd4;
}

.hg-table td {
  vertical-align: top;
}

.hg-vendor-dashboard .hg-table td,
.hg-vendor-dashboard .hg-table th {
  padding: 12px;
}

.hg-template-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,215px),1fr));
  gap: 16px;
  margin: 21px 0;
}

.hg-template-sample {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 2px solid #d2deeb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  padding: 10px;
  font-size: 14px;
}

.hg-template-sample:has(input:checked) {
  border-color: #175ab4;
  box-shadow: 0 0 0 2px #99c3ef;
}

.hg-template-sample input[type=radio] {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
}

.hg-template-mock {
  position: relative;
  display: block;
  height: 150px;
  background: #f6f8fb;
  border-radius: 7px;
  overflow: hidden;
}

.hg-template-cover {
  display: block;
  height: 66px;
  background: linear-gradient(120deg,#1748a5,#c8273b);
}

.hg-template-avatar {
  position: absolute;
  top: 43px;
  left: 13px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid #c9d6ef;
}

.hg-template-lines {
  display: block;
  margin: 14px 15px 8px 69px;
  width: 45%;
  height: 7px;
  background: #9babc2;
  border-radius: 3px;
}

.hg-template-cards {
  display: flex;
  gap: 8px;
  padding: 13px;
}

.hg-template-cards i {
  display: block;
  flex: 1;
  height: 42px;
  background: #dee6f1;
  border-radius: 5px;
}

.hg-template-sample--beauty .hg-template-cover {
  background: linear-gradient(120deg,#c26494,#482d52);
}

.hg-template-sample--beauty .hg-template-avatar {
  left: calc(50% - 23px);
}

.hg-template-sample--digital .hg-template-cover {
  background: linear-gradient(120deg,#25236b,#695cf6);
}

.hg-template-sample--services .hg-template-cover {
  background: linear-gradient(120deg,#0d766f,#123449);
}

.hg-template-sample--coaching .hg-template-cover {
  background: linear-gradient(120deg,#8a6031,#332529);
}

.hg-template-sample--academy .hg-template-cover {
  background: linear-gradient(120deg,#27573b,#b2a24f);
}

.hg-template-label {
  font-weight: 700;
}

.hg-vendor-apply {
  max-width: 1100px; /* PC: wide enough to see the store template choice; phones keep the full width */
  margin: 30px auto;
  background: #fff;
  border: 1px solid #dce5f0;
  border-radius: 16px;
  padding: clamp(18px,5vw,35px);
}

.hg-vendor-apply form {
  display: grid;
  gap: 17px;
}

.hg-vendor-apply .hg-check-label {
  flex-direction: row;
  align-items: flex-start;
}

.hg-vendor-apply .hg-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hg-vendor-dashboard a:focus-visible,
.hg-vendor-dashboard button:focus-visible,
.hg-store-admin button:focus-visible,
.hg-template-sample:focus-within {
  outline: 3px solid #1262bb;
  outline-offset: 2px;
}

@media(max-width:700px) {
  .hg-form-grid,
  .hg-store-admin .hg-form-grid {
    grid-template-columns: minmax(0,1fr);
  }

  .hg-form-grid .hg-wide {
    grid-column: auto;
  }

  .hg-vendor-dashboard .hg-actions>a {
    flex: 1 1 100%;
  }
}

/* Go-live polish — shared offer list and editor components (admin store workspace + vendor dashboard). */

.hg-feedback--error {
  background: #fdecee;
  color: #8d1c2a;
  border-left-color: #c8273b;
}

.hg-muted {
  color: #63728a;
  font-size: 13px;
}

.hg-state {
  display: inline-flex;
  border-radius: 999px;
  background: #edf2fb;
  color: #1e4878;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  white-space: nowrap;
}

.hg-state--publish {
  color: #216b3b;
  background: #e4f6e8;
}

.hg-state--pending {
  color: #765618;
  background: #fff2d9;
}

.hg-state--draft,
.hg-state--private {
  color: #465268;
  background: #eef0f4;
}

.hg-offer-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.hg-offer-cell strong {
  display: block;
  overflow-wrap: anywhere;
}

.hg-offer-cell small {
  display: block;
  color: #63728a;
  margin-top: 2px;
}

.hg-offer-cell .hg-tiny-thumb {
  flex: none;
  margin: 0;
  border-radius: 8px;
  object-fit: cover;
  background: #eef2f8;
}

.hg-tiny-thumb--empty {
  display: block;
  height: 45px;
  width: 45px;
}

.hg-offer-table td {
  vertical-align: middle;
}

.hg-col-actions {
  width: 1%;
  white-space: nowrap;
}

.hg-row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  align-items: center;
}

.hg-row-actions form,
.hg-inline-form {
  display: inline-flex;
  margin: 0;
}

.hg-link-action {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  min-height: 0;
  color: #1748a5;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.hg-link-action:hover,
.hg-link-action:focus-visible {
  text-decoration: underline;
  color: #0e2f73;
}

.hg-link-action--danger,
.hg-link-action--danger:hover {
  color: #b3202f;
}

.hg-empty-state {
  text-align: center;
  border: 1px dashed #b4c8e6;
  background: #f7faff;
  padding: 30px 18px;
  border-radius: 13px;
}

.hg-empty-state p {
  margin: 0 0 12px;
}

.hg-empty-state p:last-child {
  margin-bottom: 0;
}

.hg-back-link {
  display: inline-block;
  margin: 0 0 12px;
  color: #1748a5;
  font-weight: 700;
  text-decoration: none;
}

.hg-offer-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.hg-form-section {
  border: 1px solid #dce5f0;
  border-radius: 12px;
  background: #fff;
  padding: 6px 18px 12px;
  margin: 0;
  min-width: 0;
}

.hg-form-section[hidden] {
  display: none;
}

.hg-form-section legend {
  font-size: 15px;
  font-weight: 750;
  color: #182c4c;
  padding: 0 8px;
}

.hg-form-section .hg-form-grid {
  margin: 10px 0 6px;
  align-items: start;
}

.hg-form-hint {
  margin: 6px 0 0;
  color: #63728a;
  font-size: 13px;
}

.hg-form-section .hg-checkbox-grid {
  margin: 12px 0 6px;
}

.hg-form-grid small {
  font-weight: 400;
  color: #63728a;
}

.hg-media-grid label {
  align-items: center;
  font-weight: 500;
}

.hg-media-grid label span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hg-media-grid img {
  border-radius: 8px;
  border: 1px solid #dce5f0;
  object-fit: cover;
}

.hg-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 14px;
}

.hg-form-footer label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 650;
  margin-right: auto;
  min-width: min(100%,260px);
}

.hg-form-footer select {
  min-height: 40px;
  max-width: 100%;
}

.hg-form-footer .button {
  min-height: 40px;
  padding: 0 22px;
}

.hg-design-form .hg-form-footer {
  margin-top: 16px;
}

.hg-image-field img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 150px;
  border-radius: 10px;
  border: 1px solid #dce5f0;
  object-fit: cover;
}

.hg-image-field--logo img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
}

@media(max-width:700px) {
  .hg-row-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .hg-form-section {
    padding: 4px 12px 10px;
  }

  .hg-form-footer .button {
    flex: 1 1 100%;
  }
}

.hg-store-admin .hg-offer-table .hg-row-actions,
.hg-vendor-dashboard .hg-offer-table .hg-row-actions {
  flex-wrap: nowrap;
  gap: 14px;
  justify-content: flex-end;
}

@media(max-width:700px) {
  .hg-store-admin .hg-offer-table .hg-row-actions,
  .hg-vendor-dashboard .hg-offer-table .hg-row-actions {
    flex-wrap: wrap;
  }
}

.hg-store-admin .hg-form-grid select,
.hg-store-admin .hg-form-footer select {
  height: 40px;
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 38px;
}

.hg-offer-table {
  min-width: 640px;
}

.hg-offer-table th,
.hg-offer-table td:not(:first-child) {
  white-space: nowrap;
  overflow-wrap: normal;
}

/* Signed-out store dashboard entry. */

.hg-vendor-dashboard.hg-vendor-dashboard--signed-out {
  max-width: 620px;
  margin: clamp(24px,6vw,64px) auto;
}

.hg-vendor-dashboard--signed-out .hg-panel.hg-dashboard-signin {
  padding: clamp(24px,5vw,42px);
  border: 1px solid #c8d7eb;
  border-radius: 18px;
  box-shadow: 0 10px 32px #001d6e0d;
}

.hg-vendor-dashboard--signed-out .hg-dashboard-signin .hg-dashboard-signin__brand {
  margin: 0 0 12px;
  color: #001d6e;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .08em;
}

.hg-vendor-dashboard--signed-out .hg-dashboard-signin h2 {
  font-size: clamp(25px,4vw,32px);
  line-height: 1.2;
  color: #192d48;
}

.hg-vendor-dashboard--signed-out .hg-dashboard-signin p {
  line-height: 1.6;
  color: #536b83;
}

.hg-vendor-dashboard--signed-out .hg-dashboard-signin a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 12px;
  padding: 12px 24px;
  border: 1px solid #001d6e;
  border-radius: 9px;
  background: #001d6e;
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: none;
}

.hg-vendor-dashboard--signed-out .hg-dashboard-signin a.button:is(:hover,:focus) {
  background: #001d6e;
  color: #fff;
  outline: 2px solid #001d6e;
  outline-offset: 3px;
}

@media(max-width:600px) {
  .hg-vendor-dashboard--signed-out .hg-dashboard-signin a.button {
    width: 100%;
  }
}

/* Dashboard page: the page header names the place; this bar names the store being managed. */
.hg-vendor-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin: 18px 0 4px; padding: 12px 16px; background: #fff; border: 1px solid var(--hg-border,#dae4ef); border-radius: 12px; }
.hg-vendor-toolbar__title { margin: 0; font-size: 16px; color: #182c4c; overflow-wrap: anywhere; }
.hg-vendor-toolbar__title span { color: #63728a; font-weight: 500; }
.hg-vendor-toolbar__links { display: flex; flex-wrap: wrap; gap: 8px; }
.hg-vendor-toolbar__links a { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 14px; border: 1px solid #c9d6e8; border-radius: 8px; color: #1748a5; font-weight: 700; text-decoration: none; }
.hg-vendor-toolbar__links a:hover, .hg-vendor-toolbar__links a:focus-visible { background: #f1f6ff; }
.hg-store-dashboard-page .hg-vendor-dashboard { max-width: none; margin: 0; padding: 0; }
.hg-store-dashboard-page .hg-dashboard-page__content { margin-top: 8px; }
@media (max-width: 560px) { .hg-vendor-toolbar__links { width: 100%; } .hg-vendor-toolbar__links a { flex: 1 1 auto; justify-content: center; } }

/* Vendor application (PC): "Purchase button", "Refund policy" and the other offer sections take the full width of
   "First offer" instead of one narrow column; their own fields then sit side by side. Phones are unchanged (one column). */
.hg-vendor-apply .hg-offer-section--entry > .hg-form-section {
  grid-column: 1 / -1;
}
.hg-vendor-apply .hg-offer-section--entry > .hg-form-section > label:not(.hg-wide) {
  max-width: 440px;
}
