/* Face Capture Pro — همهٔ سلکتورها زیر namespace ویجت تا تداخل نگیرد */
.facecp-pro-widget {
    --facecp-pro-accent: #00c49a;
    --facecp-pro-accent2: #00ffc3;
    --facecp-pro-text: #052019;
    position: relative;
    max-width: 420px;
    margin: 1rem auto;
}

.facecp-pro-debug-bar {
    font-size: 0.75rem;
    line-height: 1.35;
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #1a237e;
    color: #e8eaf6;
    text-align: center;
}

.facecp-pro-launch {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--facecp-pro-accent2), var(--facecp-pro-accent));
    color: var(--facecp-pro-text);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 196, 154, 0.35);
}

.facecp-pro-launch:hover {
    filter: brightness(1.06);
}

.facecp-pro-launch:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.facecp-pro-panel {
    position: fixed;
    inset: 0;
    z-index: 100050;
    margin: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 12px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: rgba(5, 10, 12, 0.72);
    backdrop-filter: blur(6px);
    overflow: auto;
    box-sizing: border-box;
}

.facecp-pro-panel[hidden] {
    display: none !important;
}

.facecp-pro-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 420px;
    margin-bottom: 8px;
    color: #fff;
}

.facecp-pro-panel__title {
    font-weight: 600;
    font-size: 0.95rem;
}

.facecp-pro-icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.facecp-pro-icon-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.facecp-pro-stage {
    position: relative;
    width: 100%;
    max-width: 420px;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    aspect-ratio: 3 / 4;
}

/* پیش‌نمایش سلفی مثل آینه؛ پردازش MediaPipe همچنان روی فریم خام ویدیو (بدون این ترنسفورم) */
.facecp-pro-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
}

.facecp-pro-canvas {
    display: none;
}

.facecp-pro-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    color: #fff;
    pointer-events: none;
}

.facecp-pro-guide {
    border: 2px dashed var(--facecp-pro-accent2);
    width: 70%;
    height: 46%;
    border-radius: 50%;
    margin-top: 18%;
    box-sizing: border-box;
}

.facecp-pro-status {
    background: rgba(0, 0, 0, 0.62);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    text-align: center;
    max-width: 95%;
}

.facecp-pro-progress {
    background: #000;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
}

.facecp-pro-previews-wrap {
    width: 100%;
    max-width: 420px;
    margin-top: 12px;
}

.facecp-pro-previews-label {
    display: block;
    color: #e8f7f3;
    font-size: 0.78rem;
    margin-bottom: 8px;
    opacity: 0.92;
}

.facecp-pro-previews {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.facecp-pro-thumb {
    position: relative !important;
    padding: 0 !important;
    border: 2px solid rgba(0, 255, 195, 0.45) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    cursor: zoom-in !important;
    background: #000 !important;
    width: 72px !important;
    height: 72px !important;
    flex-shrink: 0 !important;
}

.facecp-pro-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.facecp-pro-thumb__cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px 4px;
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    text-align: center;
}

.facecp-pro-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.88);
    box-sizing: border-box;
}

.facecp-pro-lightbox[hidden] {
    display: none !important;
}

.facecp-pro-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.facecp-pro-lightbox__close {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: #ffffff00 !important;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2;
}

.facecp-pro-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* ========== فرم جراح + اسکنر embed (هم‌رنگ با فرم) ========== */
.fcp-surgeon-root {
    --primary: #1e3a8a;
    --secondary: #5478d4;
    --accent: #ff6f61;
    --light: #f6f8fc;
    --dark: #172033;
    --muted: #697386;
    --surface: #ffffff;
    --surface-soft: #f9fbff;
    --line: #e5eaf4;
    --success: #28a745;
    --danger: #dc3545;
    --border-radius: 18px;
    --box-shadow: 0 24px 70px rgba(23, 32, 51, 0.12);
    --transition: all 0.22s ease;
    max-width: 100%;
    margin: 0 auto;
    color: var(--dark);
}

.fcp-surgeon-root .container {
    width: 100%;
    max-width: 550px;
    background:
        radial-gradient(circle at 85% 0%, rgba(84, 120, 212, 0.13), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid rgba(30, 58, 138, 0.08);
    border-radius: 24px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    position: relative;
    margin: 0 auto;
}

.fcp-surgeon-root .start-screen {
    background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
    text-align: center;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.fcp-surgeon-root .start-screen__content {
    padding: 18px 18px 20px;
}

.fcp-surgeon-root .start-screen h1 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    margin: 8px 0 14px;
    font-weight: 850;
    color: var(--dark);
    line-height: 1.55;
    letter-spacing: -0.03em;
}

.fcp-surgeon-root .start-screen p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.9;
    margin-bottom: 24px;
}

