/**
 * Conversational Job Search - Main Styles
 * Figma Design Implementation
 */

/* Theme Color Variables - Inherit from theme (PHP provides fallbacks) */
:root {
    --cjs-surface: var(--cjs-theme-surface);
    --cjs-surface-muted: var(--cjs-theme-surface-muted);
    --cjs-border: var(--cjs-theme-border);
    --cjs-accent: var(--cjs-theme-primary);
    --cjs-text: var(--cjs-theme-text);
    --cjs-text-light: var(--cjs-theme-text-light);
    --cjs-muted: var(--cjs-theme-muted);
    --cjs-bg: #f5f5f5;
    --cjs-dark: #1d1c1b;
    --cjs-shadow: 0px 18px 36px rgba(0, 0, 0, 0.12);
    --cjs-secondary: var(--cjs-theme-secondary);
}

/* Base styles */
#conversational-job-search-root {
    position: fixed;
    z-index: 999999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Chat Window */
.conversational-job-search-window {
    position: fixed;
    width: 500px;
    height: 800px;
    max-height: calc(100vh - 100px);
    background: var(--cjs-surface);
    border: 1px solid var(--cjs-border);
    border-radius: 16px;
    box-shadow: var(--cjs-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.2s ease-out;
    z-index: 999998;
}

.conversational-job-search-window-bottom-right {
    bottom: 90px;
    right: 24px;
}

.conversational-job-search-window-bottom-left {
    bottom: 90px;
    left: 24px;
}

.conversational-job-search-window-top-right {
    top: 24px;
    right: 24px;
}

.conversational-job-search-window-top-left {
    top: 24px;
    left: 24px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Fullscreen Overlay Mode */
.conversational-job-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999997;
    backdrop-filter: blur(2px);
}

.conversational-job-search-window-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 500px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2) !important;
    animation: slideInFromRight 0.3s ease-out;
    z-index: 999998;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .conversational-job-search-window-fullscreen {
        width: 100% !important;
        left: 0 !important;
    }
}

.conversational-job-search-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header */
.conversational-job-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 16px;
    border-bottom: 1px solid var(--cjs-border);
    background: var(--cjs-surface);
    position: relative;
}

.conversational-job-search-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.conversational-job-search-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--cjs-surface-muted);
    border: 1px solid var(--cjs-border);
    font-weight: 700;
    font-size: 16px;
    color: var(--cjs-muted);
}

.conversational-job-search-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conversational-job-search-avatar svg {
    width: 28px;
    height: 28px;
    color: var(--cjs-accent);
}

.conversational-job-search-avatar svg path {
    fill: currentColor; /* Inherit color from parent */
}

.conversational-job-search-header-text {
    flex: 1;
}

.conversational-job-search-bot-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: var(--cjs-text);
}

.conversational-job-search-bot-status {
    font-size: 13px;
    opacity: 0.9;
    margin: 4px 0 0 0;
    display: none; /* Hide status in Figma design */
    align-items: center;
    gap: 6px;
}

.conversational-job-search-status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.conversational-job-search-header-actions {
    display: flex;
    gap: 8px;
}

.conversational-job-search-header-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--cjs-border);
    background: var(--cjs-surface-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--cjs-accent); /* Use theme accent color */
}

.conversational-job-search-header-btn:hover {
    background: color-mix(in srgb, var(--cjs-accent) 8%, transparent);
    border-color: var(--cjs-accent);
    color: var(--cjs-accent);
}

.conversational-job-search-header-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Menu */
.conversational-job-search-menu {
    position: absolute;
    top: 60px;
    right: 16px;
    background: var(--cjs-surface);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 999999;
    min-width: 150px;
    overflow: hidden;
    animation: menuFadeIn 0.15s ease-out;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.conversational-job-search-menu-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: var(--cjs-surface);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--cjs-text);
    transition: all 0.2s;
}

.conversational-job-search-menu-item:hover {
    background: color-mix(in srgb, var(--cjs-accent) 10%, transparent);
    color: var(--cjs-accent);
}

.conversational-job-search-menu-item:hover svg,
.conversational-job-search-menu-item:hover i {
    color: var(--cjs-accent);
}

.conversational-job-search-menu-item svg,
.conversational-job-search-menu-item i {
    width: 16px;
    height: 16px;
    color: var(--cjs-muted);
    transition: color 0.2s;
}

/* Messages */
.conversational-job-search-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--cjs-surface);
}

.conversational-job-search-messages::-webkit-scrollbar {
    width: 6px;
}

