/*
 * NeoTools Face Retouch - scoped stylesheet (v3.1.11)
 * همه استایل‌ها داخل .ntfr-app اسکوپ شده‌اند تا با استایل قالب تداخل نکنند.
 */
.ntfr-app, .ntfr-app * { box-sizing: border-box; }
.ntfr-app {
    max-width: 900px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 24px;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Toolbar */
.ntfr-app .ntfr-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
}
.ntfr-app .ntfr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.2s ease;
}
.ntfr-app .ntfr-btn:hover:not(:disabled) { background: #e2e8f0; }
.ntfr-app .ntfr-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ntfr-app .ntfr-upload-btn { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.ntfr-app .ntfr-upload-btn:hover { background: #4338ca; }
.ntfr-app .ntfr-primary { background: #10b981; color: #fff; border-color: #10b981; }
.ntfr-app .ntfr-primary:hover:not(:disabled) { background: #059669; }

/* Single preview container: canvas/image is a direct child. */
.ntfr-app .ntfr-stage-wrapper {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}
.ntfr-app #ntfr-canvas {
    display: none;
    width: auto;
    max-width: 100%;
    max-height: 65vh;
    height: auto;
    object-fit: contain;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.ntfr-app .ntfr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #64748b;
    font-size: 15px;
    padding: 40px;
}
.ntfr-app .ntfr-placeholder .ntfr-icon { font-size: 48px; }
.ntfr-app .ntfr-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    backdrop-filter: blur(4px);
    z-index: 10;
}

/* Controls */
.ntfr-app .ntfr-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    background: #f8fafc;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.ntfr-app .ntfr-control { display: flex; flex-direction: column; gap: 8px; }
.ntfr-app .ntfr-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}
.ntfr-app .ntfr-control input[type="range"] { width: 100%; accent-color: #4f46e5; cursor: pointer; }

@media (max-width: 768px) {
    .ntfr-app .ntfr-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .ntfr-app .ntfr-toolbar .ntfr-btn,
    .ntfr-app .ntfr-toolbar .ntfr-upload-btn { display: block; width: 100%; text-align: center; }
    .ntfr-app .ntfr-stage-wrapper { min-height: 240px; }
    .ntfr-app #ntfr-canvas { max-width: 100%; max-height: 65vh; }
}
