/* ==========================================
   JAGAM TECHNOLOGIES CHATBOT
   ========================================== */

.chatbot-toggle {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 62px;
    height: 62px;
    border: none;
    border-radius: 50%;
    background: #ff8a24;
    color: #ffffff;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}


/* ==========================================
   CHAT WINDOW
   ========================================== */

.chatbot-container {
    position: fixed;
    right: 28px;
    bottom: 105px;
    width: 370px;
    height: 520px;

    display: none;
    flex-direction: column;

    background: #1c1c1f;
    border: 1px solid rgba(255, 138, 36, 0.35);
    border-radius: 18px;

    overflow: hidden;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);

    z-index: 9998;
}

.chatbot-container.active {
    display: flex;
}


/* ==========================================
   HEADER
   ========================================== */

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 16px 18px;

    background: #151518;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.chatbot-title {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

.chatbot-status {
    margin: 3px 0 0;
    color: #9b9b9b;
    font-size: 12px;
}

.chatbot-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
}


/* ==========================================
   MESSAGES
   ========================================== */

.chatbot-messages {
    flex: 1;
    padding: 18px;

    overflow-y: auto;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-message {
    max-width: 82%;
    padding: 11px 14px;

    border-radius: 14px;

    font-size: 14px;
    line-height: 1.5;

    word-wrap: break-word;
}

.chatbot-message.bot {
    align-self: flex-start;

    background: #29292d;
    color: #f1f1f1;

    border-bottom-left-radius: 4px;
}

.chatbot-message.user {
    align-self: flex-end;

    background: #ff8a24;
    color: #ffffff;

    border-bottom-right-radius: 4px;
}


/* ==========================================
   QUICK QUESTIONS
   ========================================== */

.chatbot-quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    padding: 0 18px 12px;
}

.chatbot-quick-btn {
    padding: 7px 11px;

    border: 1px solid rgba(255, 138, 36, 0.45);
    border-radius: 20px;

    background: transparent;
    color: #ff9b4a;

    font-size: 12px;
    cursor: pointer;

    transition: background 0.2s ease, color 0.2s ease;
}

.chatbot-quick-btn:hover {
    background: #ff8a24;
    color: #ffffff;
}


/* ==========================================
   INPUT AREA
   ========================================== */

.chatbot-input-area {
    display: flex;
    gap: 8px;

    padding: 13px;

    background: #151518;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chatbot-input {
    flex: 1;

    min-width: 0;

    padding: 11px 13px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;

    outline: none;

    background: #242428;
    color: #ffffff;

    font-size: 14px;
}

.chatbot-input {
    flex: 1;

    min-width: 0;

    padding: 11px 13px;

    border: 1px solid var(--border-color);
    border-radius: 10px;

    outline: none;

    background: var(--bg-surface);
    color: var(--text-white);

    font-size: 14px;
}

.chatbot-input::placeholder {
    color: var(--text-muted);
}

.chatbot-input:focus {
    border-color: var(--accent);
}

.chatbot-input::placeholder {
    color: #888888;
}

.chatbot-input:focus {
    border-color: #ff8a24;
}

.chatbot-send {
    width: 42px;
    border: none;
    border-radius: 10px;

    background: #ff8a24;
    color: #ffffff;

    font-size: 18px;
    cursor: pointer;
}

.chatbot-send:hover {
    background: #ff9b4a;
}


/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 600px) {

    .chatbot-container {
        right: 12px;
        bottom: 90px;
        width: calc(100% - 24px);
        height: 70vh;
    }

    .chatbot-toggle {
        right: 18px;
        bottom: 18px;
    }
}

/* ==========================================
   CHATBOT THEME SUPPORT
   ========================================== */

/* ☀️ LIGHT MODE */
.chatbot-container {
    background: #ffffff;
    color: #222222;
}

.chatbot-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.chatbot-title {
    color: #222222;
}

.chatbot-status {
    color: #777777;
}