.conversational-job-search-messages::-webkit-scrollbar-track {
    background: transparent;
}

.conversational-job-search-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.conversational-job-search-message {
    display: flex;
    gap: 12px;
    padding: 0;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.conversational-job-search-message-ai {
    align-items: flex-start;
}

.conversational-job-search-message-user {
    align-items: flex-start;
    flex-direction: row;
    justify-content: flex-end;
}

.conversational-job-search-message-avatar,
.conversational-job-search-message-avatar-user {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cjs-surface-muted);
    border: 1px solid var(--cjs-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-weight: 700;
    font-size: 14px;
    color: var(--cjs-muted);
}

.conversational-job-search-message-avatar img,
.conversational-job-search-message-avatar-user img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conversational-job-search-message-avatar svg {
    width: 24px;
    height: 24px;
    color: var(--cjs-accent);
}

.conversational-job-search-message-avatar svg path {
    fill: currentColor; /* Inherit color from parent */
}

.conversational-job-search-message-content {
    max-width: 80%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.conversational-job-search-message-user .conversational-job-search-message-content {
    align-items: flex-end;
}

.conversational-job-search-message-bubble {
    padding: 12px 14px;
    border-radius: 14px;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
}

.conversational-job-search-message-ai .conversational-job-search-message-bubble {
    background: var(--cjs-surface-muted);
    color: var(--cjs-text-light);
    border: 1px solid var(--cjs-border);
    border-radius: 14px;
    box-shadow: none;
}

.conversational-job-search-message-user .conversational-job-search-message-bubble {
    background: var(--cjs-accent);
    color: white;
    border: 1px solid var(--cjs-accent);
    border-radius: 14px;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--cjs-accent) 30%, transparent);
}

.conversational-job-search-message-time {
    font-size: 12px;
    color: var(--cjs-muted);
    padding: 0;
    margin-top: 4px;
}

.conversational-job-search-message-bubble a {
    color: inherit;
    text-decoration: underline;
}

/* Attachments */
.conversational-job-search-attachment-image {
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 200px;
}

.conversational-job-search-attachment-image img {
    width: 100%;
    height: auto;
    display: block;
}

.conversational-job-search-attachment-file {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.conversational-job-search-attachment-file svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Typing Indicator */
.conversational-job-search-typing-bubble {
    background: var(--cjs-surface);
    border: 1px solid var(--cjs-border);
    border-radius: 16px 16px 16px 4px;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.conversational-job-search-typing-dots {
    display: flex;
    gap: 6px;
    padding: 0;
}

.conversational-job-search-typing-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cjs-accent);
    animation: typingBounce 1.4s infinite;
}

.conversational-job-search-typing-dots span:nth-child(2) {
    opacity: 0.7;
    animation-delay: 0.2s;
}

.conversational-job-search-typing-dots span:nth-child(3) {
    opacity: 0.5;
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Quick Replies */
.conversational-job-search-quick-replies {
    padding: 12px 18px;
    border-top: none;
    background: var(--cjs-surface);
    max-height: 200px;
    overflow-y: auto;
}

.conversational-job-search-quick-replies-label {
    font-size: 12px;
    color: var(--cjs-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conversational-job-search-quick-replies-label svg {
    width: 14px;
    height: 14px;
    color: var(--cjs-accent);
    flex-shrink: 0;
}

.conversational-job-search-quick-replies-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: flex-start;
}

.conversational-job-search-quick-reply {
    padding: 10px 14px;
    background: var(--cjs-surface);
    border: 1.5px solid var(--cjs-accent);
    border-radius: 8px;
    font-size: 14px;
    color: var(--cjs-accent);
    cursor: pointer;
    transition: all 150ms ease;
    white-space: normal;
    text-align: left;
    font-weight: 600;
    line-height: 1.4;
}

.conversational-job-search-quick-reply:hover {
    background: color-mix(in srgb, var(--cjs-accent) 8%, transparent);
    border-color: color-mix(in srgb, var(--cjs-accent) 90%, black);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--cjs-accent) 15%, transparent);
}

.conversational-job-search-quick-reply:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px color-mix(in srgb, var(--cjs-accent) 10%, transparent);
}

/* Input Area */
.conversational-job-search-input-container {
    background: var(--cjs-surface);
    display: flex;
    flex-direction: column;
    padding: 0 18px 18px;
}

.conversational-job-search-input-wrapper {
    background: var(--cjs-surface-muted);
    border: 1px solid var(--cjs-border);
    border-radius: 14px;
    padding: 18px 30px 26px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 120px;
    position: relative;
}

