/* ============================================
   LinkedIn Outreach — Page Styles
   ============================================ */

/* Back link */
.li-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 20px;
    padding: 8px 16px 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.li-back-link:hover {
    color: var(--accent-light);
    background: rgba(36,80,184,0.08);
}
.li-hero {
    padding: 72px 0 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.li-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(36,80,184,0.13) 0%, transparent 70%);
    pointer-events: none;
}

.li-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(36,80,184,0.1);
    border: 1px solid rgba(36,80,184,0.2);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-light);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.li-hero h1 {
    font-family: 'Space Grotesk', var(--font-display);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.li-hero h1 span {
    background: linear-gradient(135deg, #2450b8, #3366d6 50%, #2450b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.li-hero p {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Step indicator */
.li-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 40px auto 0;
    max-width: 480px;
    padding: 0 32px;
}

.li-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
}

.li-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 20px);
    right: calc(-50% + 20px);
    height: 1px;
    background: var(--border-light);
    transition: background 0.4s ease;
}

.li-step.completed:not(:last-child)::after {
    background: rgba(36,80,184,0.4);
}

.li-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    transition: all 0.35s var(--ease-out);
    position: relative;
    z-index: 1;
}

.li-step.active .li-step-num {
    background: rgba(36,80,184,0.15);
    border-color: var(--accent);
    color: var(--accent-light);
    box-shadow: 0 0 0 4px rgba(36,80,184,0.08);
}

.li-step.completed .li-step-num {
    background: rgba(36,80,184,0.18);
    border-color: var(--accent);
    color: var(--accent-light);
}

.li-step-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.li-step.active .li-step-label,
.li-step.completed .li-step-label {
    color: var(--accent-light);
}

/* Main layout */
.li-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 48px 80px;
}

/* Content layout */
.li-layout {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 32px;
    align-items: start;
}

/* Panels */
.li-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.li-panel-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.015);
}

.li-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.li-panel-title-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.7;
}

.li-panel-body {
    position: relative;
    z-index: 1;
    padding: 22px;
}

/* Prevent DOCX render from expanding the form column width (CSS Grid min-width: auto fix) */
.li-form-col {
    min-width: 0;
}

/* Form fields */
.li-field {
    margin-bottom: 18px;
}

.li-field:last-child {
    margin-bottom: 0;
}

.li-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

.li-label-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.li-label-opt {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
}

.li-input, .li-textarea-field {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 11px 14px;
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.li-input:focus, .li-textarea-field:focus {
    border-color: rgba(36,80,184,0.45);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(36,80,184,0.08);
}

.li-input::placeholder, .li-textarea-field::placeholder {
    color: var(--text-muted);
}

.li-textarea-field {
    resize: vertical;
    min-height: 90px;
    line-height: 1.65;
}

.li-textarea-field.large {
    min-height: 140px;
}

/* Generate button */
.li-generate-wrap {
    margin-top: 24px;
}

.li-generate-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 48px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    box-shadow:
        0 0 20px rgba(36, 80, 184, 0.4),
        0 0 60px rgba(36, 80, 184, 0.2),
        0 6px 28px rgba(36, 80, 184, 0.3);
    letter-spacing: -0.01em;
    position: relative;
}

.li-generate-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 100px;
    background: linear-gradient(135deg, #3366d6, var(--accent), #2450b8, var(--accent-dim), #3366d6);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(2px);
}

.li-generate-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow:
        0 0 15px rgba(36, 80, 184, 1),
        0 0 40px rgba(36, 80, 184, 0.9),
        0 0 80px rgba(36, 80, 184, 0.7),
        0 0 150px rgba(36, 80, 184, 0.5),
        0 0 250px rgba(36, 80, 184, 0.3);
}

.li-generate-btn:hover:not(:disabled)::after {
    opacity: 1;
    animation: li-btn-glow 2s ease-in-out infinite;
}

@keyframes li-btn-glow {
    0%, 100% { inset: -4px; opacity: 0.8; filter: blur(2px); }
    50% { inset: -8px; opacity: 1; filter: blur(6px); }
}

.li-generate-btn:active:not(:disabled) {
    transform: translateY(-2px) scale(1.03);
}