.chatbot-close {
    color: #222222;
}

.chatbot-messages {
    background: #ffffff;
}

.chatbot-message.bot {
    background: #f1f1f1;
    color: #222222;
}

.chatbot-message.user {
    background: #ff8a24;
    color: #ffffff;
}

.chatbot-input-area {
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.chatbot-input {
    background: #ffffff;
    color: #222222;
    border-color: rgba(0, 0, 0, 0.15);
}

.chatbot-input::placeholder {
    color: #777777;
}


/* 🌙 DARK MODE */
[data-theme="dark"] .chatbot-container {
    background: #1c1c1f;
    color: #ffffff;
}

[data-theme="dark"] .chatbot-header {
    background: #151518;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .chatbot-title {
    color: #ffffff;
}

[data-theme="dark"] .chatbot-status {
    color: #9b9b9b;
}

[data-theme="dark"] .chatbot-close {
    color: #ffffff;
}

[data-theme="dark"] .chatbot-messages {
    background: #1c1c1f;
}

[data-theme="dark"] .chatbot-message.bot {
    background: #29292d;
    color: #f1f1f1;
}

[data-theme="dark"] .chatbot-message.user {
    background: #ff8a24;
    color: #ffffff;
}

[data-theme="dark"] .chatbot-input-area {
    background: #151518;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .chatbot-input {
    background: #242428;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .chatbot-input::placeholder {
    color: #888888;
}

/* ==========================================
   LEFT-SIDE JAGAM ASSISTANT
   ========================================== */

/* Attractive chatbot button */
#chatbotToggle {
    position: fixed !important;

    left: 30px !important;
    right: auto !important;
    bottom: 30px !important;

    width: 62px !important;
    height: 62px !important;

    border: 2px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 50% !important;

    background: linear-gradient(135deg,
            #F68920,
            #BC3327) !important;

    color: #ffffff !important;

    display: flex !important;
    align-items: center;
    justify-content: center;

    font-size: 25px !important;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.35),
        0 0 0 6px rgba(246, 137, 32, 0.08),
        0 0 25px rgba(246, 137, 32, 0.25);

    cursor: pointer;

    z-index: 10001 !important;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

/* Hover */
#chatbotToggle:hover {
    transform: translateY(-4px) scale(1.05);

    background: linear-gradient(135deg,
            #BC3327,
            #F68920) !important;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.40),
        0 0 0 8px rgba(246, 137, 32, 0.10),
        0 0 35px rgba(246, 137, 32, 0.35);
}

/* Icon animation */
#chatbotToggle i {
    transition: transform 0.3s ease;
}

/* When chatbot is open */
#chatbotToggle.chatbot-open {
    background: #BC3327 !important;
}

#chatbotToggle.chatbot-open i {
    transform: rotate(90deg);
}


/* ==========================================
   CHAT WINDOW ON LEFT
   ========================================== */

.chatbot-container {
    left: 30px !important;
    right: auto !important;

    bottom: 105px !important;

    z-index: 10000 !important;
}


/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 600px) {

    #chatbotToggle {
        left: 18px !important;
        right: auto !important;
        bottom: 18px !important;

        width: 54px !important;
        height: 54px !important;

        font-size: 22px !important;
    }

    .chatbot-container {
        left: 12px !important;
        right: auto !important;

        width: calc(100% - 24px) !important;

        bottom: 85px !important;
    }

}

/* ==========================================
   JAGAM QUICK HUB — MORE TRANSPARENT GLASS
   ========================================== */

.quick-hub-menu {
    background: rgba(255, 255, 255, 0.25) !important;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(255, 255, 255, 0.30) !important;

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.12);

    border-radius: 18px;
}


/* LIGHT MODE */

[data-theme="light"] .quick-hub-menu,
html:not([data-theme="dark"]) .quick-hub-menu {

    background: rgba(255, 255, 255, 0.25) !important;

    border-color: rgba(255, 255, 255, 0.35) !important;
}


