/* AI Career Coach Workspace Styles — Modern AI Workspace */

/* ─── Workspace Shell (fills viewport below header) ──────────────── */
.coach-main-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fcfdfe;
}

.workspace-wrapper {
    display: flex;
    flex: 0 0 auto;
    width: 100%;
    height: calc(100vh - 80px);
    overflow: hidden;
}

/* ─── Left Sidebar Navigation Panel ──────────────────────────────── */
.workspace-sidebar {
    width: 250px;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

.btn-new-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: var(--primary, #0066FF);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.25);
    margin-bottom: 20px;
    box-sizing: border-box;
}

.btn-new-chat:hover {
    background: #0052cc;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 102, 255, 0.35);
}

.btn-new-chat svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 0 14px 8px;
    margin-top: 4px;
}

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

.history-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-section.bottom-nav {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.sidebar-item,
.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
    position: relative;
    box-sizing: border-box;
}

.sidebar-item:hover,
.history-item:hover {
    background: var(--bg-accent, #f8fafc);
    color: var(--text-main);
}

.sidebar-item.active,
.history-item.active {
    background: rgba(0, 102, 255, 0.06);
    color: var(--primary, #0066FF);
    font-weight: 600;
}

.sidebar-item.active::before,
.history-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}

.sidebar-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ─── Main Content Area (flex column: scroll zone + fixed composer) ── */
.main-content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding-left: 48px;
}

/* ─── Scrollable Chat Zone ───────────────────────────────────────── */
.chat-scroll-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 40px 40px 0;
    display: flex;
    flex-direction: column;
}

/* Custom scrollbar for the chat area */
.chat-scroll-area::-webkit-scrollbar {
    width: 6px;
}
.chat-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}
.chat-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}
.chat-scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.18);
}

.workspace-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: flex-end;
    padding-bottom: 16px;
}

/* ─── Initial Hero & Prompt Cards View ────────────────────────────── */
.initial-workspace-view {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    animation: fadeIn 0.4s ease;
}

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

.compact-hero {
    margin-bottom: 32px;
    max-width: 680px;
    transform: translateY(-12px);
}

.compact-hero h1 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1.2px;
    line-height: 1.25;
    color: var(--text-main);
    margin-bottom: 12px;
}

.compact-hero h1 .highlight {
    color: var(--primary);
}

.compact-hero p {
    font-size: 15.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 580px;
    margin: 0;
}

/* Suggested Action Prompt Cards */
.suggested-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.action-card:hover {
    border-color: rgba(0, 102, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.08);
}

.action-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 102, 255, 0.06);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-icon svg {
    width: 18px;
    height: 18px;
}

.action-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
}

/* ─── Active Conversation Thread ──────────────────────────────────── */
.active-conversation-thread {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 12px;
}

.chat-messages-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.chat-msg {
    display: flex;
    gap: 14px;
    max-width: 78%;
    animation: messageFade 0.3s ease;
}

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

.chat-msg.user-msg {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg.ai-msg {
    align-self: flex-start;
}

.msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
}

.msg-avatar svg {
    width: 18px;
    height: 18px;
}

.msg-bubble {
    padding: 16px 22px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
}

.ai-msg .msg-bubble {
    background: #f4f8ff;
    border: 1px solid rgba(0, 102, 255, 0.12);
    border-top-left-radius: 4px;
}

.user-msg .msg-bubble {
    background: var(--primary);
    color: white;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.2);
}

.msg-bubble p {
    margin-bottom: 8px;
}

.msg-bubble p:last-child {
    margin-bottom: 0;
}

