/* آموزش کارشناس فنی — مثل ExpertSupportCoach در اپ */

.ic-expert-coach-dialog {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ic-expert-coach-dialog.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.ic-expert-coach-dialog-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.ic-expert-coach-dialog-card {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
  background: #fff;
  border-radius: 24px;
  padding: 30px;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.ic-expert-coach-dialog.is-visible .ic-expert-coach-dialog-card {
  transform: scale(1);
}

.ic-expert-coach-dialog-title {
  margin: 0 0 15px;
  font-size: 14px;
  font-weight: 700;
  color: #2d3a4a;
}

.ic-expert-coach-dialog-message {
  margin: 0 0 10px;
  font-size: 11.5px;
  line-height: 27px;
  color: #4a5a6a;
}

.ic-expert-coach-dialog-actions {
  margin-top: 16px;
}

.ic-expert-coach-dialog-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 16px 32px;
  border: 0;
  border-radius: 14px;
  background: #4e91e6;
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.ic-expert-coach-wait {
  display: none;
  background: #eef4fc;
  margin: 0 -12px;
  padding: 10px 16px 10px;
  border-bottom: 1px solid #c8daf4;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.ic-expert-coach-wait.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.ic-cmt-composer.is-project-owner-coach {
  padding-top: 0;
  border-top-color: #c8daf4;
}

.ic-cmt-composer.is-project-viewer [data-expert-coach-anchor],
.ic-cmt.is-project-viewer [data-cmt-reply-expert],
.ic-pjv.is-project-viewer [data-cmt-reply-expert] {
  display: none !important;
}

.ic-cmt-composer.is-project-viewer [data-project-owner-coach] {
  display: none !important;
}

.ic-cmt-composer.is-coach-wait {
  padding-top: 0;
  border-top-color: #c8daf4;
}

.ic-expert-coach-wait-text {
  margin: 0;
  font-size: 11px;
  line-height: 28px;
  color: #2d3a4a;
}

.ic-expert-coach-wait-confirm {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  border: 0;
  background: transparent;
  color: #4e91e6;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ic-expert-coach-wait-confirm:disabled,
.ic-expert-coach-wait-confirm.is-disabled {
  color: #a8b8cc;
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.ic-expert-coach-anchor {
  position: relative;
  flex-shrink: 0;
  align-self: center;
}

.ic-expert-coach-pulse {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ic-expert-coach-pulse.is-active::before,
.ic-expert-coach-pulse.is-active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  margin-top: -25px;
  margin-left: -28px;
  border: 2px solid #4e91e6;
  border-radius: 50%;
  opacity: 0;
  animation: ic-expert-coach-ring 1.2s ease-out infinite;
}

.ic-expert-coach-pulse.is-active::after {
  animation-delay: 0.6s;
}

@keyframes ic-expert-coach-ring {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  15% {
    opacity: 0.55;
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

.ic-expert-coach-tap-hint {
  position: absolute;
  bottom: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  font-size: 20px;
  line-height: 1;
  opacity: 0.35;
}

.ic-expert-coach-tap-hint.is-active {
  animation: ic-expert-coach-tap-hint 1.4s ease-in-out infinite;
}

@keyframes ic-expert-coach-tap-hint {
  0%, 100% {
    opacity: 0.35;
    transform: translateX(-50%) translateY(-4px);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(4px);
  }
}

.ic-expert-coach-anchor .ic-cmt-expert-toggle {
  position: relative;
  z-index: 1;
}

.ic-cmt-input.is-coach-blocked,
.ic-cmt-composer.is-coach-wait .ic-cmt-input-wrap.is-coach-blocked {
  pointer-events: none;
}

.ic-cmt-input-lock-overlay.is-coach-blocked {
  display: block;
  pointer-events: auto;
  background: transparent;
}

body.ic-expert-coach-open {
  overflow: hidden;
}