.li-generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.li-generate-btn .btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: li-spin 0.7s linear infinite;
}

.li-generate-btn.loading .btn-spinner {
    display: block;
}

.li-generate-btn.loading .btn-text {
    display: none;
}

@keyframes li-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Preview Panel
   ============================================ */
.li-preview-panel {
    position: sticky;
    top: 80px;
}

.li-preview-empty {
    padding: 60px 32px;
    text-align: center;
}

.li-preview-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(36,80,184,0.08);
    border: 1px solid rgba(36,80,184,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--accent);
}

.li-preview-empty h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.li-preview-empty p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 260px;
    margin: 0 auto;
}

/* Message document preview */
.li-preview-doc {
    display: none;
    padding: 0;
}

.li-preview-doc.visible {
    display: block;
}

.li-preview-doc-inner {
    padding: 36px 36px 28px;
    font-family: 'Lora', Georgia, serif;
    font-size: 14.5px;
    line-height: 1.9;
    color: var(--text-primary);
    min-height: 300px;
    max-height: 680px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}

.li-preview-doc-inner::-webkit-scrollbar {
    width: 4px;
}

.li-preview-doc-inner::-webkit-scrollbar-track {
    background: transparent;
}

.li-preview-doc-inner::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

/* Message typography */
.email-subject-line {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.email-subject-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.email-meta {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    line-height: 1.7;
    margin-bottom: 4px;
}

.email-divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

.email-body p {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.email-body p:last-child {
    margin-bottom: 0;
}

.email-signoff {
    margin-top: 24px;
    padding-top: 4px;
}

.email-signoff-word {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.email-signoff-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Preview toolbar */
.li-preview-toolbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.015);
}

.li-preview-toolbar.visible {
    display: flex;
}

.li-preview-actions {
    display: flex;
    gap: 8px;
}

.li-action-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-light);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-family: var(--font-body);
    white-space: nowrap;
}

.li-action-btn:hover {
    border-color: var(--border-accent);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.li-action-btn.primary {
    background: rgba(36,80,184,0.12);
    border-color: rgba(36,80,184,0.25);
    color: var(--accent-light);
}

.li-action-btn.primary:hover {
    background: rgba(36,80,184,0.2);
}

.li-regenerate-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: color 0.2s;
    font-family: var(--font-body);
}

.li-regenerate-btn:hover {
    color: var(--accent-light);
}

/* Tips sidebar */
.li-tips-panel {
    margin-top: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.li-tips-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.li-tips-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.li-tip-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.li-tip-num {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: rgba(36,80,184,0.12);
    border: 1px solid rgba(36,80,184,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-light);
    flex-shrink: 0;
    margin-top: 1px;
}

.li-tip-text {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Error message */
.li-error {
    display: none;
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--red);
}

.li-error.visible {
    display: block;
}

/* Animations */
@keyframes li-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.email-animate {
    animation: li-fadeIn 0.4s var(--ease-out) both;
}

.email-animate:nth-child(2) { animation-delay: 0.05s; }
.email-animate:nth-child(3) { animation-delay: 0.1s; }
.email-animate:nth-child(4) { animation-delay: 0.15s; }
.email-animate:nth-child(5) { animation-delay: 0.2s; }
.email-animate:nth-child(6) { animation-delay: 0.25s; }
.email-animate:nth-child(7) { animation-delay: 0.3s; }
.email-animate:nth-child(8) { animation-delay: 0.35s; }
.email-animate:nth-child(9) { animation-delay: 0.4s; }

/* Toast */
.li-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.35s var(--ease-out);
    pointer-events: none;
}

.li-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.li-toast.success {
    border-color: var(--green-border);
}

.li-toast.success svg {
    color: var(--green);
}

/* Responsive */
@media (max-width: 900px) {
    .li-layout {
        grid-template-columns: 1fr;
    }

    .li-preview-panel {
        position: static;
    }

    .li-steps {
        padding: 0 16px;
    }
}

@media (max-width: 768px) {
    .li-main {
        padding: 0 16px 60px;
    }

    .li-hero {
        padding: 48px 0 32px;
    }
}

@media (max-width: 480px) {
    }