.fcp-surgeon-root .btn-start {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    width: 100%;
    padding: 14px 20px;
    font-weight: 800;
    font-size: 1rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 12px 28px rgba(30, 58, 138, 0.26);
}

.fcp-surgeon-root .btn-start:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.fcp-surgeon-root .titrcstyale {
    position: relative;
    text-decoration: none;
    color: var(--primary);
    white-space: nowrap;
    z-index: 0;
}

.fcp-surgeon-root .titrcstyale::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0.02em;
    height: 0.34em;
    border-radius: 999px;
    background: rgba(255, 111, 97, 0.24);
    z-index: -1;
}

.fcp-surgeon-root .form-wrapper {
    display: none;
    animation: fcpFadeIn 0.45s ease;
}

.fcp-surgeon-root .form-wrapper.active {
    display: block;
}

.fcp-surgeon-root .progress-container {
    padding: 18px 20px 16px;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(30, 58, 138, 0.08);
    backdrop-filter: blur(12px);
}

.fcp-surgeon-root .progress-bar {
    display: flex;
    height: 7px;
    background: #edf1f8;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 12px;
}

.fcp-surgeon-root #fcp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    width: 20%;
    transition: width 0.35s ease;
}

.fcp-surgeon-root .fcp-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-weight: 800;
    font-size: 0.85rem;
}

.fcp-surgeon-root .fcp-progress-labels span {
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    border-radius: 50%;
    background: #f0f3f9;
    color: #7b8496;
    font-size: 0.8rem;
    transition: var(--transition);
    box-shadow: inset 0 0 0 1px rgba(30, 58, 138, 0.06);
}

.fcp-surgeon-root .fcp-progress-labels span.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 8px 18px rgba(30, 58, 138, 0.28);
}

.fcp-surgeon-root .form-container {
    padding: 20px;
}

.fcp-surgeon-root .step {
    display: none;
    animation: fcpFadeIn 0.45s ease;
}

.fcp-surgeon-root .step.active {
    display: block;
}

.fcp-surgeon-root .step-heading {
    text-align: center;
    margin: 4px 0 20px;
}

.fcp-surgeon-root .fcp-step-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(30, 58, 138, 0.08);
    color: var(--primary);
    font-size: 0.73rem;
    font-weight: 850;
    line-height: 1.4;
}

.fcp-surgeon-root .step-title {
    text-align: center;
    color: var(--dark);
    font-size: clamp(1.18rem, 4vw, 1.48rem);
    font-weight: 900;
    line-height: 1.55;
    letter-spacing: -0.035em;
    margin: 9px 0 8px;
}

.fcp-surgeon-root .step-lead {
    margin: 0 auto;
    max-width: 440px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.85;
}

.fcp-surgeon-root .options-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.fcp-surgeon-root .option-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px 12px 14px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    min-height: 142px;
    box-shadow: 0 10px 28px rgba(23, 32, 51, 0.055);
    overflow: hidden;
}

.fcp-surgeon-root .option-card::after {
    content: "";
    position: absolute;
    inset: auto 14px 0;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transform: translateY(3px);
    transition: var(--transition);
}

.fcp-surgeon-root .option-card:hover {
    transform: translateY(-2px);
    border-color: rgba(30, 58, 138, 0.28);
    box-shadow: 0 14px 32px rgba(30, 58, 138, 0.12);
}

.fcp-surgeon-root .option-card.selected {
    border-color: rgba(30, 58, 138, 0.52);
    background: linear-gradient(180deg, rgba(84, 120, 212, 0.1), rgba(255, 255, 255, 0.96));
    box-shadow: 0 16px 36px rgba(30, 58, 138, 0.16);
}

.fcp-surgeon-root .option-card.selected::after {
    opacity: 1;
    transform: translateY(0);
}

.fcp-surgeon-root .option-card.selected::before {
    content: "\2713";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    line-height: 22px;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(30, 58, 138, 0.24);
}

.fcp-surgeon-root img.select-icon {
    max-width: 50px;
    margin: 0 auto 11px;
    display: block;
    filter: drop-shadow(0 8px 14px rgba(30, 58, 138, 0.1));
}

