/* QJob Button-Only Recruitment Bot */

.bot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #007bff, #005bd8);
    border-radius: 50%;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 91, 216, 0.35);
    border: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0, 91, 216, 0.42);
}

.bot-window {
    position: fixed;
    bottom: 92px;
    right: 20px;
    width: min(390px, calc(100vw - 30px));
    height: min(640px, calc(100vh - 120px));
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
    display: none;
    flex-direction: column;
    z-index: 10000;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    direction: rtl;
    border: 1px solid rgba(0, 123, 255, 0.12);
}

.bot-header {
    background: linear-gradient(135deg, #0084ff, #0067dc);
    color: #fff;
    padding: 14px 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bot-header span {
    font-size: 15px;
}

.bot-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.bot-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.bot-messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f7fbff 0%, #f6f7f9 100%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg {
    padding: 10px 13px;
    border-radius: 16px;
    max-width: 88%;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-line;
    word-break: break-word;
}

.msg.bot {
    background: #eef3f8;
    color: #27313d;
    align-self: flex-start;
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(20, 40, 70, 0.05);
}

.msg.user {
    background: #007bff;
    color: #fff;
    align-self: flex-end;
    border-bottom-left-radius: 4px;
}

.bot-buttons {
    padding: 10px 10px 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-top: 1px solid #e8eef5;
    max-height: 150px;
    overflow-y: auto;
}

.btn-quick {
    background: #fff;
    border: 1px solid #c9ddf5;
    color: #0759b7;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    transition: 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 91, 216, 0.06);
}

.btn-quick:hover {
    background: #eaf4ff;
    border-color: #007bff;
    color: #0054c8;
    transform: translateY(-1px);
}

.btn-quick:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background: #0069dc;
    color: #fff;
}

.btn-secondary {
    background: #f4f8ff;
    color: #0063c9;
}


.bot-window .btn-selected {
    background: #e7f7ef;
    border-color: #12b76a;
    color: #067647;
    box-shadow: 0 3px 10px rgba(18, 183, 106, 0.12);
}

.bot-window .btn-selected:hover {
    background: #dff7eb;
    border-color: #039855;
    color: #05603a;
}

.btn-nav {
    background: #fff;
    color: #344054;
    border-color: #d0d5dd;
}

.btn-nav:hover {
    background: #f2f4f7;
    border-color: #b8c0cc;
    color: #1d2939;
}

.bot-loading {
    width: 100%;
    text-align: center;
    color: #667085;
    font-size: 13px;
    padding: 8px 0;
}

.bot-input-area {
    display: none !important;
}

.job-card {
    background: #fff;
    padding: 13px;
    border-radius: 14px;
    border: 1px solid #dfe8f3;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.07);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.job-card:hover {
    transform: translateY(-2px);
    border-color: #007bff;
    box-shadow: 0 12px 24px rgba(16, 24, 40, 0.11);
}

.job-title {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.35;
    color: #005fd1;
    font-weight: 800;
}

.job-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0 0 8px;
}

.job-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    background: #eef6ff;
    color: #0059c7;
    border: 1px solid #cfe5ff;
}

.job-line,
.job-reason,
.job-summary {
    font-size: 13px;
    line-height: 1.45;
    color: #344054;
    margin: 4px 0;
    white-space: pre-line;
}

.job-reason {
    color: #1f6b3d;
    font-weight: 700;
}

.job-summary {
    color: #475467;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px;
    margin-top: 8px;
}

.bot-window .job-open-link,
.bot-window .job-card a.job-open-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #007bff, #005bd8) !important;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 900;
    font-size: 13.5px;
    border: 1px solid #006ee6;
    box-shadow: 0 8px 16px rgba(0, 91, 216, 0.22);
}

.bot-window .job-open-link:hover,
.bot-window .job-card a.job-open-link:hover {
    background: #0069dc;
    color: #fff !important;
    text-decoration: none;
}

#siteToast.site-toast {
    position: fixed !important;
    right: 20px !important;
    top: auto !important;
    bottom: 95px !important;
    max-width: min(360px, calc(100vw - 40px));
    background: rgba(20, 20, 20, 0.92);
    color: #fff;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    z-index: 2147483647 !important;
    direction: rtl;
    pointer-events: none;
    display: none;
}

#siteToast.site-toast.show {
    display: block;
    animation: toastIn 250ms ease-out;
}

@keyframes toastIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 480px) {
    .bot-toggle {
        width: 58px;
        height: 58px;
        bottom: 16px;
        right: 16px;
    }

    .bot-window {
        right: 10px;
        bottom: 82px;
        width: calc(100vw - 20px);
        height: min(660px, calc(100vh - 96px));
        border-radius: 16px;
    }

    .bot-messages {
        padding: 12px;
    }

    .bot-buttons {
        justify-content: flex-start;
        padding: 10px;
        max-height: 150px;
    }

    .btn-quick {
        font-size: 13px;
        padding: 8px 11px;
    }

    .msg {
        max-width: 92%;
    }
}