/* DARK MODE */

[data-theme="dark"] .quick-hub-menu {

    background: rgba(20, 20, 20, 0.28) !important;

    border-color: rgba(255, 255, 255, 0.12) !important;

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.35);
}


/* Keep the buttons themselves subtle */

.quick-hub-item:hover {
    background: rgba(246, 137, 32, 0.10) !important;
}

/* ==========================================
   JAGAM QUICK HUB — PREMIUM ICON PANEL
   ========================================== */

.quick-hub-menu {
    width: 330px !important;
    padding: 20px 20px 18px !important;

    border-radius: 22px !important;

    background: rgba(255, 255, 255, 0.20) !important;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255, 255, 255, 0.28) !important;

    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);

    overflow: visible !important;
}


/* ==========================================
   ICON ROW
   ========================================== */

.quick-hub-menu {
    display: flex;
    flex-direction: column;
}

/* ==========================================
   PROFESSIONAL QUICK HUB ICONS
   ========================================== */

.quick-hub-item.quick-hub-icon {
    width: 50px !important;
    height: 50px !important;

    padding: 0 !important;
    margin: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    position: relative;

    border-radius: 14px !important;

    background: rgba(255, 255, 255, 0.14) !important;

    border: 1px solid rgba(255, 255, 255, 0.28) !important;

    box-shadow:
        0 5px 16px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


/* ==========================================
   ICON SIZE
   ========================================== */

.quick-hub-item.quick-hub-icon i {
    font-size: 21px !important;

    line-height: 1;

    transition:
        transform 0.25s ease,
        filter 0.25s ease;
}


/* ==========================================
   PROFESSIONAL HOVER
   ========================================== */

.quick-hub-item.quick-hub-icon:hover {
    transform: translateX(-3px) !important;

    background: rgba(255, 255, 255, 0.24) !important;

    border-color: rgba(255, 255, 255, 0.45) !important;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.18),
        0 0 14px rgba(246, 137, 32, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}


.quick-hub-item.quick-hub-icon:hover i {
    transform: scale(1.08);
}

/* ==========================================
   PUT THE FOUR ICONS IN ONE ROW
   ========================================== */

.quick-hub-menu .quick-hub-icon {
    flex-shrink: 0;
}

.quick-hub-menu .quick-hub-icon:nth-of-type(1),
.quick-hub-menu .quick-hub-icon:nth-of-type(2),
.quick-hub-menu .quick-hub-icon:nth-of-type(3),
.quick-hub-menu .quick-hub-icon:nth-of-type(4) {
    margin-bottom: 0 !important;
}


/* Create icon row */

.quick-hub-menu {
    gap: 0;
}

.quick-hub-menu .quick-hub-icon {
    display: inline-flex !important;
}


/* ==========================================
   ICON COLORS
   ========================================== */

/* Videos */
#hubVideos {
    color: #F68920 !important;
}

/* Gallery */
#hubGallery {
    color: #6d8cff !important;
}

/* Projects */
#hubProjects {
    color: #e87965 !important;
}

/* Assistant */
#hubChat {
    color: #8aa8ff !important;
}


/* ==========================================
   HOVER
   ========================================== */

.quick-hub-item.quick-hub-icon:hover {
    transform: translateY(-5px) scale(1.06);

    background: rgba(255, 255, 255, 0.20) !important;

    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.20),
        0 0 20px rgba(246, 137, 32, 0.15);

    border-color: rgba(255, 255, 255, 0.30) !important;
}

.quick-hub-item.quick-hub-icon:hover i {
    transform: scale(1.12);
}

/* Touch / keyboard */

.quick-hub-item.quick-hub-icon:focus-visible::after {
    opacity: 1;
    visibility: visible;

    transform: translateX(-50%) translateY(0);
}


/* ==========================================
   DARK MODE
   ========================================== */

