/* QuvaElon — extracted from wireframe */

/* Elon joylash — tepadan pastga */
.post {
  position: absolute;
  inset: 0;
  transform-origin: right bottom;
  transform: translateY(12%) scale(0.18);
  opacity: 0;
  width: 100%;
  left: 0;
  background: #fff;
  z-index: 45;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease,
    visibility 0s linear 0.45s;
  padding-bottom: 32px;
  border-radius: 24px 24px 0 0;
}
.post::-webkit-scrollbar { display: none; }
.post.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  border-radius: 0;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease,
    visibility 0s linear 0s,
    border-radius 0.35s ease;
}
.post-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  padding-top: calc(14px + 28px);
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.post-top h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  flex: 1;
  text-align: right;
}
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px 0 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--soft);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}
.post-back svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.post-body {
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 14px;
}
.post-body.show { display: flex; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--mute);
  margin-bottom: 6px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--soft);
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
}
.field input:focus,
.field textarea:focus {
  box-shadow: 0 0 0 2px var(--accent);
}
.field textarea { min-height: 100px; resize: vertical; }
.photo-box {
  height: 140px;
  border-radius: 16px;
  border: 1.5px dashed rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.06);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.photo-row,
#eski-photos {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 10px;
  align-items: end;
}
.photo-slot {
  aspect-ratio: 1;
  min-height: 0;
  border-radius: 14px;
  border: 1.5px dashed rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.06);
  color: var(--accent);
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  padding: 0;
}
#eski-photos .photo-slot-main,
.photo-slot-main {
  aspect-ratio: 1 / 1.1;
  min-height: 124px;
  border-width: 2px;
  border-color: rgba(22, 163, 74, 0.55);
  background: #fff;
}
#eski-photos .photo-slot:not(.photo-slot-main),
.photo-slot:not(.photo-slot-main) {
  aspect-ratio: 1;
  min-height: 112px;
}
.photo-slot .photo-plus {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  z-index: 1;
}
.photo-slot .photo-num {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 5;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #14532D;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  pointer-events: none;
}
.photo-slot.has {
  border-style: solid;
  background: #ECECEC;
  color: var(--mute);
  font-size: 12px;
}
.photo-slot.has .photo-plus { display: none; }
#eski-photos .photo-slot img,
#eski-photos .photo-slot img.photo-preview,
.photo-slot img.photo-preview {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  z-index: 1;
  background: #ECECEC;
}
.photo-slot-main.has {
  background: #ECECEC;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--mute);
  line-height: 1.35;
}
.tg-btn.on {
  background: rgba(34, 197, 94, 0.12);
  border-color: #86EFAC;
  color: #14532D;
}
.tg-prefix span {
  min-width: 28px;
  text-align: center;
}
.photo-slot .rm {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: #1C1C1E;
  color: #fff;
  z-index: 4;
  font-size: 14px;
  line-height: 22px;
  cursor: pointer;
  padding: 0;
}
.photo-sheet {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 50;
  align-items: flex-end;
  justify-content: center;
}
.photo-sheet.open {
  display: flex;
}
.photo-sheet-card {
  width: 100%;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 24px rgba(0,0,0,0.12);
}
.photo-sheet-card button {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 8px;
  color: var(--ink);
}
.photo-sheet-card button.main {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.photo-sheet-card button.cancel {
  color: var(--mute);
  margin-bottom: 0;
}
.post-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-pick {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--soft);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.cat-pick-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cat-pick .ico { font-size: 22px; line-height: 1; }
.cat-pick .txt { min-width: 0; }
.cat-pick .label {
  display: block;
  font-size: 12px;
  color: var(--mute);
  font-weight: 600;
}
.cat-pick .value {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-pick .chev {
  color: var(--mute);
  font-size: 12px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.cat-pick.required {
  outline: 2px solid #C62828;
}
.cat-error {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #C62828;
}
.cat-error.show { display: block; }
.post-err {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  color: #C62828;
}
.post-err.show { display: block; }
.field input.field-invalid,
.field textarea.field-invalid,
.phone-prefix.field-invalid,
.price-wrap.field-invalid,
.photo-row.field-invalid,
.tg-btn.field-invalid {
  border-color: #FECACA;
  box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.18);
}
.field input::placeholder,
.field textarea::placeholder {
  color: #B7B7BD;
  font-weight: 500;
  font-style: italic;
}
.price-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--soft);
  overflow: hidden;
  background: #fff;
}
.price-wrap:focus-within {
  box-shadow: 0 0 0 2px var(--accent);
}
.price-wrap.field-invalid:focus-within {
  box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.18);
}
.price-wrap input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.price-wrap span {
  padding: 12px 14px 12px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mute);
  flex-shrink: 0;
}

.cat-panel {
  display: none;
  margin-top: 10px;
}
.cat-panel.open { display: block; }

