/* Resume Builder Styles */

/* ============================================
   Landing Page
   ============================================ */

.rb-landing {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    gap: 2.5rem;
}

.rb-hero {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.rb-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.rb-hero .rb-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.rb-hero .rb-no-account {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 500;
    opacity: 0.9;
}

/* Entry path cards */
.rb-paths {
    max-width: 880px;
    width: 100%;
    margin: 0 auto;
}

.rb-path-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 14px);
    padding: 2.25rem 1.75rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    height: 100%;
}

.rb-path-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 138, 76, 0.12);
}

.rb-path-card:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.rb-path-card .rb-path-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 138, 76, 0.1);
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.rb-path-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.rb-path-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.5;
}

/* Social proof */
.rb-social-proof {
    text-align: center;
    margin: 0 auto;
}

.rb-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.rb-stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-primary);
    letter-spacing: -0.01em;
}

.rb-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

@media (max-width: 767.98px) {
    .rb-landing {
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .rb-stats {
        gap: 1.5rem;
    }

    .rb-stat-number {
        font-size: 1.25rem;
    }
}

/* ============================================
   Upload Zone
   ============================================ */

.rb-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg, 12px);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: var(--bg-surface);
}

.rb-upload-zone:hover,
.rb-upload-zone.dragover {
    border-color: var(--accent-primary);
    background: color-mix(in srgb, var(--accent-primary) 5%, var(--bg-surface));
}

.rb-upload-zone .rb-upload-icon {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.rb-upload-zone .rb-upload-text {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.rb-upload-zone .rb-upload-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Upload progress skeleton */
.rb-upload-progress {
    max-width: 500px;
    margin: 0 auto;
}

.rb-skeleton-line {
    height: 12px;
    background: linear-gradient(90deg,
        var(--border-color) 25%,
        color-mix(in srgb, var(--border-color) 50%, var(--bg-surface)) 50%,
        var(--border-color) 75%
    );
    background-size: 200% 100%;
    animation: rb-skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.rb-skeleton-line:nth-child(2) { width: 85%; }
.rb-skeleton-line:nth-child(3) { width: 70%; }

@keyframes rb-skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Role Picker
   ============================================ */

.rb-role-picker {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.rb-role-picker h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.rb-role-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.rb-role-option {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 8px);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 0.9rem;
    color: var(--text-primary);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rb-role-option:hover,
.rb-role-option.active {
    border-color: var(--accent-primary);
    background: color-mix(in srgb, var(--accent-primary) 10%, var(--bg-surface));
}

.rb-role-option.active {
    font-weight: 600;
}

/* ============================================
   View Transitions
   ============================================ */

/* Safari doesn't reliably trigger CSS animations on Alpine x-if inserted elements.
   Using a minimal transition approach that degrades gracefully. */
.rb-view-enter {
    opacity: 1;
}

/* ============================================
   Responsive — Landing
   ============================================ */

@media (max-width: 576px) {
    .rb-path-card {
        padding: 1.5rem 1.25rem;
    }

    .rb-role-grid {
        grid-template-columns: 1fr;
    }

    .rb-upload-zone {
        padding: 2rem 1rem;
    }
}

/* ============================================
   Draft Recovery Banner
   ============================================ */

.rb-draft-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .rb-draft-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .rb-draft-banner .ms-auto {
        margin-left: 0 !important;
        justify-content: center;
    }
}

/* ============================================
   Status Bar
   ============================================ */

.rb-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ============================================
   Editor Layout (three-column)
   ============================================ */

.rb-editor-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 140px);
    min-height: calc(100dvh - 140px);
}

@media (min-width: 1200px) {
    .rb-editor-layout {
        grid-template-columns: 220px 1fr 260px;
    }
}

@media (min-width: 1400px) {
    .rb-editor-layout {
        grid-template-columns: 220px 1fr 300px;
    }
}

/* Sidebar */
.rb-col-sidebar {
    border-right: 1px solid var(--border-color);
    padding: 1.25rem 1rem;
    background: var(--bg-surface);
    position: sticky;
    top: 0;
    height: calc(100vh - 140px);
    height: calc(100dvh - 140px);
    overflow-y: auto;
}

.rb-sidebar-header {
    margin-bottom: 1rem;
}

.rb-section-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rb-nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border: none;
    background: none;
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    min-height: 44px;
    width: 100%;
    text-align: left;
}

.rb-nav-item:hover {
    background: color-mix(in srgb, var(--accent-primary) 8%, transparent);
    color: var(--text-primary);
}

.rb-nav-item.active {
    background: color-mix(in srgb, var(--accent-primary) 15%, transparent);
    color: var(--accent-primary);
    font-weight: 600;
}

/* Completion indicators */
.rb-nav-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    transition: all 0.2s;
}

