/* ═══════════════════════════════════════════════════════════════
   LinkedIn Profile Optimizer — /tools/linkedin-profile-optimizer
   Prefix: lpo-
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero ────────────────────────────────────────────────────── */
.lpo-hero {
    padding: 4rem 0 2.5rem;
    text-align: center;
}
.lpo-hero-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    background: linear-gradient(135deg, #0D5F3F, #34D399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}
.dark .lpo-hero-eyebrow { background: linear-gradient(135deg, #34D399, #6EE7B7); -webkit-background-clip: text; background-clip: text; }
.lpo-hero-rating { margin-bottom: 1rem; }
.lpo-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--rw-text, #111);
    margin: 0 0 1rem;
}
.lpo-hero-sub {
    font-size: 1.125rem;
    color: var(--rw-muted, #555);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Section defaults ────────────────────────────────────────── */
.lpo-section { padding: 3rem 0; }
.lpo-section-head { text-align: center; margin-bottom: 2rem; }
.lpo-section-eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--rw-muted, #888);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
.lpo-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rw-text, #111);
    margin: 0;
}

/* ── Form card ───────────────────────────────────────────────── */
.lpo-form-card {
    background: var(--rw-surface, #fff);
    border: 1px solid var(--rw-border, #e5e7eb);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.lpo-form-header { margin-bottom: 1.5rem; }
.lpo-form-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rw-text, #111);
    margin: 0 0 0.25rem;
}
.lpo-form-sub {
    font-size: 0.875rem;
    color: var(--rw-muted, #666);
    margin: 0;
}

/* ── LinkedIn PDF import ─────────────────────────────────────── */
.lpo-import { margin-bottom: 1.5rem; }
.lpo-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed var(--rw-border, #d1d5db);
    border-radius: 0.7rem;
    background: var(--rw-bg, #fafafa);
    padding: 1.25rem 1rem;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.18s, background 0.18s;
}
.lpo-dropzone:hover, .lpo-dropzone:focus-visible, .lpo-dropzone.is-drag {
    border-color: var(--rw-accent, #0D5F3F);
    background: var(--rw-accent-light, #ecfdf5);
    outline: 0;
}
.lpo-dropzone.is-parsing { cursor: progress; }
.lpo-dropzone-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: var(--rw-muted, #666);
}
.lpo-dropzone-state svg { color: var(--rw-accent, #0D5F3F); margin-bottom: 0.15rem; }
.lpo-dropzone-title { font-weight: 600; font-size: 0.92rem; color: var(--rw-text, #111); }
.lpo-dropzone-sub { font-size: 0.78rem; }
.lpo-linkedin-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.6rem;
    background: rgba(10,102,194,0.06);
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--rw-muted, #666);
    text-align: left;
}
.lpo-linkedin-tip svg { flex-shrink: 0; color: #0A66C2; margin-top: 2px; }
.lpo-linkedin-tip strong { font-weight: 600; color: var(--rw-text, #111); }
.lpo-linkedin-tip a { color: #0A66C2; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.lpo-linkedin-tip a:hover { color: #084d92; }
.dark .lpo-linkedin-tip { background: rgba(10,102,194,0.14); }
.dark .lpo-linkedin-tip svg, .dark .lpo-linkedin-tip a { color: #78B7E8; }
.dark .lpo-linkedin-tip a:hover { color: #A5CDF0; }
.lpo-import-privacy {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: var(--rw-muted, #888);
    text-align: center;
}
.lpo-import-status {
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.5rem;
    text-align: left;
}
.lpo-import-status--success { color: var(--rw-success, #0D5F3F); background: var(--rw-success-light, #ecfdf5); }
.lpo-import-status--error { color: var(--rw-error, #b91c1c); background: var(--rw-error-light, #fef2f2); }
.lpo-import-status--info { color: var(--rw-text, #333); background: var(--rw-accent-light, #ecfdf5); }
.lpo-import-status a { color: var(--rw-accent, #0D5F3F); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.lpo-import-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 0;
    color: var(--rw-muted, #999);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.lpo-import-divider::before, .lpo-import-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rw-border, #e5e7eb);
}

/* ── Fields ──────────────────────────────────────────────────── */
.lpo-field { margin-bottom: 1.25rem; }
.lpo-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rw-text, #333);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.lpo-required { color: var(--rw-error, #ef4444); font-weight: 400; }
.lpo-badge-optional {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rw-muted, #999);
    background: var(--rw-bg, #f3f4f6);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}
.lpo-input, .lpo-textarea {
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--rw-text, #111);
    background: var(--rw-bg, #fafafa);
    border: 1.5px solid var(--rw-border, #d1d5db);
    border-radius: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.lpo-textarea {
    min-height: 100px;
    resize: vertical;
}
.lpo-input:focus, .lpo-textarea:focus {
    outline: none;
    border-color: var(--rw-accent, #0D5F3F);
    box-shadow: 0 0 0 3px rgba(13,95,63,0.12);
}
.dark .lpo-input:focus, .dark .lpo-textarea:focus { box-shadow: 0 0 0 3px rgba(52,211,153,0.18); }
.lpo-input::placeholder, .lpo-textarea::placeholder {
    color: var(--rw-muted, #aaa);
}
.lpo-field-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.2rem;
}
.lpo-char-count {
    font-size: 0.75rem;
    color: var(--rw-muted, #999);
}
.lpo-field-hint {
    font-size: 0.75rem;
    color: var(--rw-muted, #999);
    margin: 0.25rem 0 0;
}

/* ── Quick score ─────────────────────────────────────────────── */
.lpo-quick-score {
    background: var(--rw-bg, #f9fafb);
    border: 1px solid var(--rw-border, #e5e7eb);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.lpo-quick-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rw-muted, #666);
    margin: 0 0 0.75rem;
}
.lpo-quick-bar { margin-bottom: 0.6rem; }
.lpo-quick-bar:last-child { margin-bottom: 0; }
.lpo-quick-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.2rem;
}
.lpo-quick-bar-label {
    font-size: 0.78rem;
    color: var(--rw-text, #444);
}
.lpo-quick-bar-val {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rw-text, #333);
}
.lpo-quick-bar-track {
    height: 6px;
    background: var(--rw-border, #e5e7eb);
    border-radius: 3px;
    overflow: hidden;
}
.lpo-quick-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease-out;
}

/* ── Submit ──────────────────────────────────────────────────── */
.lpo-submit {
    width: 100%;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--rw-accent, #0D5F3F);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}
.dark .lpo-submit { color: #0f0f0f; }
.lpo-submit:hover:not(:disabled) { background: var(--rw-accent-hover, #0b4e34); }
.lpo-submit:active:not(:disabled) { transform: scale(0.98); }
.lpo-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.lpo-submit-loading { display: inline-flex; align-items: center; gap: 0.5rem; }

.lpo-spinner { animation: lpo-spin 1s linear infinite; }
@keyframes lpo-spin { to { transform: rotate(360deg); } }

/* ── Score gauge ─────────────────────────────────────────────── */
.lpo-gauge-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}
.lpo-gauge {
    position: relative;
    width: 160px;
    height: 160px;
}
.lpo-gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.lpo-gauge-bg {
    fill: none;
    stroke: var(--rw-border, #e5e7eb);
    stroke-width: 8;
}
.lpo-gauge-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}
.lpo-gauge-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.lpo-gauge-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--rw-text, #111);
    line-height: 1;
}
.lpo-gauge-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rw-muted, #999);
    margin-top: 0.25rem;
}

/* ── Dimension cards ─────────────────────────────────────────── */
.lpo-dims {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.lpo-dim-card {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--rw-surface, #fff);
    border: 1px solid var(--rw-border, #e5e7eb);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.lpo-dim-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: var(--rw-accent, #0D5F3F);
    line-height: 0;
}
.lpo-dim-content { flex: 1; min-width: 0; }
.lpo-dim-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.35rem;
}
.lpo-dim-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rw-text, #333);
}
.lpo-dim-score {
    font-size: 1.1rem;
    font-weight: 800;
}
.lpo-dim-bar-track {
    height: 5px;
    background: var(--rw-border, #e5e7eb);
    border-radius: 3px;
    overflow: hidden;
}
.lpo-dim-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease-out;
}

/* ── Subsection titles ───────────────────────────────────────── */
.lpo-subsection-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rw-text, #111);
    margin: 0 0 1rem;
}

/* ── Issues ──────────────────────────────────────────────────── */
.lpo-issues-section { margin-bottom: 2.5rem; }
.lpo-issues-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.lpo-issue-card {
    padding: 1rem;
    background: var(--rw-surface, #fff);
    border: 1px solid var(--rw-border, #e5e7eb);
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.lpo-issue-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.lpo-severity {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
}
.lpo-severity--critical { background: var(--rw-error-light, #fef2f2); color: var(--rw-error, #dc2626); }
.lpo-severity--warning { background: var(--rw-amber-light, #fffbeb); color: var(--rw-amber, #d97706); }
.lpo-severity--suggestion { background: var(--rw-indigo-light, #eef2ff); color: var(--rw-indigo, #4f46e5); }
.lpo-issue-section {
    font-size: 0.75rem;
    color: var(--rw-muted, #888);
    text-transform: capitalize;
}
.lpo-issue-msg {
    font-size: 0.88rem;
    color: var(--rw-text, #333);
    line-height: 1.5;
    margin: 0 0 0.25rem;
}
.lpo-issue-fix {
    font-size: 0.82rem;
    color: var(--rw-muted, #555);
    line-height: 1.5;
    margin: 0;
}
.lpo-issue-fix svg {
    display: inline-block;
    vertical-align: -2px;
    margin-right: 0.25rem;
    color: var(--rw-amber, #d97706);
}

/* ── Rewrites ────────────────────────────────────────────────── */
.lpo-rewrites-section { margin-bottom: 2.5rem; }
.lpo-rewrite-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.lpo-rewrite-card {
    padding: 1.25rem;
    background: var(--rw-surface, #fff);
    border: 1px solid var(--rw-border, #e5e7eb);
    border-left: 3px solid var(--rw-accent, #0D5F3F);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.lpo-rewrite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.lpo-rewrite-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--rw-text, #111);
    margin: 0;
}
.lpo-rewrite-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rw-accent, #0D5F3F);
    background: var(--rw-accent-light, #ecfdf5);
    border: 1.5px solid rgba(13,95,63,0.2);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.dark .lpo-rewrite-copy { border-color: rgba(52,211,153,0.25); }
.lpo-rewrite-copy:hover {
    background: rgba(13,95,63,0.12);
    border-color: rgba(13,95,63,0.35);
}
.dark .lpo-rewrite-copy:hover {
    background: rgba(52,211,153,0.18);
    border-color: rgba(52,211,153,0.4);
}
.lpo-copy--success {
    color: var(--rw-success, #0D5F3F) !important;
    background: var(--rw-success-light, #ecfdf5) !important;
    border-color: var(--rw-success, #0D5F3F) !important;
}
.lpo-rewrite-body {
    font-size: 0.9rem;
    color: var(--rw-text, #333);
    line-height: 1.7;
    margin: 0;
    white-space: pre-line;
}

/* ── Keywords ────────────────────────────────────────────────── */
.lpo-keywords-section { margin-bottom: 2.5rem; }
.lpo-keyword-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.lpo-keyword-pill {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--rw-accent, #0D5F3F);
    background: var(--rw-accent-light, #ecfdf5);
    border-radius: 9999px;
    transition: background 0.2s;
}
.lpo-keyword-pill:hover {
    background: rgba(13,95,63,0.15);
}
.dark .lpo-keyword-pill:hover {
    background: rgba(52,211,153,0.2);
}

/* ── Error banner ────────────────────────────────────────────── */
.lpo-error-banner {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--rw-error-light, #fef2f2);
    color: var(--rw-error, #991b1b);
    border: 1px solid var(--rw-error, #fca5a5);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    z-index: 50;
    max-width: 500px;
    font-size: 0.875rem;
}
.lpo-error-banner p { margin: 0; }
.lpo-error-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: inherit;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}

/* ── How it works ────────────────────────────────────────────── */
.lpo-how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.lpo-how-tile { text-align: center; padding: 1.5rem; }
.lpo-how-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0D5F3F, #34D399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}
.dark .lpo-how-num { background: linear-gradient(135deg, #34D399, #6EE7B7); -webkit-background-clip: text; background-clip: text; }
.lpo-how-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rw-text, #111);
    margin: 0 0 0.4rem;
}
.lpo-how-desc {
    font-size: 0.85rem;
    color: var(--rw-muted, #666);
    line-height: 1.6;
    margin: 0;
}

/* ── FAQ ─────────────────────────────────────────────────────── */
.lpo-faq-list { max-width: 640px; margin: 0 auto; }
.lpo-faq-item {
    border-bottom: 1px solid var(--rw-border, #e5e7eb);
    padding: 1rem 0;
}
.lpo-faq-item:last-child { border-bottom: none; }
.lpo-faq-q {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rw-text, #222);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.lpo-faq-q::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--rw-muted, #999);
    transition: transform 0.2s;
}
.lpo-faq-item[open] .lpo-faq-q::after { transform: rotate(45deg); }
.lpo-faq-q::-webkit-details-marker { display: none; }
.lpo-faq-a {
    font-size: 0.875rem;
    color: var(--rw-muted, #555);
    line-height: 1.65;
    margin: 0.75rem 0 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .lpo-dims { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .lpo-hero { padding: 3rem 0 2rem; }
    .lpo-hero-title { font-size: 1.5rem; }
    .lpo-form-card { padding: 1.25rem; }
    .lpo-dims { grid-template-columns: 1fr; }
    .lpo-how-grid { grid-template-columns: 1fr; gap: 1rem; }
    .lpo-rewrite-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .lpo-issue-header { flex-wrap: wrap; }
}