.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 2px;
}
.cat-grid::-webkit-scrollbar { display: none; }
.cat-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  padding: 8px 8px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.cat-card.on {
  outline: 2px solid var(--accent);
  background: rgba(34, 197, 94, 0.06);
}
.cat-card .ico {
  font-size: 16px;
  line-height: 1.2;
  flex-shrink: 0;
  margin-bottom: 0;
}
.cat-card .meta { min-width: 0; }
.cat-card .name {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 0;
  line-height: 1.25;
}
.cat-card .desc {
  display: block;
  font-size: 10px;
  color: var(--mute);
  line-height: 1.2;
  font-weight: 500;
  margin-top: 1px;
}
.post-submit {
  height: 50px;
  width: 100%;
  border: none;
  border-radius: 16px;
  background: linear-gradient(180deg, #34d399 0%, #22C55E 55%, #16a34a 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
  cursor: pointer;
  margin-top: 8px;
  font-family: inherit;
}
.post-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  filter: grayscale(0.15);
}
.post-delete {
  height: 46px;
  width: 100%;
  border: 1.5px solid #DC2626;
  border-radius: 16px;
  background: #fff;
  color: #DC2626;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 8px;
  font-family: inherit;
}
.post-delete.hide { display: none !important; }
.post-note {
  font-size: 13px;
  color: var(--mute);
  line-height: 1.4;
}
.price-deal {
  display: none;
  margin-top: 4px;
}
.price-deal.show { display: block; }
.tg-btn {
  width: 100%;
  height: 48px;
  margin-top: 10px;
  border: none;
  border-radius: 14px;
  background: #229ED9;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(34, 158, 217, 0.35);
  font-family: inherit;
}
.tg-btn svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}
.phone-prefix {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--soft);
  overflow: hidden;
  background: #fff;
}
.phone-prefix span {
  padding: 12px 0 12px 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
}
.phone-prefix input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding-left: 6px !important;
}

.store-setup {
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-bottom: 4px;
}
.store-setup h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #1F2937;
}
.store-setup p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #8B939E;
  font-weight: 400;
}
#yangi-store-block,
#yangi-product-block {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
#yangi-product-block[hidden] {
  display: none !important;
}
#yangi-store-block .field > label,
#yangi-product-block .field > label {
  font-size: 13px;
  font-weight: 600;
  color: #5C6570;
  margin-bottom: 10px;
  letter-spacing: 0;
}
.store-input {
  border: 1px solid #ECECEC !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  background: #fff !important;
  padding: 14px 15px !important;
  min-height: 48px;
  font-size: 15px !important;
  font-weight: 400;
  color: #1F2937 !important;
}
.store-input::placeholder {
  color: #C5C5CE;
  font-weight: 400;
  opacity: 1;
}
.store-addr-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.store-addr-row .store-input {
  flex: 1;
  min-width: 0;
}
.store-loc-btn {
  width: 50px;
  flex-shrink: 0;
  border: 1px solid #ECECEC;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  color: var(--accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.store-loc-btn svg {
  width: 20px;
  height: 20px;
}
.store-loc-btn:active {
  transform: scale(0.96);
}
.store-cats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.store-cats-more {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  font-weight: 600;
  color: #6B7280;
}
.store-cats-more svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.store-cats-more.open {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.08);
}
.store-cats-more.open svg {
  transform: rotate(180deg);
}
.store-cats-extra {
  animation: storeCatsSlide 0.22s ease;
}
.store-cats-extra[hidden] {
  display: none !important;
}
@keyframes storeCatsSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.yangi-product-block {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid #F0F0F0;
  animation: storeCatsSlide 0.28s ease;
}
.yangi-product-head {
  margin-bottom: 2px;
}
.store-cats .chip.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.store-logo-field {
  align-items: center;
  text-align: center;
}
.store-logo-field label {
  width: 100%;
  text-align: left;
}
.store-photo {
  width: 100%;
  border: 1.5px dashed rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
}
.store-photo.store-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 4px auto 0;
  font-size: 13px;
  padding: 0;
  line-height: 1.2;
  position: relative;
  overflow: hidden;
}
.store-photo.store-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.store-photo.store-logo.filled {
  border-style: solid;
  border-color: #F3D7C4;
  background: #fff;
  color: #6B7280;
}
.field-hint {
  margin: -4px 0 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #6B7280;
}