.fcp-surgeon-root .option-card h3 {
    font-size: 0.96rem;
    margin: 0 0 6px;
    font-weight: 850;
    color: #1f2937;
    line-height: 1.45;
}

.fcp-surgeon-root .option-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.65;
}

.fcp-surgeon-root .option-card--ai {
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 111, 97, 0.13), transparent 34%),
        linear-gradient(180deg, rgba(30, 58, 138, 0.045), #fff);
}

.fcp-surgeon-root .conditional-questions {
    background:
        linear-gradient(180deg, rgba(246, 248, 252, 0.96), rgba(255, 255, 255, 0.98));
    border-radius: 18px;
    padding: 16px;
    margin-top: 16px;
    border: 1px solid rgba(30, 58, 138, 0.1);
    box-shadow: inset 4px 0 0 rgba(30, 58, 138, 0.45);
    display: none;
}

.fcp-surgeon-root .conditional-questions.active {
    display: block;
}

.fcp-surgeon-root .conditional-step {
    display: none;
    margin-bottom: 16px;
}

.fcp-surgeon-root .conditional-intro {
    margin: 0 0 14px;
    color: #3f4a5f;
    font-size: 0.87rem;
    font-weight: 700;
    line-height: 1.8;
}

.fcp-surgeon-root .conditional-step h3,
.fcp-surgeon-root #conditionalStyle > h3 {
    margin: 0 0 12px;
    color: var(--dark);
    font-size: 0.94rem;
    font-weight: 850;
    line-height: 1.7;
}

.fcp-surgeon-root .conditional-step .option-card,
.fcp-surgeon-root .conditional-questions > .options-container .option-card {
    min-height: 0;
    padding: 13px 12px;
    font-weight: 800;
}

.fcp-surgeon-root .conditional-step.active {
    display: block;
}

.fcp-surgeon-root .result-text {
    background: rgba(40, 167, 69, 0.075);
    padding: 13px 15px;
    border-radius: 16px;
    margin-bottom: 16px;
    text-align: right;
    border: 1px solid rgba(40, 167, 69, 0.14);
    box-shadow: inset 4px 0 0 rgba(40, 167, 69, 0.5);
    font-size: 0.9rem;
    line-height: 1.75;
    color: #245236;
}

.fcp-surgeon-root .error-message {
    color: #b42318;
    text-align: center;
    margin-bottom: 16px;
    font-weight: 800;
    font-size: 0.9rem;
    display: none;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.12);
}

.fcp-surgeon-root .error-message#errorStepFace {
    margin-top: 8px;
}

.fcp-surgeon-root .contact-form-intro {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.fcp-surgeon-root .contact-form-card {
    padding: 14px;
    border: 1px solid rgba(30, 58, 138, 0.09);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 34px rgba(23, 32, 51, 0.06);
}

.fcp-surgeon-root .form-field {
    margin-bottom: 16px;
    text-align: right;
}

.fcp-surgeon-root .form-field:last-child {
    margin-bottom: 0;
}

.fcp-surgeon-root .form-field label {
    display: block;
    font-weight: 850;
    margin-bottom: 8px;
    font-size: 0.88rem;
    color: #273246;
}

.fcp-surgeon-root .form-field input,
.fcp-surgeon-root .form-field select {
    width: 100%;
    padding: 13px 14px;
    font-size: 1rem;
    border: 1px solid var(--line);
    border-radius: 15px;
    box-sizing: border-box;
    direction: rtl;
    background: #fff;
    color: var(--dark);
    transition: var(--transition);
}

.fcp-surgeon-root .form-field input[type="tel"] {
    direction: ltr;
    text-align: left;
}

.fcp-surgeon-root .form-field input:focus,
.fcp-surgeon-root .form-field select:focus {
    outline: none;
    border-color: rgba(30, 58, 138, 0.55);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

.fcp-surgeon-root .field-error {
    color: #b42318;
    font-size: 0.8rem;
    margin-top: 7px;
    line-height: 1.6;
    display: none;
}

.fcp-surgeon-root .field-error.visible {
    display: block;
}

.fcp-surgeon-root .form-field.has-error input,
.fcp-surgeon-root .form-field.has-error select {
    border-color: rgba(220, 53, 69, 0.72);
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.08);
}

.fcp-surgeon-root .btn {
    padding: 13px 20px;
    font-weight: 850;
    font-size: 0.95rem;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.fcp-surgeon-root .btn-next {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    flex: 1;
    box-shadow: 0 10px 24px rgba(30, 58, 138, 0.22);
}

.fcp-surgeon-root .btn-next:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.fcp-surgeon-root .btn-prev {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--line);
    min-width: 26%;
}

.fcp-surgeon-root .btn-prev:hover {
    border-color: rgba(30, 58, 138, 0.28);
    background: #f8faff;
}

.fcp-surgeon-root .navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.fcp-surgeon-root .navigation.step1 {
    justify-content: center;
}

.fcp-surgeon-root .navigation.step1 .btn-next {
    width: 100%;
}

.fcp-surgeon-root #fcp-next-face.btn-prev {
    flex: 1;
}

