/* ══════════════════════════════════════════════════════════════════════
   PHASE AA — UX TIER 2: FORM COMPLETENESS
   Progress Bar & Accordion Status Dots
══════════════════════════════════════════════════════════════════════ */

/* ── Progress Bar in Editor Header ────────────────────────────────── */
.editor-progress-container {
    margin-top: 12px;
    padding: 0 4px;
}

.editor-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-sub);
    margin-bottom: 5px;
}

#completenessValue {
    color: var(--accent);
}

.editor-progress-track {
    height: 6px;
    background: var(--surface-2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.editor-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

/* ── Accordion Status Dots ────────────────────────────────────────── */
.accordion-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: 10px;
    background: #cbd5e1;
    /* Default grey */
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.accordion-status-dot.partially-filled {
    background: #f59e0b;
    /* Yellow/Amber */
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.accordion-status-dot.complete {
    background: #10b981;
    /* Green */
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* ── Welcome Overlay Styles ────────────────────────────────────────── */
.welcome-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.welcome-overlay.open {
    display: flex;
}

.welcome-modal {
    background: var(--surface);
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: welcomeSlideIn 0.4s ease-out;
}

@keyframes welcomeSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.welcome-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 30px 40px;
    text-align: center;
    color: #fff;
}

.welcome-header-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.welcome-body {
    padding: 30px 40px;
}

.welcome-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
}

.welcome-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.welcome-step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.step-number {
    width: 24px;
    height: 24px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-text {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.5;
}

.welcome-footer {
    display: flex;
    gap: 12px;
    padding: 0 40px 30px;
}

.welcome-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
}

.welcome-btn-primary {
    background: var(--accent);
    color: #fff;
}

.welcome-btn-primary:hover {
    background: #15803d;
}

.welcome-btn-secondary {
    background: var(--surface-2);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.welcome-btn-secondary:hover {
    background: var(--border);
}

/* ══════════════════════════════════════════════════════════════════════
   ICON GRID SELECTOR  (mounting types, light distribution) — issue #13 #15
══════════════════════════════════════════════════════════════════════ */
.icon-grid-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: 6px;
}

.icon-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px 6px;
    border: 1.5px solid var(--border, #e2e8f0);
    border-radius: 8px;
    cursor: pointer;
    background: var(--surface, #f8fafc);
    transition: all .15s ease;
    position: relative;
    user-select: none;
}

.icon-grid-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
    cursor: pointer;
    margin: 0;
}

.icon-grid-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: color .15s;
    pointer-events: none;
}

.icon-grid-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #64748b;
    text-align: center;
    line-height: 1.2;
    pointer-events: none;
}

.icon-grid-item:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.icon-grid-item:has(input:checked) {
    border-color: #2563eb;
    background: #dbeafe;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.icon-grid-item:has(input:checked) .icon-grid-icon {
    color: #1d4ed8;
}

.icon-grid-item:has(input:checked) .icon-grid-label {
    color: #1d4ed8;
}

/* ══════════════════════════════════════════════════════════════════════
   PRESET PILL BUTTONS  (CRI, IP, material, IP/IK, L-value) — issue #4 #7
══════════════════════════════════════════════════════════════════════ */
.preset-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.preset-pill-btn {
    padding: 3px 10px;
    font-size: 11px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 20px;
    background: var(--surface, #f8fafc);
    cursor: pointer;
    color: #475569;
    font-weight: 600;
    font-family: inherit;
    transition: all .15s ease;
    line-height: 1.4;
}

.preset-pill-btn:hover {
    border-color: #3b82f6;
    color: #1d4ed8;
    background: #eff6ff;
}

.preset-pill-btn.active {
    background: #1d4ed8 !important;
    color: #fff !important;
    border-color: #1d4ed8 !important;
}

/* ══════════════════════════════════════════════════════════════════════
   AUTO-GENERATE BUTTON  (technical standards) — issue #22
══════════════════════════════════════════════════════════════════════ */
.btn-auto-gen {
    padding: 4px 12px;
    font-size: 11px;
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    transition: opacity .15s;
}

.btn-auto-gen:hover { opacity: .85; }