/* YouCam AI Editor Frontend CSS */
:root {
  --yc-bg: #f7f7fb;
  --yc-surface: #ffffff;
  --yc-border: #e5e7eb;
  --yc-primary: #4869ee;
  --yc-primary-contrast: #ffffff;
  --yc-muted: #6b7280;
  --yc-success: #10b981;
  --yc-warning: #f59e0b;
  --yc-error: #ef4444;
  --yc-radius-sm: .5rem;
  --yc-radius: 1rem;
  --yc-radius-xl: 1.25rem;
  --yc-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 6px 16px rgba(0,0,0,0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --yc-bg: #ffffff;
    --yc-surface: #ffffff;
    --yc-border: #2a2b30;
    --yc-primary: #6b8bff;
    --yc-primary-contrast: #ffffff;
    --yc-muted: #9aa0a6;
    --yc-success: #34d399;
    --yc-warning: #fbbf24;
    --yc-error: #f87171;
  }
}

.youcam-ai { font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif; color: #111827; }
.youcam-ai * { box-sizing: border-box; }
.youcam-ai .yc-card { background: var(--yc-surface); border: 1px solid var(--yc-border); border-radius: var(--yc-radius); padding: 16px; margin: 16px 0; box-shadow: var(--yc-shadow); }
.youcam-ai .yc-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--yc-border); flex-wrap: wrap; }
.youcam-ai .yc-tab { appearance: none; background: transparent; border: none; padding: 12px 8px; cursor: pointer; font-weight: 600; color: var(--yc-muted); position: relative; }
.youcam-ai .yc-tab.is-active { color: #111827; }
.youcam-ai .yc-tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--yc-primary); }
.youcam-ai .yc-tabpanel { padding: 8px 0; }

.youcam-ai .yc-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--yc-border); background: var(--yc-surface); cursor: pointer; transition: transform .15s ease, background .15s ease; }
.youcam-ai .yc-btn:hover { transform: translateY(-1px); }
.youcam-ai .yc-primary { background: var(--yc-primary); color: var(--yc-primary-contrast); border-color: var(--yc-primary); }

.youcam-ai .yc-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 12px; margin: 12px 0; }
.youcam-ai label span { display: block; font-size: 12px; color: var(--yc-muted); margin-bottom: 6px; }
.youcam-ai input[type="text"], .youcam-ai input[type="url"], .youcam-ai input[type="number"], .youcam-ai select { width: 100%; padding: 10px; border: 1px solid var(--yc-border); border-radius: 10px; background: var(--yc-surface); color: inherit; }
.youcam-ai .yc-file input[type="file"] { padding: 8px; border: 1px dashed var(--yc-border); border-radius: 12px; background: #fafafa; width: 100%; }

.youcam-ai .yc-progress { margin-top: 10px; color: var(--yc-muted); }
.youcam-ai .yc-spinner { width: 14px; height: 14px; border: 2px solid var(--yc-border); border-top-color: var(--yc-primary); border-radius: 50%; display: inline-block; animation: ycspin 1s linear infinite; }
@keyframes ycspin { to { transform: rotate(360deg); } }

.youcam-ai .yc-side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.youcam-ai .yc-side-by-side img, .youcam-ai .yc-before-after img { width: 100%; border-radius: 12px; background: #f2f2f2; }
.youcam-ai .yc-before-after { position: relative; overflow: hidden; border-radius: 12px; }
.youcam-ai .yc-slider { position: relative; }
.youcam-ai .yc-slider .yc-before { position: absolute; inset: 0; object-fit: contain; clip-path: inset(0 50% 0 0); }
.youcam-ai .yc-slider .yc-after { position: relative; display: block; }
.youcam-ai .yc-handle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; background: var(--yc-primary); color: var(--yc-primary-contrast); border-radius: 999px; display: grid; place-items: center; box-shadow: var(--yc-shadow); outline: none; }

.youcam-ai .yc-toast { position: fixed; right: 16px; bottom: 16px; background: var(--yc-surface); border: 1px solid var(--yc-border); box-shadow: var(--yc-shadow); padding: 12px 14px; border-radius: 12px; }

[dir="rtl"] .youcam-ai .yc-toast { left: 16px; right: auto; }
[dir="rtl"] .youcam-ai .yc-tabs { direction: rtl; }
[dir="rtl"] .youcam-ai .yc-handle { left: auto; right: 50%; transform: translate(50%, -50%); }