.fcp-surgeon-root #fcp-cancel-face {
    width: 100%;
    min-width: 100%;
    flex: 1 0 100%;
}

.fcp-surgeon-root.is-analysis-loading .progress-container,
.fcp-surgeon-root.is-analysis-loading #step5 > .step-heading,
.fcp-surgeon-root.is-analysis-loading #step5 > .step-title,
.fcp-surgeon-root.is-analysis-loading #doctorReason {
    display: none !important;
}

.fcp-surgeon-root.is-analysis-loading .container {
    background:
        radial-gradient(circle at 18% 0%, rgba(82, 118, 207, 0.12), transparent 32%),
        linear-gradient(180deg, #f7f9ff 0%, #ffffff 46%);
}

.fcp-surgeon-root.is-analysis-loading .form-container {
    padding: 14px;
}

.fcp-surgeon-root.is-analysis-loading #step5 {
    min-height: min(720px, calc(100svh - 28px));
    display: flex;
    align-items: center;
    justify-content: center;
}

.fcp-surgeon-root .loading-container {
    margin: 18px 0 22px;
}

.fcp-surgeon-root.is-analysis-loading .loading-container {
    width: 100%;
    margin: 0;
}

.fcp-surgeon-root .fcp-ai-loader {
    position: relative;
    overflow: hidden;
    padding: 0px;
}

.fcp-surgeon-root.is-analysis-loading .fcp-ai-loader {
    padding: 18px;
}

.fcp-surgeon-root .fcp-ai-loader::before {
    content: "";
    position: absolute;
    inset: -30% -20% auto;
    height: 180px;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.62), transparent);
    transform: rotate(8deg);
    animation: fcpAiSweep 5.5s ease-in-out infinite;
    pointer-events: none;
}

.fcp-surgeon-root .fcp-ai-loader__hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.fcp-surgeon-root .fcp-ai-orb {
    position: relative;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    box-shadow: 0 14px 30px rgba(35, 64, 148, 0.28);
}

.fcp-surgeon-root .fcp-ai-orb::before,
.fcp-surgeon-root .fcp-ai-orb::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    animation: fcpAiPulse 1.8s ease-in-out infinite;
}

.fcp-surgeon-root .fcp-ai-orb::after {
    inset: 20px;
    animation-delay: 0.45s;
}

.fcp-surgeon-root .fcp-ai-orb span {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.85);
}

.fcp-surgeon-root .fcp-ai-orb span:nth-child(1) {
    top: 16px;
    right: 17px;
    animation: fcpAiNode 2s ease-in-out infinite;
}

.fcp-surgeon-root .fcp-ai-orb span:nth-child(2) {
    left: 16px;
    top: 31px;
    animation: fcpAiNode 2.2s ease-in-out infinite 0.25s;
}

.fcp-surgeon-root .fcp-ai-orb span:nth-child(3) {
    right: 30px;
    bottom: 15px;
    animation: fcpAiNode 2.4s ease-in-out infinite 0.5s;
}

.fcp-surgeon-root .fcp-ai-loader__copy {
    position: relative;
    min-width: 0;
    text-align: right;
}

.fcp-surgeon-root .fcp-ai-loader__eyebrow {
    display: inline-flex;
    margin-bottom: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(35, 64, 148, 0.08);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
}

.fcp-surgeon-root .fcp-ai-loader__copy h3 {
    margin: 0 0 6px;
    font-size: 1.04rem;
    font-weight: 800;
    color: #1d2742;
    line-height: 1.45;
}

.fcp-surgeon-root .fcp-ai-loader__copy p {
    margin: 0;
    color: #5b6474;
    font-size: 0.84rem;
    line-height: 1.62;
}

.fcp-surgeon-root .fcp-ai-progress {
    position: relative;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf8;
    margin: 12px 0 14px;
}

.fcp-surgeon-root .fcp-ai-progress__bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    transition: width 0.45s ease;
    box-shadow: 0 0 18px rgba(82, 118, 207, 0.35);
}

