/* ========================================
   WEBSITE PREVIEW BUILDER — Frontend Styles
   ======================================== */

#lpb-app {
    max-width: 700px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
}

/* Progress */
.lpb-progress {
    height: 3px;
    background: #1A2540;
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}
.lpb-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0099FF, #3DB8FF);
    border-radius: 3px;
    transition: width 0.4s ease;
}
.lpb-step-label {
    font-size: 12px;
    color: #8A94A6;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

/* Titles */
.lpb-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #E8ECF1;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}
.lpb-subtitle {
    color: #8A94A6;
    font-size: 15px;
    margin: 0 0 2rem;
    line-height: 1.6;
}

/* Fields */
.lpb-field {
    margin-bottom: 1.5rem;
}
.lpb-field label {
    display: block;
    color: #E8ECF1;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}
.lpb-hint {
    color: #8A94A6;
    font-size: 12px;
    margin: 0 0 10px;
}
.lpb-field input,
.lpb-field textarea,
.lpb-field select {
    width: 100%;
    box-sizing: border-box;
    background: #121A2B;
    border: 1px solid #1A2540;
    color: #E8ECF1;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lpb-field input:focus,
.lpb-field textarea:focus,
.lpb-field select:focus {
    border-color: #0099FF;
    box-shadow: 0 0 0 3px rgba(0,153,255,0.1);
}
.lpb-field textarea {
    resize: vertical;
    min-height: 80px;
}
.lpb-field-row {
    display: flex;
    gap: 1rem;
}
.lpb-field-row .lpb-field {
    flex: 1;
}

/* Option Buttons */
.lpb-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.lpb-opt {
    background: #121A2B;
    border: 1px solid #1A2540;
    color: #E8ECF1;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}
.lpb-opt:hover {
    border-color: #0099FF;
    background: #0E1525;
}
.lpb-opt.selected {
    border-color: #0099FF;
    background: rgba(0,153,255,0.12);
    color: #fff;
    box-shadow: 0 0 0 1px #0099FF;
}

/* Color Picker */
.lpb-colors {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.lpb-color-opt {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 3px;
    background: none;
    transition: all 0.15s;
}
.lpb-color-opt span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}
.lpb-color-opt:hover {
    border-color: #8A94A6;
}
.lpb-color-opt.selected {
    border-color: #fff;
    transform: scale(1.15);
}

/* Toggle Row */
.lpb-toggle-row {
    display: flex;
    gap: 8px;
}

/* Navigation */
.lpb-nav-row {
    display: flex;
    gap: 12px;
    margin-top: 2rem;
}
.lpb-next-btn {
    flex: 1;
    background: #0099FF;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.03em;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    transition: background 0.2s, transform 0.1s;
}
.lpb-next-btn:hover { background: #0077CC; }
.lpb-next-btn:active { transform: scale(0.98); }

.lpb-cta-btn {
    background: #C8702A !important;
}
.lpb-cta-btn:hover { background: #A85D22 !important; }

.lpb-back-btn {
    background: none;
    border: 1px solid #1A2540;
    color: #8A94A6;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}
.lpb-back-btn:hover {
    border-color: #8A94A6;
    color: #E8ECF1;
}

/* ========================================
   PHONE PREVIEW
   ======================================== */
.lpb-preview-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}
.lpb-phone-frame {
    width: 375px;
    height: 700px;
    background: #000;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
    position: relative;
}

.lpb-phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.lpb-phone-screen::-webkit-scrollbar {
    width: 0;
}

/* Preview Footer */
.lpb-preview-footer {
    text-align: center;
}
.lpb-preview-note {
    color: #8A94A6;
    font-size: 14px;
    margin-bottom: 0.5rem;
}

/* Success */
.lpb-success {
    text-align: center;
    padding: 3rem 1rem;
}
.lpb-success-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(200,112,42,0.15);
    color: #C8702A;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}
.lpb-success h2 {
    color: #E8ECF1;
    font-size: 1.5rem;
    margin: 0 0 0.8rem;
}
.lpb-success p {
    color: #8A94A6;
    font-size: 15px;
    line-height: 1.7;
    max-width: 450px;
    margin: 0 auto 1rem;
}
.lpb-success-sub a {
    color: #0099FF;
    text-decoration: none;
    font-weight: 600;
}

/* Fine print */
.lpb-fine-print {
    color: #8A94A6;
    font-size: 12px;
    text-align: center;
    margin-top: 1rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 600px) {
    .lpb-phone-frame {
        width: 100%;
        max-width: 340px;
        height: 600px;
        border-radius: 30px;
        padding: 8px;
    }
    .lpb-phone-screen {
        border-radius: 22px;
    }
    .lpb-field-row {
        flex-direction: column;
    }
    .lpb-options {
        flex-direction: column;
    }
    .lpb-nav-row {
        flex-direction: column;
    }
    .lpb-title {
        font-size: 1.3rem;
    }
}


/* Scroll isolation — prevent main page scroll when inside phone */
.lpb-phone-frame:hover ~ *,
.lpb-phone-frame:focus-within ~ * {
    overflow: hidden;
}
.lpb-phone-screen {
    overscroll-behavior: contain;
    touch-action: pan-y;
    isolation: isolate;
}
/* When hovering the phone, lock the body */
.lpb-preview-container {
    position: relative;
}

/* Font preview buttons */
.lpb-font-opt {
    font-size: 16px !important;
    padding: 10px 16px !important;
    min-width: 120px;
    text-align: center;
}


/* Device Toggle */
.lpb-device-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}
.lpb-device-btn {
    background: #121A2B;
    border: 1px solid #1A2540;
    color: #8A94A6;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: Inter, sans-serif;
}
.lpb-device-btn:hover { border-color: #0099FF; color: #E8ECF1; }
.lpb-device-btn.selected { background: rgba(0,153,255,0.12); border-color: #0099FF; color: #fff; }

/* Phone Frame — enhanced with glow */
.lpb-phone-frame {
    width: 375px;
    height: 700px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.06),
        0 20px 60px rgba(0,0,0,0.5),
        0 0 80px rgba(0,153,255,0.12),
        0 0 160px rgba(0,153,255,0.05);
    position: relative;
    transition: opacity 0.3s, transform 0.3s;
}

.lpb-phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.lpb-phone-screen::-webkit-scrollbar { width: 0; }

/* Desktop Frame */
.lpb-desktop-frame {
    width: 100%;
    max-width: 1100px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.06),
        0 20px 60px rgba(0,0,0,0.5),
        0 0 80px rgba(0,153,255,0.12),
        0 0 160px rgba(0,153,255,0.05);
    transition: opacity 0.3s, transform 0.3s;
}
.lpb-desktop-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
}
.lpb-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.lpb-dot.red { background: #ff5f57; }
.lpb-dot.yellow { background: #febc2e; }
.lpb-dot.green { background: #28c840; }
.lpb-desktop-url {
    flex: 1;
    background: #1a1a1a;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
    color: #8A94A6;
    margin-left: 8px;
    font-family: Inter, sans-serif;
}
.lpb-desktop-screen {
    height: 650px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}
.lpb-desktop-screen::-webkit-scrollbar { width: 6px; }
.lpb-desktop-screen::-webkit-scrollbar-track { background: transparent; }
.lpb-desktop-screen::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* Device Frame States */
.lpb-device-frame { display: none; }
.lpb-device-frame.active { display: block; }

/* Preview container glow */
.lpb-preview-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    padding: 2rem 0;
}

/* Desktop responsive */
@media (max-width: 960px) {
    .lpb-desktop-frame { max-width: 100%; }
}
@media (max-width: 600px) {
    .lpb-phone-frame {
        width: 100%;
        max-width: 340px;
        height: 620px;
        border-radius: 30px;
        padding: 8px;
    }
    .lpb-phone-screen { border-radius: 22px; }
}

.lpb-icon-grid{display:grid !important;grid-template-columns:repeat(8,1fr);gap:6px !important}
.lpb-icon-opt{padding:10px !important;text-align:center !important;min-width:0 !important;justify-content:center;display:flex !important;align-items:center !important}
.lpb-icon-opt svg{width:24px;height:24px;color:#8A94A6;transition:color 0.2s}
.lpb-icon-opt:hover svg{color:#0099FF}
.lpb-icon-opt.selected svg{color:#fff}
.lpb-icon-opt[data-val="none"]{font-size:12px !important;grid-column:span 2;color:#8A94A6}
@media(max-width:600px){.lpb-icon-grid{grid-template-columns:repeat(4,1fr) !important}}


/* Desktop preview — break out of parent constraints */
.lpb-preview-container{max-width:none !important;overflow:visible !important}
.lpb-desktop-frame{width:95vw !important;max-width:1100px !important;margin:0 auto !important}


#lpb-app{max-width:700px;margin:0 auto}
.lpb-step[data-step="4"]{max-width:none !important;margin-left:calc(-50vw + 50%) !important;margin-right:calc(-50vw + 50%) !important;width:100vw !important;padding-left:2rem !important;padding-right:2rem !important;box-sizing:border-box !important}


/* Photo picker grid */
.lpb-photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.lpb-photo-option{border-radius:8px;overflow:hidden;cursor:pointer;border:2px solid transparent;transition:all 0.2s;position:relative}
.lpb-photo-option img{width:100%;height:100px;object-fit:cover;display:block}
.lpb-photo-option:hover{border-color:#8A94A6}
.lpb-photo-option.selected{border-color:#0099FF;box-shadow:0 0 0 2px rgba(0,153,255,0.3)}
.lpb-photo-option.selected::after{content:"✓";position:absolute;top:6px;right:6px;background:#0099FF;color:#fff;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}
.lpb-photo-option .lpb-photo-label{padding:6px 8px;font-size:11px;color:#8A94A6;text-align:center}

/* Industry detail item rows */
.lpb-industry-row{display:flex;gap:8px;margin-bottom:8px;align-items:center}
.lpb-industry-row input{flex:1;background:#121A2B;border:1px solid #1A2540;color:#E8ECF1;border-radius:6px;padding:10px 12px;font-size:14px;outline:none;font-family:Inter,sans-serif}
.lpb-industry-row input:focus{border-color:#0099FF}
.lpb-industry-row input.lpb-price-input{max-width:90px;text-align:right}
.lpb-industry-row .lpb-remove-btn{background:none;border:1px solid #1A2540;color:#8A94A6;border-radius:6px;padding:0 10px;cursor:pointer;font-size:16px;height:38px;flex-shrink:0}




/* Fix button widths on preview step */
.lpb-preview-footer .lpb-nav-row{justify-content:center !important;flex-wrap:wrap !important}
.lpb-preview-footer .lpb-nav-row .lpb-next-btn{flex:none !important;width:auto !important;max-width:400px !important}
.lpb-preview-footer .lpb-nav-row .lpb-back-btn{flex:none !important;width:auto !important}

/* Fix submit button width on step 5 */
.lpb-step[data-step="5"] .lpb-next-btn{width:auto !important;max-width:400px !important}