.conversational-job-search-attach-btn {
    border: none;
    background-color: var(--cjs-accent);
    color: #fff;
    border-radius: 22px;
    padding: 10px 16px;
    min-width: 130px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 120ms ease;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--cjs-accent) 25%, transparent);
    position: absolute;
    bottom: 16px;
    right: 60px; /* Position to left of send button */
    z-index: 10;
}

.conversational-job-search-attach-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--cjs-accent) 35%, transparent);
    background-color: color-mix(in srgb, var(--cjs-accent) 90%, black);
    opacity: 0.95;
}

.conversational-job-search-attach-btn svg,
.conversational-job-search-attach-btn i {
    width: 15px;
    height: 15px;
    color: white;
    pointer-events: none;
}

.conversational-job-search-input {
    flex: 1;
    border: none;
    padding: 0 0 32px 0; /* Small bottom padding so text clears buttons */
    font-size: 16px;
    font-family: inherit;
    resize: none;
    min-height: 96px;
    max-height: 220px;
    outline: none;
    line-height: 1.7;
    background: transparent;
    overflow-y: auto;
    color: var(--cjs-text);
    align-self: stretch;
}

.conversational-job-search-input:focus {
    outline: none;
}

.conversational-job-search-input::placeholder {
    color: var(--cjs-muted);
}

.conversational-job-search-sparkle {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
    margin-top: 2px; /* Align with top of textarea */
    color: var(--cjs-accent);
}

.conversational-job-search-sparkle path {
    fill: currentColor; /* Inherit color from parent */
}

.conversational-job-search-send-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border: none;
    background-color: var(--cjs-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    flex-shrink: 0;
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 10;
}

.conversational-job-search-send-btn:hover {
    background-color: #0d0c0b;
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.conversational-job-search-send-btn:active {
    transform: translateY(0);
}

.conversational-job-search-send-btn svg,
.conversational-job-search-send-btn i {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

/* Attachment Previews */
.conversational-job-search-attachments-preview {
    padding: 12px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--cjs-surface-muted);
    border-radius: 12px;
    margin: 0 18px 12px;
}

.conversational-job-search-attachment-preview {
    position: relative;
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.conversational-job-search-attachment-image-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--cjs-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.conversational-job-search-attachment-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conversational-job-search-attachment-file-preview {
    background: var(--cjs-accent);
    color: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--cjs-accent) 25%, transparent);
    position: relative;
    min-width: 200px;
    max-width: 300px;
}

.conversational-job-search-attachment-file-preview i,
.conversational-job-search-attachment-file-preview .file-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.conversational-job-search-attachment-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.conversational-job-search-remove-attachment {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: var(--cjs-dark);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-size: 12px;
    z-index: 2;
}

.conversational-job-search-remove-attachment:hover {
    background: color-mix(in srgb, var(--cjs-dark) 90%, black);
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.conversational-job-search-remove-attachment i {
    color: white;
}

/* Attachments in Messages */
.conversational-job-search-message-attachment-image {
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 200px;
}

.conversational-job-search-message-attachment-image img {
    width: 100%;
    height: auto;
    display: block;
}

.conversational-job-search-message-attachment-file {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 12px;
}

.conversational-job-search-message-attachment-file svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    min-width: 12px;
}

.conversational-job-search-message-attachment-file i {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Floating Button */
.conversational-job-search-float-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    border: none;
    background: var(--cjs-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    z-index: 999999 !important;
    animation: floatPulse 3s ease-in-out infinite;
    padding: 0;
    margin: 0;
}

@keyframes floatPulse {
    0%, 100% {
        box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
    }
}

.conversational-job-search-float-btn-bottom-right {
    bottom: 24px;
    right: 24px;
}

.conversational-job-search-float-btn-bottom-left {
    bottom: 24px;
    left: 24px;
}

.conversational-job-search-float-btn-top-right {
    top: 24px;
    right: 24px;
}

.conversational-job-search-float-btn-top-left {
    top: 24px;
    left: 24px;
}

.conversational-job-search-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
    animation: none;
}

.conversational-job-search-float-btn.conversational-job-search-float-btn-open {
    transform: scale(1);
    animation: none;
}

.conversational-job-search-float-btn.conversational-job-search-float-btn-open:hover {
    transform: scale(1.05);
}

.conversational-job-search-float-icon {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.conversational-job-search-float-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    display: block;
    border: none;
}

