/* ================================================================
   Abzar Shokri — Account › Contact (/account/contact)
   Account-area redesign of the public contact page. Same data source
   (Admin → اطلاعات فروشگاه via /api/settings) and same contact hooks
   (data-setting / tel: / mailto: / #contact-map), laid out with the
   account panel/row vocabulary instead of the public contact cards.
   ================================================================ */

/* ── Rhythm: one consistent gap between the account panels ─────── */
.account-content--contact > * + * { margin-top: 16px; }

.ac-breadcrumb__current { color: #3f4064; font-weight: 600; }

/* ── Lead copy ───────────────────────────────────────────────── */
.ac-contact__lead {
  font-size: 13px;
  line-height: 1.8;
  color: #6b7280;
  margin-top: -8px;
}
.ac-contact__lead strong { color: #3f4064; font-weight: 600; }

/* ── Quick action tiles ──────────────────────────────────────── */
.ac-contact__quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.ac-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 16px 12px;
  background: #fafafa;
  border: 1px solid #ececef;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: border-color .15s, background .15s, transform .15s;
}
.ac-tile:hover { background: #fff; border-color: #f5c400; }
.ac-tile:active { transform: scale(.99); }
.ac-tile__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #ececef;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3f4064;
  flex-shrink: 0;
}
.ac-tile__icon svg { width: 19px; height: 19px; }
.ac-tile--primary { background: #fffde7; border-color: #ffecb3; }
.ac-tile--primary .ac-tile__icon { background: #fff; border-color: #ffecb3; color: #8a6d00; }
.ac-tile--primary:hover { border-color: #f5c400; }
.ac-tile__label { font-size: 13px; font-weight: 700; color: #0c0c0c; line-height: 1.5; }
.ac-tile__hint { font-size: 11px; color: #81858b; line-height: 1.5; }

/* ── Panel (account section) ─────────────────────────────────── */
.ac-panel {
  background: #fff;
  border: 1px solid #e0e0e2;
  border-radius: 12px;
  padding: 16px;
}
.ac-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.ac-panel__title {
  font-size: 14px;
  font-weight: 700;
  color: #0c0c0c;
  line-height: 1.5;
}
.ac-panel__sub { font-size: 11.5px; color: #81858b; line-height: 1.5; }
.ac-panel__actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Flush panel: full-bleed body (used by the map section). */
.ac-panel--flush { padding: 0; overflow: hidden; }
.ac-panel--flush .ac-panel__head { margin: 0; padding: 12px 14px; border-bottom: 1px solid #f0f0f1; }

/* ── Contact rows (label / value / hint) ─────────────────────── */
.ac-rows { display: flex; flex-direction: column; }
.ac-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 10px;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-top: 1px solid #f0f0f1;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: background .15s;
  border-radius: 8px;
}
.ac-rows > .ac-row:first-child { border-top: none; }
a.ac-row:hover { background: #fafafa; }
.ac-row__icon {
  grid-column: 1;
  grid-row: 1;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f3f4f6;
  border: 1px solid #ececef;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3f4064;
  flex-shrink: 0;
}
.ac-row__icon svg { width: 19px; height: 19px; }
.ac-row--accent .ac-row__icon { background: #fff7d6; border-color: #ffecb3; color: #8a6d00; }
.ac-row__body {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ac-row__label { font-size: 11px; font-weight: 600; color: #81858b; line-height: 1.5; }
.ac-row__value {
  font-size: 13.5px;
  font-weight: 700;
  color: #0c0c0c;
  line-height: 1.6;
  word-break: break-word;
}
.ac-row__value--ltr { direction: ltr; text-align: right; }
.ac-row__meta {
  grid-column: 3;
  grid-row: 1;
  font-size: 11.5px;
  color: #81858b;
  line-height: 1.5;
  white-space: nowrap;
}
.ac-row__chevron {
  grid-column: 4;
  grid-row: 1;
  width: 7px;
  height: 7px;
  border-left: 1.5px solid #c8ccd1;
  border-bottom: 1.5px solid #c8ccd1;
  transform: rotate(-45deg);
  flex-shrink: 0;
}
div.ac-row--static { cursor: default; }
div.ac-row--static:hover { background: transparent; }
div.ac-row--static .ac-row__chevron { display: none; }

/* ── Topic chips ─────────────────────────────────────────────── */
.ac-chips { display: flex; flex-direction: column; gap: 8px; }
.ac-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  background: #fafafa;
  border: 1px solid #ececef;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  color: #232430;
  text-align: right;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ac-chip:hover { background: #fff; border-color: #f5c400; }
.ac-chip:active { background: #f3f4f6; }
.ac-chip svg { width: 17px; height: 17px; flex-shrink: 0; color: #8a6d00; }
.ac-chip__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ac-chip__label { font-size: 12.5px; font-weight: 700; line-height: 1.5; }
.ac-chip__desc { font-size: 11px; color: #81858b; line-height: 1.5; }

/* ── Map section ─────────────────────────────────────────────── */
.ac-map {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: #9ca3af;
  overflow: hidden;
}
.ac-map__pin {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #ececef;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f5c400;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.ac-map__pin svg { width: 21px; height: 21px; }
.ac-map__fallback { font-size: 12px; font-weight: 500; color: #6b7280; padding: 0 14px; text-align: center; line-height: 1.6; }
.ac-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #e5e7eb;
  z-index: 1;
}
/* common.js flips the card into map mode once a store map URL is saved. */
.ac-map.contact-map-card__body--has-map .ac-map__pin,
.ac-map.contact-map-card__body--has-map .ac-map__fallback { display: none; }
.ac-map__map { position: absolute; inset: 0; z-index: 1; background: #e5e7eb; cursor: pointer; }
.ac-map__map[hidden] { display: none; }
.ac-map__map .leaflet-container { width: 100%; height: 100%; cursor: pointer; font: inherit; }
.ac-map__map .leaflet-bottom.leaflet-right { top: 6px; bottom: auto; }
.ac-map__map .leaflet-control-attribution { font-size: 9px; background: rgba(255, 255, 255, .75); }
.ac-map__caption {
  position: absolute;
  bottom: 10px;
  right: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: calc(100% - 20px);
  padding: 6px 10px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid #ececef;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  font-size: 11.5px;
  font-weight: 600;
  color: #232430;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.ac-map__caption svg { width: 13px; height: 13px; flex-shrink: 0; color: #8a6d00; }
.ac-map__caption span:last-child { overflow: hidden; text-overflow: ellipsis; }
.ac-map__caption[hidden] { display: none; }
.ac-map.contact-map-card__body--has-map .ac-map__caption:not([hidden]) { display: flex; }

/* Map actions (shared hook class used by common.js / site-content.js). */
.contact-map-card__action {
  font-size: 11.5px;
  font-weight: 600;
  color: #8a6d00;
  background: #fffbeb;
  border: 1px solid #ffecb3;
  border-radius: 9999px;
  padding: 5px 10px;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.contact-map-card__action:hover { background: #fff7d6; border-color: #f5c400; }

/* ── Message form ────────────────────────────────────────────── */
.ac-contact__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.ac-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ac-panel--form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.ac-panel--form .input-label { font-size: 12px; font-weight: 600; color: #3f4064; }
.ac-panel--form .input {
  height: 44px;
  border-radius: 10px;
  border: 1px solid #e0e0e2;
  background: #fff;
  font-size: 13.5px;
  font-family: inherit;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.ac-panel--form .input:focus {
  border-color: #f5c400;
  box-shadow: 0 0 0 3px rgba(245, 196, 0, .15);
  outline: none;
}
.ac-panel--form textarea.input {
  height: auto;
  min-height: 110px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.75;
}
.ac-panel--form select.input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 30px;
}
.ac-form__submit {
  min-height: 46px;
  width: 100%;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 196, 0, .25);
}
.ac-form__submit:hover { background: #e6b800; border-color: #e6b800; }
.ac-form__submit:active { transform: scale(.99); }
.ac-form__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f1;
  font-size: 11.5px;
  color: #81858b;
  line-height: 1.6;
}
.ac-form__foot svg { width: 14px; height: 14px; flex-shrink: 0; color: #22c55e; }

/* ── Responsive: ≤1240px drops the quick tiles to 2-up and stacks the
      map/form panels before the account shell collapses at ≤900px ── */
@media (max-width: 1240px) {
  .ac-contact__quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-contact__split { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ac-form__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* ── Responsive: ≤900px follows the account app shell ────────── */
@media (max-width: 900px) {
  .account-content--contact > * + * { margin-top: 12px; }
  .ac-contact__lead { margin-top: -4px; font-size: 12.5px; }
  .ac-contact__quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ac-tile { padding: 12px 10px; border-radius: 14px; border-color: #ececef; }
  .ac-tile__icon { width: 36px; height: 36px; border-radius: 10px; }
  .ac-tile__icon svg { width: 18px; height: 18px; }
  .ac-tile__label { font-size: 12.5px; }
  .ac-tile__hint { display: none; }
  .ac-panel { border-radius: 16px; padding: 14px; border-color: #ececef; }
  .ac-panel--flush { padding: 0; }
  .ac-panel__head { margin-bottom: 10px; }
  .ac-panel--flush .ac-panel__head { padding: 12px 14px; }
  .ac-panel__title { font-size: 13.5px; }
  .ac-row {
    grid-template-columns: 38px minmax(0, 1fr) 8px;
    gap: 10px;
    padding: 12px 2px;
  }
  .ac-row__icon { width: 38px; height: 38px; border-radius: 10px; }
  .ac-row__icon svg { width: 18px; height: 18px; }
  .ac-row__value { font-size: 13px; }
  .ac-row__meta { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .ac-row__chevron { grid-column: 3; grid-row: 1; }
  .ac-chips { gap: 7px; }
  .ac-chip { min-height: 48px; padding: 10px 12px; border-radius: 12px; }
  .ac-contact__split { grid-template-columns: 1fr; gap: 12px; }
  .ac-map { height: 170px; }
  .ac-form__grid { grid-template-columns: 1fr; gap: 0; }
  .ac-panel--form .input { height: 48px; font-size: 14px; }
  .ac-panel--form textarea.input { min-height: 120px; }
  .ac-form__submit { min-height: 48px; }
}
@media (max-width: 480px) {
  .ac-row__meta { font-size: 11px; }
  .ac-chip__desc { font-size: 10.5px; }
}