/* 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-step__summary {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.fcp-surgeon-root .fcp-ai-step__accordion {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    overflow: hidden;
    transition:
        grid-template-rows 0.48s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.28s ease;
}

.fcp-surgeon-root .fcp-ai-step__accordion-inner {
    min-height: 0;
    overflow: hidden;
}

.fcp-surgeon-root .fcp-ai-step.has-accordion.is-expanded .fcp-ai-step__accordion {
    grid-template-rows: 1fr;
    opacity: 1;
}

.fcp-surgeon-root .fcp-ai-step.has-accordion.is-expanded {
    border-color: rgba(35, 64, 148, 0.3);
    background:
        radial-gradient(circle at 88% 15%, rgba(84, 120, 212, 0.09), transparent 38%),
        #fff;
    box-shadow: 0 14px 34px rgba(35, 64, 148, 0.11);
}

.fcp-surgeon-root .fcp-ai-step.has-accordion.is-expanded .fcp-ai-step__summary {
    border-bottom: 1px solid rgba(35, 64, 148, 0.08);
}

.fcp-surgeon-root .fcp-ai-step.has-accordion.is-expanded .fcp-ai-step__accordion-inner {
    padding: 0 10px 10px;
}

.fcp-surgeon-root .fcp-ai-step.has-accordion.is-expanded.is-scan-compact .fcp-ai-step__accordion-inner {
    padding-bottom: 8px;
}

.fcp-surgeon-root .fcp-ai-step.has-accordion:not(.is-expanded) .fcp-ai-step__accordion-inner {
    padding: 0;
}

.fcp-surgeon-root .fcp-ai-face-stage {
    overflow: hidden;
    border-top: 1px solid rgba(35, 64, 148, 0.06);
}

.fcp-surgeon-root .fcp-ai-face-stage__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 2px 8px;
}

.fcp-surgeon-root .fcp-ai-face-stage__status {
    min-width: 0;
    flex: 1;
    min-height: 18px;
    color: #5b6474;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.55;
    text-align: right;
}

.fcp-surgeon-root .fcp-ai-scan-angles {
    display: flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
    padding: 3px;
    border: 1px solid rgba(35, 64, 148, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.fcp-surgeon-root .fcp-ai-scan-angle {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #d8e0f0;
    transition:
        width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.35s ease;
}

.fcp-surgeon-root .fcp-ai-scan-angle.is-current {
    width: 28px;
    background: linear-gradient(90deg, var(--secondary, #5478d4), var(--accent, #ff6f61));
    box-shadow: 0 0 12px rgba(84, 120, 212, 0.3);
    transform: scaleY(1.05);
}

.fcp-surgeon-root .fcp-ai-scan-angle.is-done {
    background: var(--success, #28a745);
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.12);
}

.fcp-surgeon-root .fcp-ai-scan-angle.is-done.is-current {
    background: linear-gradient(90deg, #2f9e57, var(--accent, #ff6f61));
}

.fcp-surgeon-root .fcp-ai-face-gallery {
    --face-slide-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --face-slide-duration: 0.78s;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition:
        max-height 0.52s var(--face-slide-ease),
        opacity 0.34s ease,
        transform 0.42s var(--face-slide-ease),
        margin 0.42s ease;
}

.fcp-surgeon-root .fcp-ai-face-stage.is-live .fcp-ai-face-gallery {
    max-height: 460px;
    margin: 2px 0 8px;
    padding: 0 0 6px;
    opacity: 1;
    transform: translateY(0);
}

.fcp-surgeon-root .fcp-ai-face-viewport {
    position: relative;
    width: min(100%, 286px);
    margin: 0 auto;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    direction: ltr;
    isolation: isolate;
}

.fcp-surgeon-root .fcp-ai-face-track {
    display: flex;
    width: 100%;
    direction: ltr;
    will-change: transform;
    transform: translate3d(-100%, 0, 0);
    transition: transform var(--face-slide-duration) var(--face-slide-ease);
}

.fcp-surgeon-root .fcp-ai-face-gallery[data-active-view="left"] .fcp-ai-face-track {
    transform: translate3d(0, 0, 0);
}

.fcp-surgeon-root .fcp-ai-face-gallery[data-active-view="front"] .fcp-ai-face-track {
    transform: translate3d(-100%, 0, 0);
}

.fcp-surgeon-root .fcp-ai-face-gallery[data-active-view="right"] .fcp-ai-face-track {
    transform: translate3d(-200%, 0, 0);
}

.fcp-surgeon-root .fcp-ai-face-gallery.is-instant .fcp-ai-face-track {
    transition: none;
}

.fcp-surgeon-root .fcp-ai-face-card {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 0.42;
    transform: scale(0.965);
    transform-origin: center center;
    transition:
        opacity 0.45s ease,
        transform var(--face-slide-duration) var(--face-slide-ease);
}

.fcp-surgeon-root .fcp-ai-face-card.is-active-slide {
    z-index: 2;
    opacity: 1;
    transform: scale(1);
}

.fcp-surgeon-root .fcp-ai-face-card.is-processing.is-active-slide,
.fcp-surgeon-root .fcp-ai-face-card.is-success.is-active-slide,
.fcp-surgeon-root .fcp-ai-face-card.is-error.is-active-slide {
    opacity: 1;
}

.fcp-surgeon-root .fcp-ai-face-card__head {
    position: absolute;
    z-index: 9;
    top: 18px;
    right: 18px;
    left: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 0;
    padding: 0;
    pointer-events: none;
}

.fcp-surgeon-root .fcp-ai-face-card__label {
    overflow: hidden;
    max-width: 70%;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    color: #1f2a44;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 6px 16px rgba(23, 32, 51, 0.1);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.fcp-surgeon-root .fcp-ai-face-card__state {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    color: transparent;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 6px 14px rgba(23, 32, 51, 0.1);
    font-size: 0.58rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    transition: all 0.35s ease;
    backdrop-filter: blur(8px);
}

.fcp-surgeon-root .fcp-ai-face-card.is-processing .fcp-ai-face-card__state {
    border-color: rgba(84, 120, 212, 0.35);
    color: transparent;
    background: var(--secondary, #5478d4);
    box-shadow: 0 0 0 4px rgba(84, 120, 212, 0.12);
    animation: fcpAiPulse 1.4s ease-in-out infinite;
}

.fcp-surgeon-root .fcp-ai-face-card.is-success .fcp-ai-face-card__state {
    border-color: rgba(40, 167, 69, 0.35);
    color: #fff;
    background: var(--success, #28a745);
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.12);
    animation: none;
}

.fcp-surgeon-root .fcp-ai-face-card__visual {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background: transparent;
    isolation: isolate;
    transform: translateZ(0);
    transition:
        aspect-ratio 0.35s var(--face-slide-ease),
        transform var(--face-slide-duration) var(--face-slide-ease),
        filter 0.45s ease;
}

.fcp-surgeon-root .fcp-ai-face-card__visual .source-image,
.fcp-surgeon-root .fcp-ai-face-card__visual .mesh-canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.fcp-surgeon-root .fcp-ai-face-card__visual .source-image {
    object-fit: fill;
    object-position: center;
    opacity: 0.84;
    filter: saturate(0.9) contrast(1.02) brightness(0.95);
    transition:
        opacity 0.4s ease,
        filter 0.4s ease,
        transform 0.8s var(--face-slide-ease);
    transform: scale(1.015);
}

.fcp-surgeon-root .fcp-ai-face-card.is-active-slide .source-image {
    transform: scale(1);
}

.fcp-surgeon-root .fcp-ai-face-card.is-processing .source-image {
    opacity: 0.92;
    filter: saturate(0.92) contrast(1.03) brightness(0.93);
}

.fcp-surgeon-root .fcp-ai-face-card.is-success .source-image {
    opacity: 0.94;
    filter: saturate(0.94) contrast(1.03) brightness(0.96);
}

.fcp-surgeon-root .fcp-ai-face-card__visual .mesh-canvas {
    z-index: 3;
    pointer-events: none;
}

.fcp-surgeon-root .fcp-ai-face-card__visual .scan-field {
    display: none !important;
}

.fcp-surgeon-root .fcp-ai-face-card__visual .scan-beam {
    position: absolute;
    top: var(--scan-top, 0);
    left: var(--scan-left, 0);
    z-index: 7;
    display: none;
    width: var(--scan-width, 100%);
    height: 1px;
    overflow: visible;
    border-radius: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(84, 120, 212, 0.2) 10%,
        rgba(255, 255, 255, 0.95) 48%,
        rgba(255, 111, 97, 0.85) 52%,
        rgba(84, 120, 212, 0.2) 90%,
        transparent 100%
    );
    box-shadow:
        0 0 0 0.5px rgba(255, 255, 255, 0.55),
        0 0 10px rgba(255, 111, 97, 0.45),
        0 0 22px rgba(84, 120, 212, 0.22);
    animation: face-sweep 3.6s cubic-bezier(0.4, 0.05, 0.3, 1) infinite;
}

.fcp-surgeon-root .fcp-ai-face-card__visual .scan-beam::before {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 64px;
    content: "";
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(255, 111, 97, 0.2) 0%,
        rgba(84, 120, 212, 0.1) 28%,
        transparent 78%
    );
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.fcp-surgeon-root .fcp-ai-face-card__visual .scan-beam::after {
    position: absolute;
    top: -1px;
    right: 6%;
    left: 6%;
    height: 3px;
    content: "";
    pointer-events: none;
    opacity: 0.7;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.45) 0 1px,
            transparent 1px 11px
        );
    background-blend-mode: screen;
}

.fcp-surgeon-root .fcp-ai-face-card.is-processing.has-face .scan-beam {
    display: block;
}

.fcp-surgeon-root .fcp-ai-face-card__visual .corner-data {
    position: absolute;
    z-index: 8;
    right: 10px;
    bottom: 10px;
    display: none;
    padding: 3px 7px;
    border-radius: 999px;
    color: var(--accent, #ff6f61);
    background: rgba(255, 255, 255, 0.78);
    direction: ltr;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.5rem;
    letter-spacing: 0.06em;
    text-shadow: none;
    backdrop-filter: blur(6px);
}

.fcp-surgeon-root .fcp-ai-face-card.is-processing.has-face .corner-data {
    display: block;
}

.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: block;
    padding: 0;
    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;
    flex-shrink: 0;
    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 {
    height: 188px;
    min-height: 188px;
    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; }
}

@keyframes face-sweep {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    7% {
        opacity: 0.95;
    }
    45% {
        opacity: 1;
    }
    50% {
        transform: translateY(var(--scan-travel, 180px));
        opacity: 0.85;
    }
    57% {
        opacity: 0.95;
    }
    93% {
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0;
    }
}

@keyframes data-blink {
    50% { opacity: 0.45; }
}

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

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

    .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__summary {
        grid-template-columns: 28px minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
        padding: 8px;
    }

    .fcp-surgeon-root .fcp-ai-step__index {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 0.74rem;
    }

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

    .fcp-surgeon-root .fcp-ai-step__title {
        font-size: 0.78rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fcp-surgeon-root .fcp-ai-step__subtitle {
        font-size: 0.66rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fcp-surgeon-root .fcp-ai-step__state {
        grid-column: auto;
        justify-self: end;
        align-self: center;
        margin-top: 0;
        flex-shrink: 0;
        padding: 4px 6px;
        font-size: 0.6rem;
    }

    .fcp-surgeon-root .fcp-ai-step.has-accordion.is-expanded .fcp-ai-step__accordion-inner {
        padding: 0 6px 8px;
        overflow: visible;
    }

    .fcp-surgeon-root .fcp-ai-face-stage__toolbar {
        gap: 6px;
        padding: 6px 0;
    }

    .fcp-surgeon-root .fcp-ai-face-stage__status {
        font-size: 0.68rem;
    }

    .fcp-surgeon-root .fcp-ai-scan-angle {
        width: 7px;
        height: 7px;
    }

    .fcp-surgeon-root .fcp-ai-scan-angle.is-current {
        width: 24px;
    }

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

    .fcp-surgeon-root .fcp-ai-face-viewport {
        width: min(100%, 248px);
    }

    .fcp-surgeon-root .fcp-ai-face-card__head {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .fcp-surgeon-root .fcp-ai-face-card__label {
        font-size: 0.62rem;
        padding: 4px 8px;
    }

    .fcp-surgeon-root .fcp-ai-face-card__state {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        font-size: 0.5rem;
    }

    .fcp-surgeon-root .fcp-ai-face-card__visual {
        border-radius: 14px;
    }

    .fcp-surgeon-root .fcp-ai-face-card__visual .corner-data {
        right: 8px;
        bottom: 8px;
        font-size: 0.42rem;
    }
}

.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 .selector-surgeon-cards-wrap .surgeons-archive-ui {
    --surg-primary: #253d96;
    --surg-primary-dark: #1b2d73;
    --surg-accent: #ed6f6a;
    --surg-ink: #172033;
    --surg-muted: #667085;
    --surg-border: #e7eaf3;
    --surg-soft: #f6f8fc;
    --surg-surface: rgba(255, 255, 255, 0.92);
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeons-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card.surgeon-archive-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-self: start;
    height: auto;
    min-height: auto;
    justify-content: flex-start;
    margin-bottom: 0;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--surg-border);
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.82)),
        var(--surg-surface);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card.surgeon-archive-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top left, rgba(37, 61, 150, 0.08), transparent 32%);
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card.surgeon-archive-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 61, 150, 0.24);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.1);
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .top-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    z-index: 1;
    padding: 0;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .info-part {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .title {
    display: block;
    color: var(--surg-ink);
    font-size: 16.5px;
    font-weight: 900;
    line-height: 1.65;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .title:hover {
    color: var(--surg-primary);
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .expertise {
    margin-top: 3px;
    color: var(--surg-muted);
    font-size: 12px;
    line-height: 1.8;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .meta-badge-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    min-height: 26px;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .city-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    flex-shrink: 0;
    padding: 4px 9px;
    border: 1px solid rgba(102, 112, 133, 0.12);
    border-radius: 12px;
    background: rgba(246, 248, 252, 0.9);
    color: #475467;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .city-badge span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .city-badge i {
    flex-shrink: 0;
    color: var(--surg-primary);
    font-size: 12px;
    line-height: 1;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .surgeon-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    flex-shrink: 0;
    padding: 4px 9px;
    border: 1px solid rgba(237, 111, 106, 0.22);
    border-radius: 999px;
    background: #f36d620d;
    color: var(--surg-accent);
    font-size: 11px;
    font-weight: normal;
    line-height: 1.5;
    white-space: nowrap;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .surgeon-badge i {
    flex-shrink: 0;
    font-size: 12px;
    line-height: 1;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .surgeon-badge__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .image-part .thumb {
    width: 82px;
    height: 82px;
    border: 4px solid #fff;
    border-radius: 24px;
    background-color: var(--surg-soft);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 10px 24px rgba(37, 61, 150, 0.12);
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .card-cta-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--surg-border);
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .more-toggle {
    flex: 1;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .toggle-details,
.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .btn-book-appointment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .toggle-details {
    width: 100%;
    padding: 0 12px !important;
    border: 1px solid var(--surg-border) !important;
    background: #fff !important;
    color: var(--surg-primary) !important;
    cursor: pointer;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .toggle-details:hover,
.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card.is-expanded .toggle-details {
    border-color: rgba(37, 61, 150, 0.22) !important;
    background: rgba(37, 61, 150, 0.07) !important;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .btn-book-appointment {
    min-width: 112px;
    padding: 0 18px;
    background: linear-gradient(135deg, var(--surg-primary), var(--surg-primary-dark));
    color: #fff;
    box-shadow: 0 14px 24px rgba(37, 61, 150, 0.22);
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .btn-book-appointment:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--surg-accent), #d95f5a);
    transform: translateY(-1px);
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .extra-details {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--surg-border);
    border-radius: 18px;
    background: rgba(246, 248, 252, 0.72);
    color: var(--surg-muted);
    font-size: 12px;
    line-height: 1.9;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .extra-details .meta-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(102, 112, 133, 0.18);
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .extra-details .meta-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .extra-details strong {
    color: var(--surg-ink);
    white-space: nowrap;
}

@media (min-width: 900px) {
    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeons-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card.surgeon-archive-card {
        width: 100%;
    }
}

@media (max-width: 599px) {
    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card.surgeon-archive-card {
        padding: 13px;
        border-radius: 22px;
    }

    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .image-part .thumb {
        width: 86px;
        height: 86px;
        border-radius: 20px;
    }

    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .title {
        font-size: 15px;
    }

    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .expertise {
        font-size: 11.5px;
    }

    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .meta-badge-row {
        margin-top: 8px;
        gap: 5px;
    }

    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .city-badge,
    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .surgeon-badge {
        padding: 4px 8px;
        font-size: 10.5px;
        max-width: calc(50% - 4px);
    }

    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .city-badge i,
    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .surgeon-badge i {
        font-size: 11px;
    }

    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .card-cta-row {
        align-items: stretch;
    }

    .fcp-surgeon-root .selector-surgeon-cards-wrap .surgeons-archive-ui .surgeon-card .btn-book-appointment {
        min-width: 104px;
        padding: 0 14px;
    }
}

.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;
    }
}