.fcp-surgeon-root .fcp-ai-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.fcp-surgeon-root .fcp-ai-step {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(35, 64, 148, 0.08);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.74);
    transition: var(--transition);
}

.fcp-surgeon-root .fcp-ai-step.is-active {
    border-color: rgba(35, 64, 148, 0.28);
    background: #fff;
    box-shadow: 0 8px 20px rgba(35, 64, 148, 0.08);
}

.fcp-surgeon-root .fcp-ai-step.is-done {
    border-color: rgba(40, 167, 69, 0.18);
    background: rgba(40, 167, 69, 0.04);
}

.fcp-surgeon-root .fcp-ai-step__index {
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    text-align: center;
    background: #eef2fb;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.82rem;
}

.fcp-surgeon-root .fcp-ai-step.is-active .fcp-ai-step__index {
    background: var(--primary);
    color: #fff;
    animation: fcpAiPulse 1.6s ease-in-out infinite;
}

.fcp-surgeon-root .fcp-ai-step.is-done .fcp-ai-step__index {
    background: rgba(40, 167, 69, 0.12);
    color: var(--success);
}

.fcp-surgeon-root .fcp-ai-step__content {
    min-width: 0;
    text-align: right;
}

.fcp-surgeon-root .fcp-ai-step__title {
    display: block;
    font-size: 0.84rem;
    color: #1f2937;
    line-height: 1.45;
}

.fcp-surgeon-root .fcp-ai-step__subtitle {
    display: block;
    margin-top: 2px;
    color: #6b7280;
    font-size: 0.72rem;
    line-height: 1.45;
}

.fcp-surgeon-root .fcp-ai-step__state {
    white-space: nowrap;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f2f4f8;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 800;
}

.fcp-surgeon-root .fcp-ai-step.is-active .fcp-ai-step__state {
    background: rgba(35, 64, 148, 0.1);
    color: var(--primary);
}

.fcp-surgeon-root .fcp-ai-step.is-done .fcp-ai-step__state {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.fcp-surgeon-root .fcp-ai-console {
    border: 1px solid rgba(35, 64, 148, 0.1);
    border-radius: 14px;
    background: #101828;
    color: #f8fbff;
    overflow: hidden;
}

.fcp-surgeon-root .fcp-ai-console__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #dbe7ff;
    font-size: 0.76rem;
    font-weight: 800;
}

.fcp-surgeon-root .fcp-ai-console__body {
    min-height: 138px;
    max-height: 188px;
    overflow: auto;
    padding: 10px 12px;
    scroll-behavior: smooth;
}

.fcp-surgeon-root .fcp-ai-log-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    line-height: 1.58;
}

.fcp-surgeon-root .fcp-ai-log-item__dot {
    width: 8px;
    height: 8px;
    margin-top: 7px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.fcp-surgeon-root .fcp-ai-log-item.is-active {
    color: #fff;
}

.fcp-surgeon-root .fcp-ai-log-item.is-active .fcp-ai-log-item__dot {
    background: var(--secondary);
    box-shadow: 0 0 0 5px rgba(82, 118, 207, 0.18);
    animation: fcpAiNode 1.2s ease-in-out infinite;
}

.fcp-surgeon-root .fcp-ai-log-item.is-done .fcp-ai-log-item__dot {
    background: var(--success);
}

@keyframes fcpAiSweep {
    0%, 55% { transform: translateX(35%) rotate(8deg); opacity: 0; }
    68% { opacity: 1; }
    100% { transform: translateX(-55%) rotate(8deg); opacity: 0; }
}

@keyframes fcpAiPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.72; }
}

@keyframes fcpAiNode {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(1.45); opacity: 1; }
}

@media (max-width: 430px) {
    .fcp-surgeon-root .fcp-ai-loader {
        padding: 13px;
        border-radius: 16px;
    }

    .fcp-surgeon-root .fcp-ai-loader__hero {
        align-items: flex-start;
        gap: 11px;
    }

    .fcp-surgeon-root .fcp-ai-orb {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
    }

    .fcp-surgeon-root .fcp-ai-step {
        grid-template-columns: 30px 1fr;
    }

    .fcp-surgeon-root .fcp-ai-step__state {
        grid-column: 2;
        justify-self: start;
        margin-top: 4px;
    }

    .fcp-surgeon-root .fcp-ai-console__body {
        max-height: 164px;
    }
}

