/* ========================================================= MEGAWIDE IT ASSISTANT helpdesk.mccph.net ========================================================= */ /* Floating Ask IT 
Assistant button */
#mcc-it-assistant-launcher {
    position: fixed; right: 28px; bottom: 28px; z-index: 99998; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 999px; padding: 14px 20px; background: 
    #ef312f;
    color: #ffffff; font-family: Arial, sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 30px rgba(239, 49, 47, 0.30);
}
#mcc-it-assistant-launcher:hover {
    background: #d92329;
}
/* Main chat window */
#mcc-it-assistant-panel {
    position: fixed; right: 28px; bottom: 92px; width: 400px; height: 600px; z-index: 99999; display: none; flex-direction: column; background: #ffffff; border-radius: 18px; 
    overflow: hidden; font-family: Arial, sans-serif; box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
}
#mcc-it-assistant-panel.mcc-open {
    display: flex;
}
/* Header */ .mcc-chat-header { padding: 16px 18px; background: #ffffff; border-top: 5px solid #ef312f; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; 
    justify-content: space-between;
}
.mcc-chat-brand { display: flex; align-items: center; gap: 12px;
}
.mcc-chat-logo { width: 48px; height: 48px; object-fit: contain;
}
.mcc-chat-title { color: #182230; font-size: 17px; font-weight: 700;
}
.mcc-chat-subtitle { margin-top: 2px; color: #667085; font-size: 12px;
}
.mcc-chat-close { padding: 4px 8px; background: transparent; border: 0; color: #667085; font-size: 26px; cursor: pointer;
}
/* Message area */
#mcc-chat-messages {
    flex: 1; padding: 18px; overflow-y: auto; background: linear-gradient( 180deg,
            #ffffff 0%, fff8f8 100%
        );
}
/* Message bubbles */ .mcc-message { max-width: 85%; margin-bottom: 12px; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-line;
}
.mcc-message-bot { color: #26364a; background: #ffffff; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.mcc-message-user { margin-left: auto; color: #ffffff; background: #ef312f; border-bottom-right-radius: 4px;
}
/* Knowledge Base title */ .mcc-kb-heading { display: block; margin-bottom: 6px; color: #ef312f; font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.mcc-article-title { display: block; margin-bottom: 8px; color: #182230; font-size: 14px; font-weight: 700;
}
/* Quick selection buttons */ .mcc-quick-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 16px;
}
.mcc-quick-button { padding: 8px 11px; background: #ffffff; color: #ef312f; border: 1px solid #ef312f; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.mcc-quick-button:hover { background: #fff1f1;
}
/* Article / ticket actions */ .mcc-result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px;
}
.mcc-action-primary, .mcc-action-secondary { display: inline-block; padding: 9px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.mcc-action-primary { color: #ffffff; background: #ef312f; border: 1px solid #ef312f;
}
.mcc-action-primary:hover { background: #d92329;
}
.mcc-action-secondary { color: #344054; background: #ffffff; border: 1px solid #d0d5dd;
}
.mcc-action-secondary:hover { background: #f9fafb;
}
/* Input area */ .mcc-chat-input-area { display: flex; gap: 8px; padding: 12px; background: #ffffff; border-top: 1px solid #e5e7eb;
}
#mcc-chat-input {
    flex: 1; min-width: 0; padding: 11px 12px; color: #1f2937; background: #ffffff; border: 1px solid #d0d5dd; border-radius: 10px; outline: none; font-size: 13px;
}
#mcc-chat-input:focus {
    border-color: #ef312f; box-shadow: 0 0 0 3px rgba(239, 49, 47, 0.10);
}
#mcc-chat-send {
    padding: 0 16px; background: #ef312f; color: #ffffff; border: 0; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer;
}
#mcc-chat-send:hover {
    background: #d92329;
}
/* Mobile layout */ @media (max-width: 600px) {
    #mcc-it-assistant-panel {
        width: calc(100% - 24px); height: calc(100% - 105px); right: 12px; bottom: 82px; border-radius: 14px;
    }
    #mcc-it-assistant-launcher {
        right: 16px; bottom: 18px; padding: 13px 17px;
    }
    .mcc-chat-logo { width: 42px; height: 42px;
    }
}

