/* AI WP — application styles (Bootstrap 5 base, loaded via CDN) */

:root {
    --aiwp-primary: #4f46e5;
    --aiwp-primary-dark: #3730a3;
    --aiwp-bg: #f4f5fb;
}

body {
    background: var(--aiwp-bg);
    min-height: 100vh;
}

/* boot splash (before React mounts) */
.boot-splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 100vh;
    color: #6b7280;
}

/* navbar */
.aiwp-navbar {
    background: linear-gradient(90deg, var(--aiwp-primary-dark), var(--aiwp-primary));
    box-shadow: 0 2px 12px rgba(55, 48, 163, 0.35);
}

.aiwp-navbar .nav-link:hover {
    color: #fff !important;
}

/* buttons follow the brand color */
.btn-primary {
    --bs-btn-bg: var(--aiwp-primary);
    --bs-btn-border-color: var(--aiwp-primary);
    --bs-btn-hover-bg: var(--aiwp-primary-dark);
    --bs-btn-hover-border-color: var(--aiwp-primary-dark);
    --bs-btn-active-bg: var(--aiwp-primary-dark);
    --bs-btn-active-border-color: var(--aiwp-primary-dark);
}

.nav-pills .nav-link.active {
    background-color: var(--aiwp-primary);
}

/* auth */
.auth-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 58px);
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    border: 0;
    border-radius: 1rem;
}

.auth-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #fff;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--aiwp-primary), #9333ea);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

/* dashboard hero */
.hero {
    border-radius: 1rem;
    background:
        radial-gradient(1200px 300px at 110% -20%, rgba(147, 51, 234, 0.08), transparent),
        radial-gradient(800px 240px at -10% 120%, rgba(79, 70, 229, 0.08), transparent),
        #fff;
}

/* progress steps */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.65rem 0.5rem;
    border-radius: 0.5rem;
    color: #9ca3af;
    position: relative;
}

.step-item + .step-item::before {
    content: "";
    position: absolute;
    left: calc(0.5rem + 17px);
    top: -14px;
    width: 2px;
    height: 14px;
    background: #e5e7eb;
}

.step-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef0f6;
    color: #9ca3af;
    font-size: 0.95rem;
}

.step-label {
    font-weight: 500;
}

.step-active {
    color: var(--aiwp-primary);
}

.step-active .step-icon {
    background: rgba(79, 70, 229, 0.12);
    color: var(--aiwp-primary);
}

.step-done {
    color: #16a34a;
}

.step-done .step-icon {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

.step-error {
    color: #dc2626;
}

.step-error .step-icon {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

/* status log */
.progress-log {
    font-family: var(--bs-font-monospace);
    font-size: 0.85rem;
    max-height: 260px;
    overflow-y: auto;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 0 0 var(--bs-card-border-radius) var(--bs-card-border-radius);
}

.progress-log .log-line {
    padding: 0.1rem 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.progress-log .text-muted {
    color: #64748b !important;
}

/* suggestions modal */
.suggestion-item {
    border-radius: 0.5rem !important;
    margin-bottom: 0.35rem;
    border: 1px solid var(--bs-border-color) !important;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.suggestion-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
    border-color: var(--aiwp-primary) !important;
}

.suggestion-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(79, 70, 229, 0.1);
    color: var(--aiwp-primary);
    font-size: 1.1rem;
}

/* misc */
.card {
    border-radius: 0.75rem;
}

.table thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

/* landing */
.landing-hero {
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(99,102,241,0.12), transparent 60%),
        radial-gradient(700px 400px at -5% 30%, rgba(147,51,234,0.10), transparent 60%),
        linear-gradient(180deg, #fff 0%, #f8f7ff 100%);
    border-bottom: 1px solid #ececf6;
}
.landing-badge {
    background: rgba(79,70,229,0.10);
    color: var(--aiwp-primary);
    border: 1px solid rgba(79,70,229,0.15);
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.landing-highlight {
    background: linear-gradient(90deg, var(--aiwp-primary), #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.landing-trust {
    border-top: 1px solid #ececf6;
    margin-top: 1rem;
}
.landing-mockup {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.mockup-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.8rem;
    color: #6b7280;
}
.mockup-bar .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-red { background: #ef4444; } .dot-yellow { background: #f59e0b; } .dot-green { background: #10b981; }
.mockup-url { margin-left: 0.75rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 999px; padding: 0.15rem 0.6rem; }
.mockup-body { padding: 1.25rem; }
.mockup-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
}
.mockup-hero-title { font-size: 1.1rem; font-weight: 700; margin: 0.5rem 0 0.25rem; }
.mockup-hero-sub { font-size: 0.85rem; opacity: 0.85; margin: 0; }
.mockup-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.75rem; }
.mockup-card { background: #fff; border: 1px solid #f3f4f6; border-radius: 0.6rem; padding: 0.5rem; }
.mockup-thumb { height: 54px; border-radius: 0.4rem; margin-bottom: 0.5rem; }
.mockup-line { height: 6px; background: #e5e7eb; border-radius: 999px; margin-bottom: 0.35rem; }
.mockup-line.w-75 { width: 75%; } .mockup-line.w-50 { width: 50%; }

.landing-feature { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.landing-feature:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(79,70,229,0.12) !important; }
.landing-icon {
    width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    border-radius: 0.75rem; background: rgba(79,70,229,0.10); color: var(--aiwp-primary); font-size: 1.4rem;
}
.landing-step .step-number {
    width: 56px; height: 56px; margin: 0 auto; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: linear-gradient(135deg, var(--aiwp-primary), #9333ea); color: #fff;
    font-weight: 700; font-size: 1.25rem; box-shadow: 0 8px 20px rgba(79,70,229,0.25);
}
.landing-example { transition: transform 0.12s ease; }
.landing-example:hover { transform: translateY(-2px); }
.landing-cta {
    background: linear-gradient(135deg, var(--aiwp-primary-dark) 0%, var(--aiwp-primary) 50%, #7c3aed 100%);
    color: #fff;
}
.landing-cta .text-white-50 { color: rgba(255,255,255,0.75) !important; }

/* upload dropzone */
.upload-dropzone {
    transition: all 0.2s ease;
    border: 2px dashed #cbd5e1 !important;
    border-radius: 0.75rem !important;
    background: #f8fafc !important;
}
.upload-dropzone.dragover {
    border-color: var(--aiwp-primary) !important;
    background: rgba(79,70,229,0.05) !important;
    transform: scale(1.01);
}

/* mobile: hide navbar text labels, keep icons only */
@media (max-width: 767.98px) {
    .aiwp-navbar .nav-label {
        display: none !important;
    }
    .aiwp-navbar .nav-link i,
    .aiwp-navbar .navbar-text i,
    .aiwp-navbar .btn i {
        margin-right: 0 !important;
    }
    .mockup-grid { grid-template-columns: 1fr; }
}