/* Typing indicator */
.typing-box {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 20px;
    background: #f4f8ff;
    border: 1px solid rgba(0, 102, 255, 0.12);
    border-radius: 18px;
    border-top-left-radius: 4px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.6;
    animation: dotPulse 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ─── Chat Composer Bar — Fixed/Floating at Bottom ────────────────── */
.chat-composer-wrapper,
.composer-container {
    flex-shrink: 0;
    padding: 16px 40px 22px 0;
    background: rgba(252, 253, 254, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    z-index: 10;
}

.chat-composer-form,
.composer-box {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: #ffffff;
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 24px;
    padding: 8px 16px 8px 24px;
    min-height: 56px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-composer-form:focus-within,
.composer-box:focus-within {
    border-color: var(--primary, #0066FF);
    box-shadow: 0 6px 28px rgba(0, 102, 255, 0.12);
}

.composer-icon-btn,
.btn-tool-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary, #64748b);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.composer-icon-btn:hover,
.btn-tool-icon:hover {
    background: rgba(0, 102, 255, 0.06);
    color: var(--primary, #0066FF);
}

.composer-icon-btn svg,
.btn-tool-icon svg {
    width: 20px;
    height: 20px;
}

.composer-text-input,
.composer-textarea {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-main, #0f172a);
    background: transparent;
    padding: 8px 4px;
    line-height: 1.5;
    resize: none;
    overflow-y: hidden;
    max-height: 120px;
}

.composer-text-input::placeholder,
.composer-textarea::placeholder {
    color: #94a3b8;
}

.composer-send-btn,
.btn-send-message {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary, #0066FF);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.25);
}

.composer-send-btn:hover,
.btn-send-message:hover {
    background: #0052cc;
    transform: scale(1.04);
    box-shadow: 0 6px 18px rgba(0, 102, 255, 0.3);
}

.composer-send-btn svg,
.btn-send-message svg {
    width: 17px;
    height: 17px;
}

.composer-text-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-main);
    background: transparent;
    padding: 8px 4px;
    line-height: 1.5;
    resize: none;
    overflow-y: hidden;
    max-height: 120px;
}

.composer-text-input::placeholder {
    color: #94a3b8;
}

.composer-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.25);
}

.composer-send-btn:hover {
    background: #0052cc;
    transform: scale(1.04);
    box-shadow: 0 6px 18px rgba(0, 102, 255, 0.3);
}

.composer-send-btn svg {
    width: 17px;
    height: 17px;
}

/* ─── SEO & Natural Content Section Below Workspace ─────────── */
.seo-natural-content {
    width: 100%;
    background: #ffffff;
    padding: 60px 40px 40px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.seo-natural-content .container {
    max-width: 1000px;
    margin: 0 auto;
}

.seo-content-card {
    background: #f8fafc;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    padding: 36px 40px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.seo-content-card h2 {
    font-family: 'Sora', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-main, #0f172a);
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}

.seo-content-card p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary, #475569);
    margin: 0;
}

/* ─── Structured FAQ Accordion Section ───────────────────────────── */
.faq-accordion-section,
.workspace-faq-container {
    width: 100%;
    background: #ffffff;
    padding: 40px 40px 80px;
}

.faq-accordion-section .container,
.workspace-faq-container .container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-section-header,
.workspace-faq-container .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.faq-section-header h2,
.workspace-faq-container .section-header h2 {
    font-family: 'Sora', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main, #0f172a);
    letter-spacing: -0.6px;
    margin-bottom: 8px;
}

.faq-section-header p,
.workspace-faq-container .section-header p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-secondary, #64748b);
}

.faq-accordion-container,
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item.active {
    border-color: var(--primary, #0066FF);
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.08);
}

.faq-question {
    width: 100%;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    cursor: pointer;
    text-align: left;
}

.faq-icon {
    font-size: 20px;
    font-weight: 400;
    color: #64748b;
    transition: transform 0.2s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--primary, #0066FF);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 24px 20px;
}

.faq-answer p {
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    color: var(--text-secondary, #475569);
    line-height: 1.65;
    margin: 0;
}

/* ─── Settings Modal Overlay ─────────────────────────────────────── */
.db-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 17, 32, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.db-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.db-modal-card {
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    padding: 28px 32px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(10px);
    transition: transform 0.25s ease;
}

.db-modal-overlay.open .db-modal-card {
    transform: translateY(0);
}

.db-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.db-modal-title {
    font-family: 'Sora', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-main, #0f172a);
}

.db-modal-close-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
}

.db-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.db-form-group {
    margin-bottom: 16px;
}

.db-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    margin-bottom: 6px;
}

.db-form-input,
.db-form-select {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main, #0f172a);
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.db-form-input:focus,
.db-form-select:focus {
    border-color: var(--primary, #0066FF);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.12);
}

.db-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.db-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary, #0066FF);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.2);
}

.db-btn-primary:hover {
    background: #0052cc;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 102, 255, 0.3);
}

.db-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.db-btn-secondary:hover {
    background: #e2e8f0;
}

/* ─── Responsive Breakpoints ──────────────────────────────────────── */
@media (max-width: 1024px) {
    .workspace-sidebar {
        width: 210px;
        padding: 16px 10px;
    }
    .sidebar-item span {
        font-size: 13px;
    }
    .main-content-area {
        padding-left: 32px;
    }
    .chat-scroll-area {
        padding: 24px 28px 16px 0;
    }
    .chat-composer-wrapper {
        padding: 10px 28px 16px 0;
    }
}

@media (max-width: 768px) {
    .workspace-wrapper {
        flex-direction: column;
        height: calc(100vh - 60px);
    }
    .workspace-sidebar {
        width: 100%;
        height: auto;
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 10px 14px;
    }
    .sidebar-section.top-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .sidebar-section.bottom-nav {
        display: none;
    }
    .sidebar-item {
        white-space: nowrap;
        padding: 8px 12px;
    }
    .sidebar-item.active::before {
        display: none;
    }
    .main-content-area {
        padding-left: 0;
    }
    .chat-scroll-area {
        padding: 20px 16px 12px;
    }
    .chat-composer-wrapper {
        padding: 8px 16px 14px;
    }
    .compact-hero h1 {
        font-size: 24px;
    }
    .compact-hero p {
        font-size: 14px;
    }
    .suggested-actions-grid {
        grid-template-columns: 1fr;
    }
    .workspace-faq-container {
        padding: 60px 20px 80px;
    }
}