/* =========================================================
   CHAT HEADER + VISIBLE CLOSE BUTTON FIX
   ========================================================= */

#mcc-it-assistant-panel {
    overflow: hidden;
    max-height: calc(100vh - 120px);
}

.mcc-chat-header {
    position: sticky;
    top: 0;
    z-index: 50;
    flex: 0 0 auto;
    min-height: 72px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

#mcc-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

#mcc-chat-close {
    display: flex !important;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    min-width: 36px;

    margin-left: auto;
    padding: 0;

    border: 1px solid #d0d5dd;
    border-radius: 50%;

    background: #ffffff;
    color: #ef312f;

    font-size: 26px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;
    z-index: 60;
}

#mcc-chat-close:hover {
    background: #fff1f1;
    border-color: #ef312f;
}

/* =========================================================
   ENLARGE MEGAWIDE LOGO IN CHAT HEADER
   ========================================================= */

.mcc-chat-logo {
    width: 90px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.mcc-chat-brand {
    gap: 14px;
}

/* Larger Megawide logo in chatbot header */
.mcc-chat-logo {
    width: 110px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Larger Megawide logo in chatbot header */
.mcc-chat-logo {
    width: 130px;
    height: 70px;
    object-fit: contain;
    flex-shrink: 0;
}

.mcc-chat-brand {
    gap: 10px;
}

/* Final chatbot header logo size */
.mcc-chat-logo {
    width: 150px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.mcc-chat-brand {
    gap: 8px;
}

/* =========================================================
   ASK IT ASSISTANT - LARGER FLOATING LAUNCHER
   ========================================================= */

#mcc-it-assistant-launcher {
    position: fixed;

    right: 28px;
    bottom: 28px;

    min-width: 200px;
    height: 58px;

    padding: 0 24px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    border: none;
    border-radius: 30px;

    background: #ef312f;
    color: #ffffff;

    font-size: 16px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;

    box-shadow:
        0 10px 25px rgba(239, 49, 47, 0.28),
        0 3px 8px rgba(0, 0, 0, 0.12);

    z-index: 9999;
}

#mcc-it-assistant-launcher::before {
    content: "í ¼í";
    font-size: 22px;
    line-height: 1;
}

#mcc-it-assistant-launcher:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 30px rgba(239, 49, 47, 0.32),
        0 4px 10px rgba(0, 0, 0, 0.14);
}

#mcc-it-assistant-launcher:focus-visible {
    outline: 3px solid rgba(239, 49, 47, 0.30);
    outline-offset: 3px;
}

/* Mobile */
@media (max-width: 600px) {
    #mcc-it-assistant-launcher {
        right: 16px;
        bottom: 18px;

        min-width: 180px;
        height: 54px;

        padding: 0 20px;
        font-size: 15px;
    }

    #mcc-it-assistant-launcher::before {
        font-size: 20px;
    }
}

/* Fix broken launcher emoji - use reliable IT badge */
#mcc-it-assistant-launcher::before {
    content: "IT" !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;
    min-width: 30px;

    border-radius: 50%;
    background: #ffffff;
    color: #ef312f;

    font-size: 12px;
    font-weight: 800;
    line-height: 1;

    margin-right: 2px;
}

/* Give Ask IT Assistant more breathing room */
#mcc-it-assistant-launcher {
    right: 32px !important;
    bottom: 30px !important;
}

/* =========================================================
   MEGAWIDE IT GUY - CHATBOT VISUAL + IDLE ANIMATION
   ========================================================= */

#mcc-it-assistant-panel {
    position: fixed;
    overflow: hidden;
}