.rb-nav-indicator.complete {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.rb-nav-indicator.partial {
    background: transparent;
    border-color: var(--accent-primary);
}

.rb-nav-indicator.empty {
    background: transparent;
    border-color: var(--border-color);
}

/* Editor panel */
.rb-col-editor {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    height: calc(100dvh - 140px);
}

.rb-section-content {
    flex: 1;
}

.rb-section-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Preview panel */
.rb-col-preview {
    border-left: 1px solid var(--border-color);
    background: var(--bg-surface);
    overflow-y: auto;
    height: calc(100vh - 140px);
    height: calc(100dvh - 140px);
    position: sticky;
    top: 0;
}

/* ============================================
   Section Forms
   ============================================ */

.rb-section {
    max-width: 700px;
}

.rb-section-header {
    margin-bottom: 1.5rem;
}

.rb-section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.rb-section-header p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.rb-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.rb-input {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
    min-height: 44px;
    font-size: 16px; /* Prevents iOS Safari auto-zoom on input focus */
}

.rb-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-primary) 20%, transparent);
}

.rb-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.rb-input:disabled,
.rb-input[disabled] {
    background: var(--bg-elevated, #1c1c1c);
    color: var(--text-secondary);
    opacity: 0.65;
}

.rb-textarea {
    resize: none;
    overflow: hidden;
    min-height: 80px;
}

/* Entry cards (experience, education, etc.) */
.rb-entry-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.rb-entry-compact {
    padding: 0.75rem 1rem;
}

.rb-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.rb-entry-number {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.rb-entry-actions {
    display: flex;
    gap: 0.25rem;
}

.rb-entry-actions .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    min-height: 44px;
    min-width: 44px;
}

.rb-add-btn {
    margin-top: 0.5rem;
    min-height: 44px;
}

/* Ghost states */
.rb-ghost-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.rb-ghost-state i {
    margin-bottom: 0.75rem;
    display: block;
}

.rb-ghost-state p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Subsections (extras) */
.rb-subsection {
    margin-bottom: 2rem;
}

.rb-subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* ============================================
   Skills Tag Input
   ============================================ */

.rb-tag-input-wrapper {
    display: flex;
    align-items: center;
}

.rb-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0;
}

.rb-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: color-mix(in srgb, var(--accent-primary) 15%, transparent);
    color: var(--accent-primary);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-pill, 20px);
    font-size: 0.85rem;
    font-weight: 500;
}

.rb-tag-remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0 0.1rem;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
    min-width: 20px;
    min-height: 20px;
}

.rb-tag-remove:hover {
    opacity: 1;
}

/* ============================================
   Mobile Navigation
   ============================================ */

.rb-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    z-index: 100;
    gap: 0.5rem;
}

.rb-mobile-nav-btn {
    flex: 1;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 8px);
    color: var(--text-primary);
    padding: 0.5rem;
    min-height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.rb-mobile-nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.rb-mobile-sections-btn {
    flex: 3;
}

.rb-mobile-sections-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: flex-end;
}

.rb-mobile-sections-panel {
    background: var(--bg-surface);
    border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
    width: 100%;
    padding: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

.rb-mobile-section-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-radius: var(--radius-md, 8px);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    min-height: 48px;
}

.rb-mobile-section-item.active {
    background: color-mix(in srgb, var(--accent-primary) 15%, transparent);
    color: var(--accent-primary);
    font-weight: 600;
}

/* ============================================
   Editor Responsive
   ============================================ */