/* Ikkinchi qo‘l — post forma */
.phone[data-sec="eskilar"] .post-top {
  background: #fff;
  border-bottom: 1px solid #F0F0F0;
}
.phone[data-sec="eskilar"] .field label {
  color: #3F3F46;
  font-weight: 600;
}
.phone[data-sec="eskilar"] .field input,
.phone[data-sec="eskilar"] .field textarea,
.phone[data-sec="eskilar"] .field select,
.phone[data-sec="eskilar"] .cat-pick,
.phone[data-sec="eskilar"] .phone-prefix,
.phone[data-sec="eskilar"] .price-wrap {
  border-color: #ECECEC;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.phone[data-sec="eskilar"] .photo-box,
.phone[data-sec="eskilar"] .photo-slot {
  border-color: rgba(22, 163, 74, 0.4);
  background: rgba(22, 163, 74, 0.07);
  color: #16A34A;
  border-radius: 16px;
}
.phone[data-sec="eskilar"] #eski-photos .photo-slot-main.has {
  background: #ECECEC;
}
.phone[data-sec="eskilar"] #eski-photos .photo-slot img {
  object-fit: contain !important;
}
.phone[data-sec="eskilar"] .chip {
  border-radius: 999px;
  border-color: #ECECEC;
}
.phone[data-sec="eskilar"] .chip.active {
  background: #16A34A;
  color: #fff;
}
.phone[data-sec="eskilar"] .post-submit {
  background: linear-gradient(180deg, #4ADE80 0%, #22C55E 50%, #16A34A 100%);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.28);
  border-radius: 16px;
}
.phone[data-sec="eskilar"] .cat-card.on {
  background: rgba(22, 163, 74, 0.08);
  border-color: #86EFAC;
}

.phone[data-sec="yangi"] #post-yangi {
  gap: 4px;
}
.phone[data-sec="yangi"] .field input,
.phone[data-sec="yangi"] .field textarea,
.phone[data-sec="yangi"] .field select,
.phone[data-sec="yangi"] .cat-pick,
.phone[data-sec="yangi"] .phone-prefix {
  border-color: #ECECEC;
  box-shadow: none;
}
.phone[data-sec="yangi"] .photo-box,
.phone[data-sec="yangi"] .photo-slot {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.08);
}
.phone[data-sec="yangi"] .cat-card.on {
  background: rgba(var(--accent-rgb), 0.08);
}
.phone[data-sec="yangi"] .post-submit {
  background: linear-gradient(180deg, #FF9F47 0%, #F27A1A 60%, #E66A00 100%);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.35);
}

/* Xizmatlar — slate post */
.phone[data-sec="xizmatlar"] #post-xizmatlar {
  gap: 18px;
}
.phone[data-sec="xizmatlar"] .field input,
.phone[data-sec="xizmatlar"] .field textarea,
.phone[data-sec="xizmatlar"] .field select,
.phone[data-sec="xizmatlar"] .cat-pick,
.phone[data-sec="xizmatlar"] .phone-prefix {
  border-color: #E2E8F0;
  box-shadow: 0 1px 3px rgba(71, 85, 105, 0.05);
  background: #fff;
}
.phone[data-sec="xizmatlar"] .field label {
  color: #64748B;
  font-weight: 600;
}
.phone[data-sec="xizmatlar"] .photo-box,
.phone[data-sec="xizmatlar"] .photo-slot {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
}
.phone[data-sec="xizmatlar"] .chip.active {
  background: #475569;
  color: #fff;
  border-color: transparent;
}
.phone[data-sec="xizmatlar"] .post-submit {
  background: linear-gradient(180deg, #64748B 0%, #475569 55%, #334155 100%);
  box-shadow: 0 8px 20px rgba(71, 85, 105, 0.32);
}
.phone[data-sec="xizmatlar"] .post-note {
  color: #64748B;
}

.xizmat-lead {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
  font-weight: 500;
}
.xizmat-avatar-field {
  align-items: center;
  text-align: center;
}
.xizmat-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto;
  padding: 0;
  position: relative;
  overflow: hidden;
  font-size: 13px;
}
.xizmat-avatar img,
#xizmat-work-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#xizmat-work-photo {
  position: relative;
  overflow: hidden;
}
#xizmat-work-photo.filled,
.xizmat-avatar.filled {
  border-style: solid;
  color: #64748B;
}
.xizmat-cats {
  margin-top: 8px;
  animation: storeCatsSlide 0.22s ease;
}
.xizmat-cats[hidden] {
  display: none !important;
}
#post-xizmatlar .field-hint {
  margin-top: 8px;
  text-align: center;
}
#post-xizmatlar #xizmat-tg-done {
  display: none;
  margin-top: 8px;
  color: #15803D;
  font-size: 13px;
  font-weight: 600;
}
#post-xizmatlar #xizmat-tg-done.show {
  display: block;
}
#post-xizmatlar #xizmat-tg-btn.hide {
  display: none;
}
#eski-tg-field.hide,
#eski-tg-input-wrap.hide,
#eski-tg-btn.hide {
  display: none !important;
}
#eski-tg-input-wrap {
  position: relative;
  padding-right: 40px;
}
#eski-tg-input-wrap .tg-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: #F4F4F5;
  color: #71717A;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
#eski-tg-input-wrap .tg-clear:active {
  transform: translateY(-50%) scale(0.96);
}
#eski-tg-input-wrap.is-locked {
  opacity: 0.85;
  background: #F4F4F5;
  border-radius: 14px;
  padding-right: 12px;
}
#eski-tg-input-wrap.is-locked input {
  background: transparent;
  cursor: default;
}
#eski-tg-input-wrap.is-locked .tg-clear {
  display: none !important;
}
#eski-tg-locked-label.hide {
  display: none !important;
}
#eski-phone-wrap.is-locked {
  opacity: 0.85;
  background: #F4F4F5;
  border-radius: 14px;
}
#eski-phone-wrap.is-locked input {
  background: transparent;
  cursor: default;
}