.fcp-surgeon-root .doctor-reason {
    background:
        linear-gradient(180deg, rgba(246, 248, 252, 0.96), rgba(255, 255, 255, 0.98));
    padding: 15px 16px;
    border-radius: 18px;
    margin-bottom: 16px;
    text-align: right;
    border: 1px solid rgba(30, 58, 138, 0.1);
    box-shadow: inset 4px 0 0 rgba(30, 58, 138, 0.45);
    color: #364155;
    font-size: 0.9rem;
    line-height: 1.8;
}

.fcp-surgeon-root .surgeon-selector-widget .selector-surgeon-cards-wrap .surgeon-card {
    background: #fff;
    border: 1px solid rgba(30, 58, 138, 0.09);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(23, 32, 51, 0.075);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.fcp-surgeon-root .surgeon-selector-widget .selector-surgeon-cards-wrap .surgeon-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(30, 58, 138, 0.12);
}

.fcp-surgeon-root .surgeon-selector-widget .selector-surgeon-cards-wrap .top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 10px;
}

.fcp-surgeon-root .surgeon-selector-widget .info-part .title {
    color: var(--primary);
    font-weight: 850;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.55;
}

.fcp-surgeon-root .surgeon-selector-widget .thumb {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 3px solid #eef3ff;
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.12);
}

.fcp-surgeon-root .buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

.fcp-surgeon-root .cta-section {
    margin-top: 18px;
    padding: 16px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 111, 97, 0.12), transparent 36%),
        linear-gradient(180deg, #ffffff, #f8faff);
    border: 1px solid rgba(30, 58, 138, 0.09);
    box-shadow: 0 14px 34px rgba(23, 32, 51, 0.06);
}

.fcp-surgeon-root .cta-title {
    margin: 0 0 10px;
    color: var(--dark);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.6;
    text-align: right;
}

.fcp-surgeon-root .cta-text {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.8;
    text-align: right;
}

.fcp-surgeon-root .btn-whatsapp {
    background: #25d366;
    color: #fff;
    box-shadow: 0 10px 22px rgba(37, 211, 102, 0.22);
}