/* Character container */
.mcc-it-guy {
    position: absolute;

    right: 10px;
    bottom: 72px;

    width: 170px;
    min-height: 160px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;

    pointer-events: none;

    z-index: 20;

    animation: mcc-it-guy-idle 3s ease-in-out infinite;
}

/* Actual guy image */
.mcc-it-guy-image {
    display: block;

    width: 160px;
    height: auto;

    object-fit: contain;

    transform-origin: bottom center;

    filter: drop-shadow(
        0 8px 14px rgba(0, 0, 0, 0.14)
    );
}

/* Ready / Thinking / Answer status */
.mcc-it-guy-status {
    margin-bottom: 5px;

    padding: 6px 11px;

    background: #ffffff;
    color: #27364d;

    border: 1px solid #e1e5eb;
    border-radius: 16px;

    font-size: 11px;
    font-weight: 600;

    white-space: nowrap;

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.09);
}

/* Thinking bubble */
.mcc-it-guy-thinking {
    position: absolute;

    right: 120px;
    top: 38px;

    display: flex;
    align-items: center;
    gap: 4px;

    padding: 8px 10px;

    background: #ffffff;

    border: 1px solid #eeeeee;
    border-radius: 16px;

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.10);
}

.mcc-it-guy-thinking[hidden] {
    display: none !important;
}

/* Animated thinking dots */
.mcc-it-guy-thinking span {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #ef312f;

    animation: mcc-thinking-dot 1.2s infinite ease-in-out;
}

.mcc-it-guy-thinking span:nth-child(2) {
    animation-delay: 0.15s;
}

.mcc-it-guy-thinking span:nth-child(3) {
    animation-delay: 0.30s;
}

/* Normal idle movement */
@keyframes mcc-it-guy-idle {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Thinking dots */
@keyframes mcc-thinking-dot {
    0%, 80%, 100% {
        opacity: 0.30;
        transform: scale(0.75);
    }

    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Leave space so long KB answers do not hide behind the guy */
#mcc-chat-messages {
    padding-bottom: 170px;
}

/* Mobile sizing */
@media (max-width: 600px) {

    .mcc-it-guy {
        right: 6px;
        bottom: 70px;

        width: 130px;
        min-height: 125px;
    }

    .mcc-it-guy-image {
        width: 122px;
    }

    .mcc-it-guy-status {
        font-size: 10px;
        padding: 5px 8px;
    }

    .mcc-it-guy-thinking {
        right: 95px;
        top: 30px;
    }

    #mcc-chat-messages {
        padding-bottom: 140px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .mcc-it-guy,
    .mcc-it-guy-thinking span {
        animation: none !important;
    }
}


/* IT guy state animations */

.mcc-it-guy.is-thinking {
    animation: mccGuyThinking 1.4s ease-in-out infinite;
}

.mcc-it-guy.is-answering .mcc-it-guy-image {
    animation: mccGuyAnswering 0.65s ease-out;
}

@keyframes mccGuyThinking {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-6px) rotate(-1deg);
    }
}

@keyframes mccGuyAnswering {
    0% {
        transform: scale(0.94);
    }

    60% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}


/* Transfer workflow - keep mascot clear of action button */
#mcc-it-guy {
    right: 2px !important;
}

#mcc-it-guy-image {
    width: 140px !important;
}

@media (max-width: 600px) {
    #mcc-it-guy {
        right: 0 !important;
    }

    #mcc-it-guy-image {
        width: 108px !important;
    }
}

/* Attach Ready / Thinking / Answering bubble closer to IT guy */
#mcc-it-guy-status {
    margin-bottom: 0 !important;
    transform: translate(12px, 6px);
    position: relative;
    z-index: 25;
}

/* Mobile adjustment */
@media (max-width: 600px) {
    #mcc-it-guy-status {
        transform: translate(8px, 4px);
    }
}

/* Fine-tune IT guy status bubble - move about 5px upward */
#mcc-it-guy-status {
    transform: translate(12px, 1px) !important;
}

@media (max-width: 600px) {
    #mcc-it-guy-status {
        transform: translate(8px, -1px) !important;
    }
}