.conversational-job-search-float-icon svg {
    width: 32px;
    height: 32px;
    color: white; /* White icon on teal button */
}

.conversational-job-search-float-icon svg path {
    fill: currentColor; /* Inherit color from parent */
}

/* Override sparkle styles when inside floating button */
.conversational-job-search-float-icon .conversational-job-search-sparkle {
    width: 32px !important;
    height: 32px !important;
    opacity: 1 !important; /* Full opacity in button */
    margin-top: 0 !important; /* No margin in button */
    color: white !important; /* White on teal background */
}

.conversational-job-search-float-avatar {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 50%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: none !important;
}

.conversational-job-search-float-btn svg {
    width: 32px;
    height: 32px;
    transition: all 0.3s;
    color: white; /* White icon on teal button */
}

.conversational-job-search-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: badgePop 0.3s ease-out;
}

@keyframes badgePop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Tooltip */
.conversational-job-search-tooltip {
    position: fixed;
    background: var(--cjs-surface);
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--cjs-border);
    max-width: 200px;
    z-index: 999997;
    animation: tooltipSlideIn 0.3s ease-out;
}

/* Tooltip arrow/pointer */
.conversational-job-search-tooltip:after,
.conversational-job-search-tooltip:before {
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border: solid transparent;
}

.conversational-job-search-tooltip-bottom-right {
    bottom: 80px;
    right: 90px;
}

.conversational-job-search-tooltip-bottom-right:after {
    left: 100%;
    top: 75%;
    border-color: rgba(255, 255, 255, 0);
    border-left-color: #fff;
    border-width: 10px 10px 2px 10px;
    margin-top: -10px;
}

.conversational-job-search-tooltip-bottom-right:before {
    left: 100%;
    top: 75%;
    border-color: rgba(207, 207, 207, 0);
    border-left-color: #cacaca;
    border-width: 11px 11px 3px 11px;
    margin-top: -11px;
}

.conversational-job-search-tooltip-bottom-left {
    bottom: 80px;
    left: 90px;
}

.conversational-job-search-tooltip-bottom-left:after {
    right: 100%;
    top: 75%;
    border-color: rgba(255, 255, 255, 0);
    border-right-color: #fff;
    border-width: 10px 10px 2px 10px;
    margin-top: -10px;
}

.conversational-job-search-tooltip-bottom-left:before {
    right: 100%;
    top: 75%;
    border-color: rgba(207, 207, 207, 0);
    border-right-color: #cacaca;
    border-width: 11px 11px 3px 11px;
    margin-top: -11px;
}

.conversational-job-search-tooltip-top-right {
    top: 80px;
    right: 90px;
}

.conversational-job-search-tooltip-top-right:after {
    left: 100%;
    top: 25%;
    border-color: rgba(255, 255, 255, 0);
    border-left-color: #fff;
    border-width: 10px 10px 2px 10px;
    margin-top: -10px;
}

.conversational-job-search-tooltip-top-right:before {
    left: 100%;
    top: 25%;
    border-color: rgba(207, 207, 207, 0);
    border-left-color: #cacaca;
    border-width: 11px 11px 3px 11px;
    margin-top: -11px;
}

.conversational-job-search-tooltip-top-left {
    top: 80px;
    left: 90px;
}

.conversational-job-search-tooltip-top-left:after {
    right: 100%;
    top: 25%;
    border-color: rgba(255, 255, 255, 0);
    border-right-color: #fff;
    border-width: 10px 10px 2px 10px;
    margin-top: -10px;
}

.conversational-job-search-tooltip-top-left:before {
    right: 100%;
    top: 25%;
    border-color: rgba(207, 207, 207, 0);
    border-right-color: #cacaca;
    border-width: 11px 11px 3px 11px;
    margin-top: -11px;
}

@keyframes tooltipSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.conversational-job-search-tooltip-content {
    font-size: 14px;
    color: var(--cjs-text);
    line-height: 1.4;
}

.conversational-job-search-tooltip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--cjs-muted);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.conversational-job-search-tooltip-close:hover {
    color: var(--cjs-text-light);
}

.conversational-job-search-tooltip-close svg {
    width: 14px;
    height: 14px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .conversational-job-search-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        left: 16px !important;
        right: 16px !important;
    }
    
    .conversational-job-search-float-btn {
        width: 52px;
        height: 52px;
    }
    
    .conversational-job-search-message-content {
        max-width: 80%;
    }
}

/* Icon helper */
.conversational-job-search-icon {
    width: 20px;
    height: 20px;
}

