/* ── MansakhtamScreen parity ── */
body.ic-mansakhtam {
  background: #fff;
}

@media (min-width: 1px) {
  body.ic-mansakhtam .ic-header,
  body.ic-mansakhtam .ic-footer,
  body.ic-mansakhtam .ic-tabbar {
    display: none;
  }
}

.ic-msk {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.ic-msk-head {
  display: flex;
  flex-direction: row;
  direction: ltr;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #fff;
  flex-shrink: 0;
}

.ic-msk-head-space {
  width: 24px;
  flex-shrink: 0;
}

.ic-msk-title {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 400;
  color: #2d3a4a;
}

.ic-msk-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  flex-shrink: 0;
  text-decoration: none;
}

.ic-msk-close-icon {
  width: 25px;
  height: 25px;
  display: block;
}

.ic-msk-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px;
  text-align: center;
}

.ic-msk-illustration {
  width: 78vw;
  max-width: 420px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  margin-top: 20px;
  margin-bottom: 70px;
}

.ic-msk-heading {
  margin: 0 0 5px;
  font-family: "IRANYekanFa", "IRANYekan", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #2d3a4a;
  text-align: center;
}

.ic-msk-text {
  margin: 0 0 32px;
  padding-inline: 25px;
  max-width: 520px;
  font-size: 12.8px;
  font-weight: 400;
  line-height: 25px;
  color: #6a81a9;
  text-align: center;
}

.ic-msk-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: -10px;
  margin-bottom: 24px;
  padding: 12px 25px;
  border: 0;
  border-radius: 20px;
  background: #4785ff;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  font-family: inherit;
  cursor: pointer;
}

.ic-msk-start:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── UploadScreen parity ── */
body.ic-upload-sakht {
  background: #fff;
}

@media (min-width: 1px) {
  body.ic-upload-sakht .ic-header,
  body.ic-upload-sakht .ic-footer,
  body.ic-upload-sakht .ic-tabbar {
    display: none;
  }
}

.ic-upl {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: #fff;
  position: relative;
}

.ic-upl-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px 0;
  flex-shrink: 0;
  background: #fff;
}

.ic-upl-title {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 400;
  color: #2d3a4a;
  text-align: center;
}

.ic-upl-back {
  position: absolute;
  right: 15px;
  top: 10px;
  display: inline-flex;
  width: 30px;
  height: 30px;
}

.ic-upl-back img {
  width: 30px;
  height: 30px;
  display: block;
  filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(1204%) hue-rotate(190deg) brightness(97%) contrast(92%);
}

.ic-upl-info {
  position: absolute;
  left: 20px;
  top: 13px;
  padding: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.ic-upl-info img {
  width: 22px;
  height: 22px;
  display: block;
  filter: brightness(0) saturate(100%) invert(20%) sepia(12%) saturate(1024%) hue-rotate(178deg) brightness(95%) contrast(90%);
}

.ic-upl-scroll {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;
}

.ic-upl-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 18px 22px 22px;
  text-align: center;
}

.ic-upl-subtitle {
  margin: 5px 0 12px;
  font-family: "IRANYekanFa", "IRANYekan", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #2d3a4a;
  text-align: center;
}

.ic-upl-desc {
  margin: 0 0 16px;
  padding-inline: 20px;
  max-width: 520px;
  font-size: 11.5px;
  line-height: 24px;
  color: #6a81a9;
  text-align: center;
}

.ic-upl-input {
  width: 100%;
  max-width: 100%;
  height: 200px;
  margin: 15px 0 38px;
  padding: 15px 16px 16px;
  border: 0.9px solid #ddeafb;
  border-radius: 20px;
  background: #fff;
  color: #2d3a4a;
  font: inherit;
  font-size: 10.5px;
  line-height: 1.8;
  text-align: right;
  resize: none;
  outline: none;
  box-sizing: border-box;
}

.ic-upl-input:focus {
  border-color: #4e91e6;
}

.ic-upl-input::placeholder {
  color: #b7b7b7;
}

.ic-upl-hint {
  margin: 0 0 7px;
  font-size: 10.5px;
  color: #919aaf;
}

.ic-upl-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin-top: 20px;
  padding: 15px;
  border: 1.3px dashed #c2d7f2;
  border-radius: 20px;
  background: #f9fbff;
  cursor: pointer;
  box-sizing: border-box;
}

.ic-upl-box.is-disabled {
  background: #f5f5f5;
  border-color: #e0e0e0;
  pointer-events: none;
}

.ic-upl-box.is-uploading {
  pointer-events: none;
}