/* =========================================================
   MEGAWIDE IT SUPPORT ONLINE STATUS
   ========================================================= */

#mcc-agent-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

#mcc-agent-status .mcc-agent-status-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: #9ca3af;
}

/* Online */
#mcc-agent-status.is-online {
    color: #198754;
}

#mcc-agent-status.is-online .mcc-agent-status-dot {
    background: #22a559;
    box-shadow: 0 0 0 3px rgba(34, 165, 89, 0.14);
}

/* Offline */
#mcc-agent-status.is-offline {
    color: #6b7280;
}

#mcc-agent-status.is-offline .mcc-agent-status-dot {
    background: #9ca3af;
}

/* Status unavailable */
#mcc-agent-status.is-unavailable {
    color: #6b7280;
}

#mcc-agent-status.is-unavailable .mcc-agent-status-dot {
    background: #d1d5db;
}


/* === MCC CHATBOT UI IMPROVEMENT START === */

/* Chat window */
#mcc-it-assistant-panel {
    width: 380px !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 100px) !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 45px rgba(15,23,42,0.20) !important;
}

/* Message scrolling */
#mcc-chat-messages {
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* IT support character */
#mcc-it-guy-image {
    max-width: 105px !important;
    max-height: 125px !important;
    object-fit: contain !important;
}

/* Message input */
#mcc-chat-input {
    min-width: 0 !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
}

/* Send button */
#mcc-chat-send {
    flex-shrink: 0 !important;
    border-radius: 10px !important;
}

/* Mobile layout */
@media (max-width: 600px) {

    #mcc-it-assistant-panel {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 100px) !important;
        right: 10px !important;
    }

    #mcc-it-guy-image {
        max-width: 85px !important;
        max-height: 105px !important;
    }
}

/* === MCC CHATBOT UI IMPROVEMENT END === */


/* === MCC CHAT READABILITY START === */

/* Main conversation area */
#mcc-chat-messages {
    font-size: 14px !important;
    line-height: 1.6 !important;
    padding: 14px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overflow-wrap: anywhere !important;
    overscroll-behavior: contain !important;
}

/* Improve text inside message containers */
#mcc-chat-messages > * {
    line-height: 1.6 !important;
    max-width: 100%;
    box-sizing: border-box;
}

/* Spacing between separate message elements */
#mcc-chat-messages > * + * {
    margin-top: 14px !important;
}

/* Paragraph spacing */
#mcc-chat-messages p {
    line-height: 1.6 !important;
    margin-top: 0;
    margin-bottom: 10px;
}

#mcc-chat-messages p:last-child {
    margin-bottom: 0;
}

/* Numbered and bullet troubleshooting steps */
#mcc-chat-messages ul,
#mcc-chat-messages ol {
    padding-left: 20px;
    margin-top: 8px;
    margin-bottom: 12px;
    line-height: 1.6;
}

/* Space between troubleshooting steps */
#mcc-chat-messages li + li {
    margin-top: 7px;
}

/* Emphasize important instructions */
#mcc-chat-messages strong,
#mcc-chat-messages b {
    font-weight: 650;
}

/* Handle long diagnostic text */
#mcc-chat-messages pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Improve smaller screen readability */
@media (max-width: 600px) {
    #mcc-chat-messages {
        font-size: 13.5px !important;
        line-height: 1.55 !important;
        padding: 12px !important;
    }

    #mcc-chat-messages > * + * {
        margin-top: 12px !important;
    }
}

/* === MCC CHAT READABILITY END === */


/* === MCC CHARACTER OVERLAP FIX START === */

/* Preserve chatbot visibility controls */
#mcc-it-assistant-panel {
    flex-direction: column !important;
}

/* Scrollable conversation gets its own space */
#mcc-chat-messages {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 14px 14px 16px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overflow-wrap: anywhere !important;
    box-sizing: border-box !important;
}