/* Rich Message Formatting */
.conversational-job-search-message-bubble h1,
.conversational-job-search-message-bubble h2,
.conversational-job-search-message-bubble h3 {
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.conversational-job-search-msg-h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: inherit;
}

.conversational-job-search-msg-h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: inherit;
}

.conversational-job-search-msg-h3 {
    font-size: 1rem;
    font-weight: 600;
    color: inherit;
}

.conversational-job-search-msg-list {
    margin: 8px 0;
    padding-left: 20px;
    list-style-position: outside;
}

.conversational-job-search-msg-list:first-child {
    margin-top: 0;
}

.conversational-job-search-msg-list:last-child {
    margin-bottom: 0;
}

.conversational-job-search-message-ai .conversational-job-search-msg-list {
    list-style-type: disc;
}

.conversational-job-search-msg-list-ordered {
    list-style-type: decimal;
}

.conversational-job-search-msg-li {
    margin: 4px 0;
    line-height: 1.5;
}

.conversational-job-search-message-bubble code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.conversational-job-search-message-user .conversational-job-search-message-bubble code {
    background: rgba(255, 255, 255, 0.2);
}

.conversational-job-search-msg-link {
    color: var(--cjs-accent);
    text-decoration: underline;
    word-break: break-word;
}

.conversational-job-search-message-user .conversational-job-search-msg-link {
    color: #fff;
    text-decoration: underline;
}

.conversational-job-search-message-bubble strong {
    font-weight: 600;
}

.conversational-job-search-message-bubble em {
    font-style: italic;
}

/* Job Card Pills - Simplified Figma Style */
.conversational-job-search-job-card {
    background: var(--cjs-surface);
    border: 2px solid var(--cjs-accent);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.conversational-job-search-job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cjs-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.conversational-job-search-job-card:hover {
    border-color: color-mix(in srgb, var(--cjs-accent) 85%, black);
    background: color-mix(in srgb, var(--cjs-accent) 8%, transparent);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--cjs-accent) 25%, transparent), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.conversational-job-search-job-card:hover::before {
    transform: scaleX(1);
}

.conversational-job-search-job-card:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px color-mix(in srgb, var(--cjs-accent) 15%, transparent);
}

.conversational-job-search-job-card-title {
    color: var(--cjs-accent);
    font-weight: 700;
    font-size: 15.5px;
    margin: 0 0 10px 0;
    line-height: 1.45;
    letter-spacing: -0.01em;
    transition: all 0.3s ease;
}

.conversational-job-search-job-card:hover .conversational-job-search-job-card-title {
    color: color-mix(in srgb, var(--cjs-accent) 85%, black);
    letter-spacing: 0;
}

.conversational-job-search-job-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13.5px;
    color: var(--cjs-text-light);
    line-height: 1.5;
}

.conversational-job-search-job-card-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.conversational-job-search-job-card-icon {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.conversational-job-search-job-card:hover .conversational-job-search-job-card-icon {
    transform: scale(1.1);
}

.conversational-job-search-job-cards-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0 0 0;
}

.conversational-job-search-job-card:nth-child(1) { animation: fadeInUp 0.4s ease-out 0.05s backwards; }
.conversational-job-search-job-card:nth-child(2) { animation: fadeInUp 0.4s ease-out 0.1s backwards; }
.conversational-job-search-job-card:nth-child(3) { animation: fadeInUp 0.4s ease-out 0.15s backwards; }
.conversational-job-search-job-card:nth-child(4) { animation: fadeInUp 0.4s ease-out 0.2s backwards; }
.conversational-job-search-job-card:nth-child(n+5) { animation: fadeInUp 0.4s ease-out 0.25s backwards; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.conversational-job-search-job-cards-intro {
    margin-bottom: 8px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--cjs-text-light);
    font-weight: 500;
    animation: fadeIn 0.5s ease-out;
}

.conversational-job-search-job-cards-intro strong {
    color: var(--cjs-accent);
    font-weight: 700;
}

/* ========================================
   RESPONSIVE: Input Area with Floating Buttons
   ======================================== */

@media (max-width: 480px) {
    .conversational-job-search-input-wrapper {
        min-height: 100px;
        padding: 16px 120px 16px 16px;
    }
    
    .conversational-job-search-input {
        min-height: 68px;
    }
    
    .conversational-job-search-attach-btn {
        bottom: 12px;
        right: 56px;
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .conversational-job-search-send-btn {
        bottom: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        min-width: 38px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
