/* AI Photo Workflow — Elementor Widget Styles */

/* ── Base panel ──────────────────────────────────────── */
.aipw-el-panel {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    user-select: none;
}

/* ── Dark theme (default, like Aftershoot) ─────────────── */
.aipw-theme-dark {
    background: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #2d2d2d;
}
.aipw-theme-dark .aipw-el-topbar       { background: #111; border-bottom: 1px solid #2d2d2d; }
.aipw-theme-dark .aipw-el-tab-btn      { color: #9ca3af; border-color: transparent; }
.aipw-theme-dark .aipw-el-tab-btn:hover{ color: #e5e7eb; }
.aipw-theme-dark .aipw-el-tab-btn.active{ color: #f59e0b; border-bottom-color: #f59e0b; }
.aipw-theme-dark .aipw-el-subjects     { background: #111; border-bottom: 1px solid #2d2d2d; }
.aipw-theme-dark .aipw-el-subject      { background: transparent; color: #9ca3af; border: 1px solid transparent; }
.aipw-theme-dark .aipw-el-subject:hover{ color: #e5e7eb; }
.aipw-theme-dark .aipw-el-subject.active{ background: #f59e0b; color: #111; border-color: #f59e0b; }
.aipw-theme-dark .aipw-el-preset-row   { background: #111; border-bottom: 1px solid #2d2d2d; }
.aipw-theme-dark .aipw-el-section-label{ color: #6b7280; }
.aipw-theme-dark .aipw-el-preset-btn   { background: #2d2d2d; color: #9ca3af; border: 1px solid #3d3d3d; }
.aipw-theme-dark .aipw-el-preset-btn:hover{ background: #3d3d3d; color: #e5e7eb; }
.aipw-theme-dark .aipw-el-preset-btn.active{ background: #f59e0b; color: #111; border-color: #f59e0b; }
.aipw-theme-dark .aipw-el-group-header { border-bottom: 1px solid #2d2d2d; }
.aipw-theme-dark .aipw-el-group-label  { color: #e5e7eb; }
.aipw-theme-dark .aipw-el-group-icon   { color: #f59e0b; }
.aipw-theme-dark .aipw-el-reset-btn    { color: #4b5563; }
.aipw-theme-dark .aipw-el-reset-btn:hover{ color: #9ca3af; }
.aipw-theme-dark .aipw-el-slider-label { color: #9ca3af; }
.aipw-theme-dark .aipw-el-slider-track { background: #2d2d2d; }
.aipw-theme-dark .aipw-el-slider-fill  { background: #f59e0b; }
.aipw-theme-dark .aipw-el-slider-thumb { background: #1a1a1a; border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,0.2); }
.aipw-theme-dark .aipw-el-slider-val   { color: #e5e7eb; }
.aipw-theme-dark .aipw-el-action-bar   { background: #111; border-top: 1px solid #2d2d2d; }
.aipw-theme-dark .aipw-el-action-btn   { background: #2d2d2d; color: #9ca3af; border: 1px solid #3d3d3d; }
.aipw-theme-dark .aipw-el-action-btn:hover{ background: #3d3d3d; color: #e5e7eb; }
.aipw-theme-dark .aipw-el-btn-primary  { background: #f59e0b; color: #111; border-color: #f59e0b; font-weight: 600; }
.aipw-theme-dark .aipw-el-btn-primary:hover{ background: #d97706; }
.aipw-theme-dark .aipw-el-patch-info p { color: #6b7280; }

/* ── Light theme ───────────────────────────────────────── */
.aipw-theme-light {
    background: #ffffff;
    color: #111;
    border: 1px solid #e5e7eb;
}
.aipw-theme-light .aipw-el-topbar       { background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.aipw-theme-light .aipw-el-tab-btn      { color: #6b7280; border-color: transparent; }
.aipw-theme-light .aipw-el-tab-btn:hover{ color: #374151; }
.aipw-theme-light .aipw-el-tab-btn.active{ color: #2563eb; border-bottom-color: #2563eb; }
.aipw-theme-light .aipw-el-subjects     { background: #f3f4f6; border-bottom: 1px solid #e5e7eb; }
.aipw-theme-light .aipw-el-subject      { background: #fff; color: #6b7280; border: 1px solid #e5e7eb; }
.aipw-theme-light .aipw-el-subject:hover{ border-color: #9ca3af; }
.aipw-theme-light .aipw-el-subject.active{ background: #2563eb; color: #fff; border-color: #2563eb; }
.aipw-theme-light .aipw-el-preset-row   { background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.aipw-theme-light .aipw-el-section-label{ color: #9ca3af; }
.aipw-theme-light .aipw-el-preset-btn   { background: #fff; color: #374151; border: 1px solid #e5e7eb; }
.aipw-theme-light .aipw-el-preset-btn:hover{ background: #f9fafb; }
.aipw-theme-light .aipw-el-preset-btn.active{ background: #2563eb; color: #fff; border-color: #2563eb; }
.aipw-theme-light .aipw-el-group-header { border-bottom: 1px solid #f3f4f6; }
.aipw-theme-light .aipw-el-group-label  { color: #111; }
.aipw-theme-light .aipw-el-group-icon   { color: #2563eb; }
.aipw-theme-light .aipw-el-reset-btn    { color: #d1d5db; }
.aipw-theme-light .aipw-el-reset-btn:hover{ color: #6b7280; }
.aipw-theme-light .aipw-el-slider-label { color: #6b7280; }
.aipw-theme-light .aipw-el-slider-track { background: #e5e7eb; }
.aipw-theme-light .aipw-el-slider-fill  { background: #2563eb; }
.aipw-theme-light .aipw-el-slider-thumb { background: #fff; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.aipw-theme-light .aipw-el-slider-val   { color: #374151; }
.aipw-theme-light .aipw-el-action-bar   { background: #f9fafb; border-top: 1px solid #e5e7eb; }
.aipw-theme-light .aipw-el-action-btn   { background: #fff; color: #374151; border: 1px solid #e5e7eb; }
.aipw-theme-light .aipw-el-action-btn:hover{ background: #f9fafb; }
.aipw-theme-light .aipw-el-btn-primary  { background: #2563eb; color: #fff; border-color: #2563eb; font-weight: 600; }
.aipw-theme-light .aipw-el-btn-primary:hover{ background: #1d4ed8; }
.aipw-theme-light .aipw-el-patch-info p { color: #9ca3af; }

/* ── Auto theme ────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .aipw-theme-auto { background: #1a1a1a; color: #e5e7eb; border: 1px solid #2d2d2d; }
    .aipw-theme-auto .aipw-el-topbar { background: #111; border-bottom: 1px solid #2d2d2d; }
    .aipw-theme-auto .aipw-el-tab-btn { color: #9ca3af; }
    .aipw-theme-auto .aipw-el-tab-btn.active { color: #f59e0b; border-bottom-color: #f59e0b; }
    .aipw-theme-auto .aipw-el-slider-track { background: #2d2d2d; }
    .aipw-theme-auto .aipw-el-slider-fill { background: #f59e0b; }
    .aipw-theme-auto .aipw-el-slider-label { color: #9ca3af; }
    .aipw-theme-auto .aipw-el-slider-val { color: #e5e7eb; }
    .aipw-theme-auto .aipw-el-action-bar { background: #111; border-top: 1px solid #2d2d2d; }
    .aipw-theme-auto .aipw-el-group-header { border-bottom: 1px solid #2d2d2d; }
    .aipw-theme-auto .aipw-el-subjects { background: #111; border-bottom: 1px solid #2d2d2d; }
    .aipw-theme-auto .aipw-el-subject { color: #9ca3af; }
    .aipw-theme-auto .aipw-el-subject.active { background: #f59e0b; color: #111; }
    .aipw-theme-auto .aipw-el-preset-row { background: #111; border-bottom: 1px solid #2d2d2d; }
    .aipw-theme-auto .aipw-el-preset-btn { background: #2d2d2d; color: #9ca3af; border-color: #3d3d3d; }
    .aipw-theme-auto .aipw-el-preset-btn.active { background: #f59e0b; color: #111; }
    .aipw-theme-auto .aipw-el-action-btn { background: #2d2d2d; color: #9ca3af; border-color: #3d3d3d; }
    .aipw-theme-auto .aipw-el-btn-primary { background: #f59e0b; color: #111; }
    .aipw-theme-auto .aipw-el-slider-thumb { background: #1a1a1a; border-color: #f59e0b; }
}
@media (prefers-color-scheme: light) {
    .aipw-theme-auto { background: #fff; color: #111; border: 1px solid #e5e7eb; }
    .aipw-theme-auto .aipw-el-topbar { background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
    .aipw-theme-auto .aipw-el-tab-btn.active { color: #2563eb; border-bottom-color: #2563eb; }
    .aipw-theme-auto .aipw-el-slider-track { background: #e5e7eb; }
    .aipw-theme-auto .aipw-el-slider-fill { background: #2563eb; }
    .aipw-theme-auto .aipw-el-action-bar { background: #f9fafb; border-top: 1px solid #e5e7eb; }
    .aipw-theme-auto .aipw-el-btn-primary { background: #2563eb; color: #fff; }
}

/* ── Shared layout ────────────────────────────────────── */
.aipw-el-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}
.aipw-el-panel-title { font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.5; }
.aipw-el-tabs { display: flex; gap: 4px; }
.aipw-el-tab-btn {
    padding: 6px 14px; font-size: 13px; font-weight: 500;
    border: none; border-bottom: 2px solid transparent;
    background: none; cursor: pointer; transition: all 0.15s;
}
.aipw-el-subjects {
    display: flex; gap: 6px; padding: 10px 16px; flex-wrap: wrap;
}
.aipw-el-subject {
    padding: 4px 12px; border-radius: 20px; font-size: 12px;
    font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.aipw-el-preset-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; flex-wrap: wrap;
}
.aipw-el-section-label { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; flex-shrink: 0; }
.aipw-el-preset-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.aipw-el-preset-btn {
    padding: 4px 12px; border-radius: 6px; font-size: 12px;
    font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.aipw-el-sliders { padding: 8px 0; }
.aipw-el-group { margin-bottom: 4px; }
.aipw-el-group-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px 8px;
}
.aipw-el-group-icon { font-size: 13px; }
.aipw-el-group-label { font-size: 13px; font-weight: 600; flex: 1; }
.aipw-el-reset-btn {
    background: none; border: none; cursor: pointer;
    font-size: 16px; padding: 2px 6px; transition: color 0.15s;
}
.aipw-el-slider-row {
    display: grid;
    grid-template-columns: 110px 1fr 36px;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
}
.aipw-el-slider-label { font-size: 12px; }
.aipw-el-slider-track {
    position: relative; height: 4px; border-radius: 2px; cursor: pointer;
}
.aipw-el-slider-fill {
    position: absolute; left: 0; top: 0; height: 100%;
    border-radius: 2px; pointer-events: none; transition: width 0.05s;
}
.aipw-el-slider-thumb {
    position: absolute; top: 50%; transform: translate(-50%, -50%);
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid; transition: left 0.05s;
    pointer-events: none;
}
.aipw-el-range {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer; margin: 0;
}
.aipw-el-slider-val {
    font-size: 12px; font-weight: 600; text-align: right; min-width: 28px;
}
.aipw-el-tab-content { display: none; }
.aipw-el-tab-content.active { display: block; }
.aipw-el-action-bar {
    display: flex; gap: 8px; padding: 12px 16px; justify-content: flex-end;
}
.aipw-el-action-btn {
    padding: 7px 14px; border-radius: 8px; font-size: 12px;
    font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.aipw-el-patch-info { padding: 12px 16px; }
.aipw-el-patch-info p { font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
