:root {
  --pcsr-radius: 14px;
}

.pcsr-wizard-wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--header-margin);
  font-family: "IRANSansWebFaNum", Tahoma, sans-serif;
}

.pcsr-wizard-shell {
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--pcsr-radius);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  background: #fff;
}

.pcsr-wizard-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.pcsr-step-dot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(0, 0, 0, 0.45);
}
.pcsr-step-dot .pcsr-dot-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
}
.pcsr-step-dot.is-active { color: var(--ink); font-weight: 700; }
.pcsr-step-dot.is-active .pcsr-dot-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pcsr-wizard-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 22px 24px;
}

.pcsr-step { display: none; }
.pcsr-step.is-active { display: block; }

.pcsr-field { margin-bottom: 16px; }
.pcsr-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.pcsr-field input[type="text"],
.pcsr-field input[type="tel"],
.pcsr-field input[type="date"],
.pcsr-field input[type="time"],
.pcsr-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  font-family: inherit;
  font-size: 13.5px;
}

.pcsr-switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.pcsr-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.pcsr-switch input { opacity: 0; width: 0; height: 0; }
.pcsr-switch-track {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  transition: background 0.2s ease;
}
.pcsr-switch-track::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  right: 3px;
  transition: transform 0.2s ease;
}
.pcsr-switch input:checked + .pcsr-switch-track { background: var(--accent); }
.pcsr-switch input:checked + .pcsr-switch-track::before { transform: translateX(-18px); }

#pcsr-representative-fields { display: none; }
#pcsr-representative-fields.is-open {
  display: block;
  border-inline-start: 3px solid var(--accent);
  padding-inline-start: 14px;
  margin-top: 10px;
}
.pcsr-collapse-toggle {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.pcsr-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pcsr-stepper button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--logo-ink);
  background: #fff;
  color: var(--logo-ink);
  font-size: 16px;
  cursor: pointer;
}
.pcsr-stepper input {
  width: 70px;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  font-family: inherit;
}

.pcsr-wizard-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.pcsr-wizard-footer button {
  border-radius: 999px;
  padding: 9px 26px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.pcsr-btn-next, .pcsr-btn-submit {
  background: var(--accent);
  color: #fff;
}
.pcsr-btn-next:disabled, .pcsr-btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pcsr-btn-prev {
  background: transparent;
  border-color: var(--logo-ink);
  color: var(--logo-ink);
}

@media (max-width: 767px) {
  .pcsr-wizard-header { gap: 8px; padding: 12px; }
  .pcsr-step-dot span.pcsr-dot-label { display: none; }
  .pcsr-wizard-body { padding: 16px; }
  .pcsr-wizard-footer { padding: 12px 16px; }
}

/* Step 2 space picker — same card-grid pattern as the Step 3 services
   grid, plus a "مشاهده جزئیات" button per card and a modal for details. */
.pcsr-space-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.pcsr-space-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  font-size: 12px;
}
.pcsr-space-card input { display: none; }
.pcsr-space-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(3, 81, 94, 0.08);
}
.pcsr-space-title { font-weight: 600; color: var(--ink); }
.pcsr-space-details-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

@media (max-width: 767px) {
  .pcsr-space-grid { grid-template-columns: repeat(2, 1fr); }
}

.pcsr-space-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.pcsr-space-modal[hidden] { display: none; }
.pcsr-space-modal-box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  font-family: "IRANSansWebFaNum", Tahoma, sans-serif;
}
.pcsr-space-modal-close {
  position: absolute;
  top: 10px;
  left: 14px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--ink);
}
#pcsr-space-modal-body dl { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
#pcsr-space-modal-body dt { color: rgba(0, 0, 0, 0.5); }
#pcsr-space-modal-body dd { margin: 0; font-weight: 600; }
.pcsr-space-detail-gallery { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pcsr-space-detail-gallery img { border-radius: 8px; max-width: 140px; height: auto; }

.pcsr-service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.pcsr-service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pcsr-service-card input { display: none; }
.pcsr-service-card .dashicons { font-size: 22px; width: 22px; height: 22px; color: var(--logo-ink); }
.pcsr-service-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(3, 81, 94, 0.08);
}

@media (max-width: 767px) {
  .pcsr-service-grid { grid-template-columns: repeat(2, 1fr); }
}

#pcsr-review-summary .pcsr-review-group {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
#pcsr-review-summary .pcsr-review-group h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 8px;
  font-size: 13.5px;
}
#pcsr-review-summary .pcsr-review-edit {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
}
#pcsr-review-summary dl { margin: 0; font-size: 12.5px; }
#pcsr-review-summary dt { color: rgba(0, 0, 0, 0.5); float: right; clear: right; margin-inline-start: 8px; }
#pcsr-review-summary dd { margin: 0 0 4px; }