.fcp-surgeon-root .btn-call {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.fcp-surgeon-root .cta-note {
    background: rgba(255, 111, 97, 0.11);
    font-size: 0.8rem;
    padding: 9px 11px;
    border-radius: 14px;
    border: 1px solid rgba(255, 111, 97, 0.16);
    box-shadow: inset 4px 0 0 rgba(255, 111, 97, 0.55);
    text-align: right;
    color: #5f342f;
    line-height: 1.7;
}

/* اسکنر داخل فرم */
.fcp-surgeon-root .facecp-pro-widget--embed {
    --facecp-pro-accent: #234094;
    --facecp-pro-accent2: #5276cf;
    --facecp-pro-text: #1e1e1e;
    max-width: 100%;
    margin: 0 0 8px;
}

.fcp-surgeon-root .facecp-pro-embed-card {
    background: linear-gradient(180deg, #f5f7fc 0%, #fff 40%);
    border: 1px solid rgba(35, 64, 148, 0.12);
    border-radius: var(--border-radius);
    padding: 12px;
    box-shadow: 0 4px 18px rgba(35, 64, 148, 0.08);
}

.fcp-surgeon-root .facecp-pro-embed-hint {
    font-size: 0.82rem;
    color: #515151;
    text-align: center;
    line-height: 1.55;
    margin-bottom: 10px;
}

.fcp-surgeon-root .facecp-pro-stage {
    border-radius: var(--border-radius);
    border: 2px solid rgba(35, 64, 148, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.fcp-surgeon-root .facecp-pro-guide {
    border-color: var(--secondary);
    border-style: solid;
    box-shadow: 0 0 0 1px rgba(82, 118, 207, 0.25);
}

.fcp-surgeon-root .facecp-pro-status {
    background: rgba(35, 64, 148, 0.88);
    font-size: 0.78rem;
    padding: 8px 12px;
    border-radius: 8px;
}

.fcp-surgeon-root .facecp-pro-progress {
    background: rgba(35, 64, 148, 0.95);
    color: #fff;
    font-size: 0.75rem;
    border-radius: 8px;
}

.fcp-surgeon-root .facecp-pro-previews-wrap {
    margin-top: 12px;
}

.fcp-surgeon-root .facecp-pro-previews-label {
    color: var(--dark);
    font-size: 0.78rem;
}

.fcp-surgeon-root .facecp-pro-thumb {
    border-color: rgba(35, 64, 148, 0.35);
}

@keyframes fcpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 480px) {
    .fcp-surgeon-root .container {
        border-radius: 20px;
    }

    .fcp-surgeon-root .form-container {
        padding: 16px;
    }

    .fcp-surgeon-root .options-container {
        gap: 10px;
    }

    .fcp-surgeon-root .option-card {
        min-height: 136px;
        padding: 14px 10px 12px;
    }

    .fcp-surgeon-root .option-card p {
        font-size: 0.72rem;
    }

    .fcp-surgeon-root .fcp-progress-labels span {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 0.72rem;
    }
}

@media (max-width: 360px) {
    .fcp-surgeon-root .options-container {
        grid-template-columns: 1fr;
    }

    .fcp-surgeon-root .option-card {
        min-height: 0;
    }
}

/* ========== قاب embed: ارتفاع طبیعی بدون اسکرول داخلی؛ نسبت تصویر فقط روی ناحیهٔ دوربین ========== */
.facecp-pro-widget--embed .fcp-embed-frame {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    border-radius: var(--border-radius, 12px);
    overflow: visible;
    box-sizing: border-box;
}

.facecp-pro-widget--embed .fcp-scan-intro {
    position: relative;
    z-index: 5;
    overflow: visible;
    border-radius: var(--border-radius, 12px);
    box-sizing: border-box;
}

.facecp-pro-widget--embed .fcp-scan-intro[hidden] {
    display: none !important;
}

.facecp-pro-widget--embed .fcp-scan-intro__inner {
    padding: 8px 8px 10px;
    text-align: right;
    direction: rtl;
    max-width: 100%;
    box-sizing: border-box;
}

.facecp-pro-widget--embed .fcp-scan-intro__title {
    margin: 0 0 12px;
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--primary, #234094);
    letter-spacing: -0.02em;
}

.facecp-pro-widget--embed .fcp-scan-intro__lead {
    margin: 0 0 14px;
    font-size: 0.88rem;
    line-height: 1.65;
    color: #3a3f48;
}

.facecp-pro-widget--embed .fcp-scan-intro__sub {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary, #234094);
}

.facecp-pro-widget--embed .fcp-scan-intro__list {
    margin: 0;
    padding: 0 18px 0 0;
    font-size: 0.82rem;
    line-height: 1.65;
    color: #444;
}

.facecp-pro-widget--embed .fcp-scan-intro__list li {
    margin-bottom: 6px;
}

.facecp-pro-widget--embed .fcp-scan-intro__list li:last-child {
    margin-bottom: 0;
}

/* خطای دوربین (embed) — هم‌خوان با کارت راهنما و تم فرم */
.facecp-pro-widget--embed .fcp-scan-camera-error {
    position: relative;
    z-index: 5;
    overflow: visible;
    border-radius: var(--border-radius, 12px);
    box-sizing: border-box;
}

.facecp-pro-widget--embed .fcp-scan-camera-error[hidden] {
    display: none !important;
}

.facecp-pro-widget--embed .fcp-scan-camera-error__inner {
    padding: 20px 16px 18px;
    text-align: right;
    direction: rtl;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: var(--border-radius, 12px);
}

.facecp-pro-widget--embed .fcp-scan-camera-error__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    line-height: 48px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.11);
    color: #c82333;
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(220, 53, 69, 0.12);
}

.facecp-pro-widget--embed .fcp-scan-camera-error__title {
    margin: 0 0 10px;
    font-size: 1.06rem;
    font-weight: 800;
    color: #b02a37;
    text-align: center;
    letter-spacing: -0.02em;
}

.facecp-pro-widget--embed .fcp-scan-camera-error__text {
    margin: 0 0 18px;
    font-size: 0.88rem;
    line-height: 1.72;
    color: #3d4450;
    text-align: right;
}

.facecp-pro-widget--embed .fcp-scan-camera-error__inner .fcp-btn-primary {
    margin-top: 2px;
}

.facecp-pro-widget--embed .fcp-btn-primary {
    width: 100%;
    margin-top: 18px;
    padding: 13px 18px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 11px;
    background: linear-gradient(145deg, var(--secondary, #5276cf), var(--primary, #234094));
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(35, 64, 148, 0.28);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.facecp-pro-widget--embed .fcp-btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.facecp-pro-widget--embed .fcp-btn-outline {
    width: 100%;
    margin-top: 14px;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.88rem;
    border: 2px solid var(--primary, #234094);
    border-radius: 11px;
    background: #fff;
    color: var(--primary, #234094);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.facecp-pro-widget--embed .fcp-btn-outline:hover {
    background: var(--primary, #234094);
    color: #fff;
}

.facecp-pro-widget--embed .fcp-scan-live-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: transparent;
    box-sizing: border-box;
}

.facecp-pro-widget--embed .fcp-scan-live-wrap[hidden] {
    display: none !important;
}

.facecp-pro-widget--embed .fcp-live-hint {
    flex-shrink: 0;
    margin: 0 0 8px;
    padding: 0 4px;
    font-size: 0.78rem;
    line-height: 1.55;
    color: #515151;
    text-align: center;
}

.facecp-pro-widget--embed .fcp-embed-stage {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: min(62vh, 480px);
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    border: 2px solid rgba(35, 64, 148, 0.2);
    box-sizing: border-box;
}

.facecp-pro-widget--embed .fcp-embed-stage.fcp-embed-stage--summary {
    /* خلاصه: ارتفاع با محتوا تا بریدگی و اسکرول داخل باکس نباشد */
    aspect-ratio: unset;
    max-height: none;
    height: auto;
    min-height: 0;
    overflow: visible;
}

.facecp-pro-widget--embed .fcp-embed-stage.fcp-embed-stage--summary .fcp-scan-done-panel {
    position: relative;
    inset: auto;
    min-height: 0;
}

.facecp-pro-widget--embed .fcp-embed-video-layer {
    position: absolute;
    inset: 0;
}

.facecp-pro-widget--embed .fcp-embed-video-layer[hidden] {
    display: none !important;
}

.facecp-pro-widget--embed .facecp-pro-stage {
    max-width: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
}

.facecp-pro-widget--embed .fcp-scan-done-panel {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    overflow: visible;
}

.facecp-pro-widget--embed .fcp-scan-done-panel[hidden] {
    display: none !important;
}

.facecp-pro-widget--embed .fcp-scan-done__inner {
    padding: 8px 8px 10px;
    background: linear-gradient(180deg, #f5f7fc 0%, #fff 40%);
    text-align: center;
    direction: rtl;
    max-width: 100%;
    box-sizing: border-box;
    width: 100%;
}

.facecp-pro-widget--embed .fcp-scan-done__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    line-height: 52px;
    border-radius: 50%;
    background: rgba(40, 167, 69, 0.14);
    color: #1e7e34;
    font-size: 1.6rem;
    font-weight: 800;
}

.facecp-pro-widget--embed .fcp-scan-done__title {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary, #234094);
}

.facecp-pro-widget--embed .fcp-scan-done__text {
    margin: 0 0 6px;
    font-size: 0.86rem;
    line-height: 1.68;
    color: #3d4450;
}

/* پیش‌نمایش داخل باکس نتیجه (بین متن و دکمهٔ اسکن مجدد) */
.facecp-pro-widget--embed .fcp-scan-done__inner .facecp-pro-previews-wrap {
    margin-top: 14px;
    margin-bottom: 6px;
    padding: 12px 10px;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 12px;
    border: 1px solid rgba(35, 64, 148, 0.1);
    box-sizing: border-box;
}

.facecp-pro-widget--embed .fcp-scan-done__inner .facecp-pro-previews-label {
    color: var(--primary, #234094);
    font-weight: 700;
    font-size: 0.78rem;
    margin-bottom: 10px;
    text-align: center;
    opacity: 1;
}

.facecp-pro-widget--embed .fcp-scan-done__inner .facecp-pro-thumb {
    border-color: rgba(35, 64, 148, 0.35);
}

.facecp-pro-widget--embed .fcp-scan-done__inner .fcp-btn-outline {
    margin-top: 16px;
}

.facecp-pro-widget--embed .facecp-pro-previews-wrap {
    flex-shrink: 0;
    margin-top: 0;
    padding-top: 0;
}

/* برچسب زاویه در حالت embed (روی ویدیو) */
.facecp-pro-widget--embed .facecp-pro-overlay .facecp-pro-progress {
    background: rgb(121 121 121 / 25%);
    color: #d4d4d4;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 8px 16px;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    white-space: nowrap;
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 380px) {
    .facecp-pro-widget--embed .facecp-pro-overlay .facecp-pro-progress {
        font-size: 0.72rem;
        padding: 6px 12px;
    }
}

@media (min-width: 600px) {
    #selectorSurgeonsList {
        grid-template-columns: repeat(1, 1fr);
        gap: 5px;
    }
}