.ic-upl-box-icon {
  width: 30px;
  height: 30px;
  display: block;
  filter: brightness(0) saturate(100%) invert(84%) sepia(12%) saturate(742%) hue-rotate(178deg) brightness(98%) contrast(92%);
}

.ic-upl-box.is-disabled .ic-upl-box-icon {
  filter: brightness(0) saturate(100%) invert(82%) sepia(7%) saturate(286%) hue-rotate(156deg) brightness(94%) contrast(88%);
}

.ic-upl-box-text {
  font-size: 10px;
  color: #91add0;
}

.ic-upl-box.is-disabled .ic-upl-box-text {
  color: #919aaf;
}

.ic-upl-box.is-uploading .ic-upl-box-icon,
.ic-upl-box.is-uploading .ic-upl-box-text {
  display: none;
}

.ic-upl-progress {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 5px;
}

.ic-upl-progress[hidden] {
  display: none !important;
}

.ic-upl-progress-track {
  width: 80%;
  height: 6px;
  border-radius: 3px;
  background: #e0e0e0;
  overflow: hidden;
}

.ic-upl-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: #4e91e6;
  transition: width 0.15s ease;
}

.ic-upl-progress-pct {
  margin-top: 5px;
  font-size: 10px;
  font-family: "IRANYekanFa", "IRANYekan", sans-serif;
  color: #4e91e6;
}

.ic-upl-files-wrap {
  width: 100%;
  max-width: 100%;
  margin-top: 4px;
}

.ic-upl-files-wrap[hidden] {
  display: none !important;
}

.ic-upl-files-title {
  margin: 20px 0;
  font-size: 11px;
  color: #2d3a4a;
  text-align: center;
}

.ic-upl-files {
  display: flex;
  flex-direction: row-reverse;
  gap: 14px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 14px 12px 8px;
  scroll-padding-inline: 12px;
  -webkit-overflow-scrolling: touch;
}

.ic-upl-file {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
  padding-top: 2px;
}

.ic-upl-file-media {
  position: relative;
  width: 70px;
  height: 70px;
  overflow: visible;
  border-radius: 15px;
}

.ic-upl-file-media > img,
.ic-upl-file-media > video {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 15px;
  border: 1px solid #e8ecf0;
  background: #f3f5f9;
  display: block;
}

/* لایه شفاف سیاه روی تصویر/ویدئو */
.ic-upl-file-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.10);
  pointer-events: none;
  z-index: 1;
}

.ic-upl-file-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 2;
  width: 24px;
  height: 24px;
  padding: 4px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ic-upl-file-remove img {
  width: 16px;
  height: 16px;
  display: block;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  /* tint #91add0 — same as app removeIcon */
  filter: brightness(0) saturate(100%) invert(68%) sepia(12%) saturate(742%) hue-rotate(178deg) brightness(98%) contrast(88%);
  pointer-events: none;
}

.ic-upl-file-type {
  margin-top: 5px;
  font-size: 10px;
  color: #919aaf;
}

.ic-upl-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
  padding: 12px 22px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
}

.ic-upl-footer.is-hidden {
  display: flex; /* keep submit visible even if class leftover */
}

.ic-upl-submit {
  width: 100%;
  max-width: 100%;
  height: 60px;
  border: 0;
  border-radius: 16px;
  background: #4785ff;
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.ic-upl-submit:disabled {
  background: #bfccd4;
  cursor: not-allowed;
}

.ic-upl-submit.is-loading {
  pointer-events: none;
}

.ic-upl-submit .ic-upl-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ic-upl-spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes ic-upl-spin {
  to { transform: rotate(360deg); }
}

.ic-upl-toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  z-index: 60;
  transform: translateX(-50%);
  min-width: 130px;
  padding: 12px 14px;
  border-radius: 15px;
  background: #2d3a4a;
  color: #fff;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.ic-upl-toast[hidden] {
  display: none !important;
}

.ic-upl-success-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ic-upl-success-modal[hidden] {
  display: none !important;
}

.ic-upl-success-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.ic-upl-success-card {
  position: relative;
  z-index: 1;
  width: min(85vw, 420px);
  background: #fff;
  border-radius: 24px;
  padding: 30px;
  text-align: center;
}

.ic-upl-success-card h2 {
  margin: 0 0 15px;
  font-size: 14px;
  font-family: "IRANYekanFa", "IRANYekan", sans-serif;
  font-weight: 700;
  color: #2d3a4a;
  text-align: center;
}

.ic-upl-success-card p {
  margin: 0 0 10px;
  font-size: 11.5px;
  line-height: 27px;
  color: #4a5a6a;
}

.ic-upl-success-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  border: 0;
  border-radius: 12px;
  background: #4e91e6;
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