@media (max-width: 991px) {
    .rb-editor-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .rb-col-editor {
        padding: 1rem;
        padding-bottom: 80px; /* space for mobile nav */
        height: auto;
        overflow-y: visible;
    }

    .rb-section {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .rb-col-editor {
        padding: 0.75rem;
        padding-bottom: 80px;
    }

    .rb-entry-card {
        padding: 0.75rem;
    }

    .rb-section-footer {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .rb-section-footer .btn {
        flex: 1;
        min-width: 0;
    }

    /* Larger checkboxes on mobile for touch */
    .form-check-input {
        width: 1.25em;
        height: 1.25em;
    }

    .rb-entry-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* ============================================
   ATS Score Panel (sidebar)
   ============================================ */

.rb-ats-panel {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.rb-ats-gauge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.rb-ats-score-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid currentColor;
    flex-shrink: 0;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.rb-ats-score-num {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.rb-ats-red { color: var(--bs-danger, #dc3545); }
.rb-ats-yellow { color: var(--bs-warning, #ffc107); }
.rb-ats-green { color: var(--bs-success, #198754); }

.rb-ats-score-label {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

/* Per-section mini bars */
.rb-ats-sections {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.rb-ats-section-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rb-ats-section-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    width: 65px;
    flex-shrink: 0;
    text-align: right;
}

.rb-ats-section-track {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.rb-ats-section-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ATS badge in status bar */
.rb-ats-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.rb-ats-badge-red {
    background: rgba(220, 53, 69, 0.15);
    color: var(--bs-danger, #dc3545);
}

.rb-ats-badge-yellow {
    background: rgba(255, 193, 7, 0.15);
    color: var(--bs-warning, #b58900);
}

.rb-ats-badge-green {
    background: rgba(25, 135, 84, 0.15);
    color: var(--bs-success, #198754);
}

/* ATS tip toast — positioned at top to avoid blocking content */
.rb-ats-tip {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--bs-warning, #ffc107);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    max-width: 420px;
    width: calc(100% - 2rem);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    animation: rbAtsTipSlide 0.3s ease;
}

@keyframes rbAtsTipSlide {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.rb-ats-tip-fix {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.rb-ats-tip-fix:hover {
    opacity: 0.8;
}

/* ============================================
   Auth Gate Modal
   ============================================ */

.rb-auth-gate-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.rb-auth-gate-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
}

.rb-auth-gate-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    z-index: 1;
    border-radius: 4px;
    transition: color 0.15s;
}

.rb-auth-gate-close:hover {
    color: var(--text-primary);
}

.rb-auth-gate-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.rb-auth-gate-body {
    padding: 0 2rem 2rem;
}

.rb-auth-gate-google {
    background: var(--bg-elevated, #fff);
    color: var(--text-primary, #333);
    border: 1px solid var(--border-color, #ddd);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.rb-auth-gate-google:hover {
    background: var(--bg-hover, #f8f9fa);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: var(--text-primary, #333);
}

.rb-auth-gate-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.rb-auth-gate-divider::before,
.rb-auth-gate-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.rb-auth-gate-form .form-control {
    background: var(--bg-surface, #fff);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.rb-auth-gate-form .form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.rb-auth-gate-form .form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================
   AI Suggestions
   ============================================ */

.rb-ai-btn {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.rb-ai-btn:hover:not(:disabled) {
    background: rgba(37, 99, 235, 0.15);
    border-color: var(--accent-primary);
}

.rb-ai-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rb-ai-suggestions {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 8px;
}

.rb-ai-suggestions-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.rb-ai-chip {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.35rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.rb-ai-chip:hover:not(:disabled) {
    border-color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.04);
}

.rb-ai-chip i {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent-primary);
}

.rb-ai-chip-accepted {
    background: rgba(25, 135, 84, 0.06);
    border-color: rgba(25, 135, 84, 0.3);
    opacity: 0.7;
    cursor: default;
}

.rb-ai-chip-accepted i {
    color: var(--bs-success, #198754);
}

@keyframes rbAiChipAccept {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.rb-ai-chip-accepted {
    animation: rbAiChipAccept 0.15s ease;
}

/* ============================================
   Job Matching
   ============================================ */

.rb-job-matches {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.rb-job-matches-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.rb-job-matches-header h6 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.rb-job-card {
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary, #fafafa);
    transition: border-color 0.15s ease;
}

.rb-job-card:hover {
    border-color: var(--accent-primary, #0d6efd);
}

.rb-job-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.rb-job-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.rb-job-match-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent-primary, #0d6efd);
    background: rgba(13, 110, 253, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.rb-job-meta {
    font-size: 0.7rem;
    color: var(--text-muted, #6c757d);
    margin-top: 0.2rem;
}

.rb-job-remote-badge {
    font-size: 0.6rem;
    background: rgba(25, 135, 84, 0.1);
    color: var(--bs-success, #198754);
    padding: 0 0.3rem;
    border-radius: 3px;
    margin-left: 0.25rem;
}

.rb-job-salary {
    font-size: 0.7rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-top: 0.2rem;
}

.rb-job-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.4rem;
}

.rb-job-actions .btn {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
}

/* ============================================
   Smart Defaults (Suggested Skills)
   ============================================ */

.rb-smart-defaults {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(13, 110, 253, 0.04);
    border: 1px solid rgba(13, 110, 253, 0.12);
    border-radius: 8px;
}

.rb-smart-defaults-label {
    font-size: 0.8rem;
    color: var(--text-muted, #6c757d);
    margin-bottom: 0.5rem;
}

.rb-smart-defaults-label i {
    color: #ffc107;
}

.rb-smart-defaults-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.rb-smart-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid rgba(13, 110, 253, 0.25);
    border-radius: 16px;
    background: white;
    font-size: 0.78rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.rb-smart-chip:hover:not(:disabled) {
    background: rgba(13, 110, 253, 0.08);
    border-color: var(--accent-primary, #0d6efd);
}

.rb-smart-chip i {
    font-size: 0.7rem;
}

.rb-smart-chip-added {
    background: rgba(25, 135, 84, 0.08);
    border-color: rgba(25, 135, 84, 0.25);
    color: var(--bs-success, #198754);
    cursor: default;
}

/* ============================================
   Content Ecosystem Link
   ============================================ */

.rb-content-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1rem;
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted, #6c757d);
    text-decoration: none;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    transition: all 0.15s ease;
}

.rb-content-link:hover {
    color: var(--accent-primary, #0d6efd);
    border-color: var(--accent-primary, #0d6efd);
    background: rgba(13, 110, 253, 0.03);
}

/* ============================================
   Touch Device Overrides
   ============================================ */

@media (pointer: coarse) {
    .rb-tag-remove {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .rb-smart-chip {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
    }

    .rb-ai-btn {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
    }
}

/* ATS tip position — clear the preview FAB on mobile */
@media (max-width: 767.98px) {
    .rb-ats-tip {
        bottom: 140px;
    }
}