[data-theme="dark"] .quick-hub-menu {
    background: rgba(20, 20, 20, 0.30) !important;

    border-color: rgba(255, 255, 255, 0.14) !important;

    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .quick-hub-item.quick-hub-icon {
    background: rgba(255, 255, 255, 0.07) !important;

    border-color: rgba(255, 255, 255, 0.10) !important;
}


/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 600px) {

    .quick-hub-menu {
        width: 285px !important;
        padding: 16px !important;
    }

    .quick-hub-item.quick-hub-icon {
        width: 50px !important;
        height: 50px !important;
    }

    .quick-hub-item.quick-hub-icon i {
        font-size: 20px !important;
    }
}

/* ==========================================
   JAGAM QUICK HUB — CLEAN FINAL OVERRIDE
   ========================================== */

/* Quick Hub itself */
.jagam-quick-hub {
    position: fixed !important;
    right: 30px !important;
    bottom: 30px !important;
    z-index: 999999 !important;
}

/* Menu */
.jagam-quick-hub .quick-hub-menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    height: auto !important;

    padding: 10px !important;
    gap: 10px !important;

    overflow: visible !important;
}

/* Hide title everywhere */
.jagam-quick-hub .quick-hub-title {
    display: none !important;
}

/* Icons vertically */
.jagam-quick-hub .quick-hub-icons {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;

    gap: 10px !important;
    margin: 0 !important;
}

/* Icon buttons */
.jagam-quick-hub .quick-hub-item {
    width: 48px !important;
    height: 48px !important;

    min-width: 48px !important;
    min-height: 48px !important;

    padding: 0 !important;
    margin: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    position: relative !important;
}

/* Remove text */
.jagam-quick-hub .quick-hub-item span {
    display: none !important;
}

/* Home — always open */
.home-page .jagam-quick-hub .quick-hub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Home — no plus button */
.home-page .jagam-quick-hub .quick-hub-toggle {
    display: none !important;
}

/* Other pages — plus button */
body:not(.home-page) .jagam-quick-hub .quick-hub-toggle {
    display: flex !important;
}

/* Open state */
.jagam-quick-hub.open .quick-hub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* ==========================================
   QUICK HUB TOOLTIP
   ========================================== */

.jagam-quick-hub .quick-hub-icon {
    position: relative !important;
}

.jagam-quick-hub .quick-hub-icon::after {
    content: attr(data-tooltip);

    position: absolute !important;

    /* Place tooltip to the left of icon */
    right: calc(100% + 14px) !important;
    left: auto !important;
    top: 50% !important;

    transform: translateY(-50%) !important;

    /* Let the black box fit the text */
    width: max-content !important;
    min-width: max-content !important;

    padding: 7px 12px !important;

    background: #202020 !important;
    color: #ffffff !important;

    border-radius: 7px !important;

    font-size: 12px !important;
    font-weight: 600 !important;

    line-height: 1.2 !important;
    white-space: nowrap !important;

    text-align: center !important;

    opacity: 0 !important;
    visibility: hidden !important;

    pointer-events: none !important;

    z-index: 9999999 !important;

    box-sizing: border-box !important;

    transition: opacity 0.2s ease !important;
}

.jagam-quick-hub .quick-hub-icon:hover::after {
    opacity: 1 !important;
    visibility: visible !important;

    transform: translateY(-50%) !important;
}

/* Show tooltip */
.jagam-quick-hub .quick-hub-icon:hover::after {
    opacity: 1 !important;
    visibility: visible !important;

    transform: translateY(-50%) !important;
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 575.98px) {

    .jagam-quick-hub {
        right: 18px !important;
        bottom: 18px !important;
    }

    .jagam-quick-hub .quick-hub-item {
        width: 44px !important;
        height: 44px !important;
    }

    .jagam-quick-hub .quick-hub-icons {
        gap: 8px !important;
    }

    .jagam-quick-hub .quick-hub-icon::after {
        display: none !important;
    }
}