/* Move IT character into normal document flow */
#mcc-it-guy {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;

    display: flex;
    align-items: flex-end !important;
    justify-content: flex-end !important;

    width: 100% !important;
    height: 100px !important;
    min-height: 100px !important;
    flex: 0 0 100px !important;

    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: transparent !important;
    z-index: 1 !important;
}

/* Keep the character inside its own area */
#mcc-it-guy-image {
    position: static !important;
    width: 95px !important;
    max-width: 95px !important;
    height: auto !important;
    max-height: 100px !important;
    margin: 0 8px 0 0 !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    order: 2 !important;
}

/* Ready / Thinking / Answering status bubble */
#mcc-it-guy-status {
    position: static !important;
    transform: none !important;
    margin: 0 6px 18px 0 !important;
    max-width: 125px !important;
    font-size: 10px !important;
    z-index: 2 !important;
    order: 1 !important;
}

/* Keep thinking dots attached to the character */
#mcc-it-guy-thinking {
    position: absolute !important;
    top: 12px !important;
    right: 105px !important;
    z-index: 3 !important;
}

/* Mobile improvements */
@media (max-width: 600px) {

    #mcc-it-guy {
        height: 80px !important;
        min-height: 80px !important;
        flex-basis: 80px !important;
        right: auto !important;
        bottom: auto !important;
    }

    #mcc-it-guy-image {
        width: 76px !important;
        max-width: 76px !important;
        max-height: 80px !important;
    }

    #mcc-it-guy-status {
        transform: none !important;
        margin-bottom: 12px !important;
    }

    #mcc-it-guy-thinking {
        right: 85px !important;
        top: 8px !important;
    }

    #mcc-chat-messages {
        padding: 12px 12px 14px !important;
    }
}

/* === MCC CHARACTER OVERLAP FIX END === */



/* === MCC READY BUBBLE FIX START === */

/* Attach status bubble within IT character area */
#mcc-it-guy {
    position: relative !important;
}

#mcc-it-guy-status {
    position: absolute !important;
    top: auto !important;
    bottom: 44px !important;
    right: 105px !important;
    left: auto !important;

    margin: 0 !important;
    transform: none !important;

    max-width: 125px !important;
    white-space: nowrap !important;

    z-index: 3 !important;
    pointer-events: none !important;
}

@media (max-width: 600px) {
    #mcc-it-guy-status {
        top: auto !important;
        bottom: 32px !important;
        right: 84px !important;
        transform: none !important;
    }
}

/* === MCC READY BUBBLE FIX END === */


/* MCC_KB_UX_FORMATTER_V1 */

#mcc-chat-messages .mcc-kb-message {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

#mcc-chat-messages .mcc-kb-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    margin-bottom: 10px !important;
}

#mcc-chat-messages .mcc-kb-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    color: #172033 !important;
    margin: 0 0 14px !important;
}

#mcc-chat-messages .mcc-kb-body {
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    white-space: normal !important;
    color: #334155 !important;
}

#mcc-chat-messages .mcc-kb-paragraph {
    margin: 0 0 11px !important;
    line-height: 1.6 !important;
}

#mcc-chat-messages .mcc-kb-heading {
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    color: #1e293b !important;
    margin: 14px 0 7px !important;
}

#mcc-chat-messages .mcc-kb-list {
    margin: 5px 0 14px !important;
    padding-left: 21px !important;
    list-style-position: outside !important;
}

#mcc-chat-messages ul.mcc-kb-list {
    list-style-type: disc !important;
}

#mcc-chat-messages ol.mcc-kb-list {
    list-style-type: decimal !important;
}

#mcc-chat-messages .mcc-kb-list-item {
    display: list-item !important;
    margin: 0 0 6px !important;
    line-height: 1.55 !important;
}

#mcc-chat-messages .mcc-kb-question {
    border-top: 1px solid #e2e8f0 !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

@media (max-width: 600px) {
    #mcc-chat-messages .mcc-kb-body {
        font-size: 13px !important;
    }
}

/* END MCC KB UX FORMATTER */
