/* Shared recruitment chatbot UI. Loaded from the common footer on every public screen. */
.recruit-chat-window {
    position: fixed;
    right: 0.75rem;
    bottom: 5rem;
    z-index: 2147483000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1.35rem;
    background: #ffffff;
    border: 1px solid rgba(8, 184, 207, 0.24);
    box-shadow: 0 22px 60px rgba(7, 81, 95, 0.24);
}

.recruit-chat-window__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 62px;
    padding: 0.8rem 0.9rem 0.8rem 1rem;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(8,184,207,0.98), rgba(36,199,187,0.96) 56%, rgba(122,216,154,0.94));
}

.recruit-chat-window__mark {
    display: inline-flex;
    width: 2.3rem;
    height: 2.3rem;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24);
}

.recruit-chat-window__body {
    flex: 1 1 auto;
    min-height: 0;
    background: #f8fafc;
}

#recruit-faq-bot-widget.hidden,
#recruit-faq-bot-reopen.hidden {
    display: none;
}

#recruit-faq-bot-reopen {
    display: flex;
    position: fixed;
    right: 1rem;
    bottom: 5rem;
    width: 3.5rem;
    height: 3.5rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2dd4bf 55%, #6ee7b7);
    cursor: pointer;
    z-index: 2147483000;
    box-shadow: 0 14px 35px rgba(8, 184, 207, 0.34);
}

#recruit-faq-bot-close,
#chat-submit-btn {
    border: 0;
    cursor: pointer;
}

#chat-log {
    min-height: 0;
    overflow-y: auto;
}

#chat-quick-questions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    max-width: 100%;
}

.chat-quick-question {
    display: block;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    min-height: 3.5rem;
    overflow-wrap: anywhere;
    cursor: pointer;
    line-height: 1.45;
    text-align: left;
}

/* The qualification-list page intentionally does not load Tailwind. Keep the
   widget usable there with a small semantic fallback layer as well. */
#recruit-faq-bot-widget .recruit-chat-window__bar > div:first-child {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

#recruit-faq-bot-widget .recruit-chat-window__bar p {
    margin: 0;
}

#recruit-faq-bot-widget .recruit-chat-window__body {
    display: flex;
    flex-direction: column;
}

#recruit-faq-bot-widget #chat-log {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

#recruit-faq-bot-widget #chat-log > div:not(#chat-quick-questions) {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

#recruit-faq-bot-widget #chat-privacy-note {
    margin: 0;
    padding: 0.75rem 1rem 0;
    color: #64748b;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    font-size: 0.6875rem;
    line-height: 1.5;
}

#recruit-faq-bot-widget #chat-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #ffffff;
}

#recruit-faq-bot-widget #chat-input {
    min-width: 0;
    flex: 1 1 auto;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    font: inherit;
}

#recruit-faq-bot-widget #chat-submit-btn {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    color: #ffffff;
    background: #0ea5e9;
}

#recruit-faq-bot-widget #recruit-faq-bot-close {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255,255,255,0.15);
}

@media (max-width: 480px) {
    #recruit-faq-bot-widget.recruit-chat-window {
        right: 0.75rem !important;
        left: 0.75rem !important;
        width: calc(100vw - 1.5rem) !important;
        max-width: calc(100vw - 1.5rem) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #recruit-faq-bot-reopen {
        transition: none !important;
    }
}
