/* --- Miniature Blueprint Icons --- */
.wf-blueprint {
    width: 60px;
    height: 40px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    position: relative;
    margin-bottom: 8px;
    overflow: hidden;
}

/* Light: Left aligned blocks */
.wf-blueprint.light .bp-circle { width: 10px; height: 10px; border-radius: 50%; background: var(--clr-primary); position: absolute; top: 6px; right: 6px; }
.wf-blueprint.light .bp-line { height: 2px; background: rgba(255,255,255,0.2); position: absolute; }
.wf-blueprint.light .bp-line-1 { width: 25px; top: 20px; right: 6px; }
.wf-blueprint.light .bp-line-2 { width: 15px; top: 26px; right: 6px; }

/* Modern: Centered blocks */
.wf-blueprint.modern .bp-circle { width: 12px; height: 12px; border-radius: 50%; background: var(--clr-primary); position: absolute; top: 6px; left: 50%; transform: translateX(-50%); }
.wf-blueprint.modern .bp-line { height: 2px; background: rgba(255,255,255,0.2); position: absolute; left: 50%; transform: translateX(-50%); }
.wf-blueprint.modern .bp-line-1 { width: 20px; top: 22px; }
.wf-blueprint.modern .bp-line-2 { width: 15px; top: 28px; }



/* --- Binding Image Uploader --- */
.tpl-img-uploader {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.tpl-img-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background-color: rgba(0,0,0,0.06);
    background-size: cover;
    background-position: center;
    border: 2px dashed var(--border-soft, rgba(0,0,0,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-size: 1.4rem;
    color: var(--text-dim);
    transition: border-color 0.2s;
}

.tpl-img-thumb:hover { border-color: var(--clr-primary); }

.tpl-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.tpl-img-thumb:hover .tpl-img-overlay { opacity: 1; }

.tpl-img-loading { font-size: 1.2rem; color: var(--clr-primary); }

/* --- Canvas No-Template Placeholder --- */
.canvas-no-template {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 200px;
    width: 100%;
    text-align: center;
    color: rgba(255,255,255,0.2);
}

.canvas-no-template i   { font-size: 2.5rem; }
.canvas-no-template p   { font-size: 0.82rem; margin: 0; }

/* --- Portfolio Empty State --- */
.portfolio-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 2.5rem 1.5rem;
    border: 2px dashed var(--border-soft, rgba(255,255,255,0.1));
    border-radius: 14px;
    text-align: center;
    color: var(--text-dim);
    background: rgba(255,255,255,0.02);
}

.portfolio-empty-state i {
    font-size: 2.2rem;
    opacity: 0.4;
}

.portfolio-empty-state p {
    font-size: 0.85rem;
    opacity: 0.6;
    margin: 0;
}

/* --- Template Selected Strip (collapsed picker after selection) --- */
.tpl-selected-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(60,209,170,0.06);
    border: 1px solid rgba(60,209,170,0.25);
    border-radius: 10px;
    padding: 10px 14px;
}

.tpl-selected-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--clr-primary);
}

.tpl-change-btn {
    background: none;
    border: 1px solid rgba(60,209,170,0.35);
    border-radius: 6px;
    color: var(--clr-primary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}

.tpl-change-btn:hover { background: rgba(60,209,170,0.1); }

/* --- Template Binding Fields (dynamic client inputs from admin bindings) --- */
.tpl-binding-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1.5rem;
}

.tpl-binding-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tpl-binding-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main, #1f2937);
}

.tpl-binding-auto {
    font-size: 0.72rem;
    color: var(--clr-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.8;
}

/* --- Section Template Picker --- */
.tpl-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.tpl-picker-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border-radius: 8px;
    padding: 5px;
    border: 2px solid transparent;
    transition: border-color 0.2s, background 0.2s;
}

.tpl-picker-card:hover     { border-color: var(--clr-primary-soft); background: rgba(255,255,255,0.03); }
.tpl-picker-card.is-active { border-color: var(--clr-primary); background: rgba(60,209,170,0.05); }

.tpl-picker-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 1.3rem;
    color: var(--clr-primary);
}

.tpl-picker-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tpl-picker-default { opacity: 0.45; }

/* ─── Builder Template Canvas iframe (replaces Vue section in main canvas) ─── */
.canvas-builder-iframe {
    width: 100%;
    min-height: 100vh;
    height: 100%;
    border: none;
    display: block;
    background: transparent;
}

.canvas-builder-iframe--design,
.canvas-builder-iframe--identity,
.canvas-builder-iframe--skills,
.canvas-builder-iframe--portfolio,
.canvas-builder-iframe--modules,
.canvas-builder-iframe--footer,
.canvas-builder-iframe--master {
    min-height: 100vh;
    height: 100%;
}

/* ─── Builder Template Live Preview Panel ─── */
.builder-preview-panel {
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.builder-preview-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255,255,255,0.04);
    font-size: 0.7rem;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.builder-preview-refresh {
    background: none;
    border: none;
    color: var(--clr-primary);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
    font-family: inherit;
}

.builder-preview-refresh:hover { opacity: 0.7; }

.builder-preview-iframe {
    width: 100%;
    min-height: 180px;
    height: 220px;
    border: none;
    display: block;
    background: #fff;
    transition: height 0.3s ease;
}

.tpl-active-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--clr-primary);
    background: rgba(60,209,170,0.08);
    border: 1px solid rgba(60,209,170,0.2);
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 8px;
}

.tpl-picker-name {
    font-size: 0.62rem;
    color: var(--text-dim);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Portrait template picker — for step 1 branding */
.tpl-picker-grid--portrait {
    grid-template-columns: repeat(auto-fill, minmax(110px, 140px));
    gap: 12px;
}

.tpl-picker-thumb--portrait {
    aspect-ratio: unset;
    height: 160px;
    flex-direction: column;
    justify-content: flex-start;
    padding: 8px 6px;
    gap: 6px;
}

.tpl-picker-thumb--portrait .wf-header {
    width: 100%;
    height: 12px;
    border-radius: 3px;
    background: var(--clr-primary);
    opacity: 0.5;
}

.tpl-picker-thumb--portrait .wf-body {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tpl-picker-thumb--portrait .wf-line {
    width: 100%;
    height: 7px;
    border-radius: 3px;
    background: rgba(255,255,255,0.12);
}

.tpl-picker-thumb--portrait .wf-line.short { width: 65%; }

.tpl-picker-thumb--portrait .wf-block {
    width: 100%;
    flex: 1;
    border-radius: 4px;
    background: rgba(255,255,255,0.07);
}

.tpl-picker-thumb--portrait .wf-footer {
    width: 100%;
    height: 9px;
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
}

/* --- Footer Variant Gallery --- */
.footer-variant-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.footer-variant-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-variant-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-variant-card.active {
    background: rgba(60, 209, 170, 0.08);
    border-color: #3cd1aa;
    box-shadow: 0 0 15px rgba(60, 209, 170, 0.2);
}

.variant-icon-circle {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    transition: all 0.2s;
}

.footer-variant-card.active .variant-icon-circle {
    background: #3cd1aa;
    color: #111;
}

.variant-label-sm {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    text-align: center;
}

.footer-variant-card.active .variant-label-sm {
    color: #fff;
}
