/* =========================
   LANGUAGE SWITCHER
========================= */

div.lang-switcher {
    display: flex !important;
    gap: 2px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 3px;
    margin: 0;
    align-items: center;
}

button.lang-btn {
    all: unset;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    color: rgba(255,255,255,0.5) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 5px 10px !important;
    border-radius: 999px !important;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
    line-height: 1;
    box-sizing: border-box;
    font-family: inherit;
}

button.lang-btn:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.1) !important;
}

button.lang-btn.active {
    background: #facc15 !important;
    color: #000 !important;
    box-shadow: 0 2px 8px rgba(250,204,21,0.3);
}

@media (max-width: 768px) {
    div.lang-switcher {
        position: absolute;
        right: 64px;
        top: 50%;
        transform: translateY(-50%);
    }

    button.lang-btn {
        padding: 4px 7px !important;
        font-size: 10px !important;
    }
}

/* =========================
   CHAT WIDGET
========================= */

div.chat-widget {
    position: fixed !important;
    left: 18px;
    bottom: 18px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

div.chat-widget button.chat-toggle {
    all: unset;
    width: 58px !important;
    height: 58px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #facc15, #f59e0b) !important;
    color: #000 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(250,204,21,0.4), 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    box-sizing: border-box;
    border: none !important;
    padding: 0 !important;
}

div.chat-widget button.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(250,204,21,0.5), 0 4px 12px rgba(0,0,0,0.3);
}

div.chat-widget.open button.chat-toggle {
    display: none !important;
}

div.chat-widget div.chat-window {
    display: none !important;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 340px;
    height: 460px;
    background: #0c1222 !important;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
}

div.chat-widget.open div.chat-window {
    display: flex !important;
    flex-direction: column !important;
}

div.chat-widget .chat-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(250,204,21,0.12), rgba(250,204,21,0.04)) !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

div.chat-widget .chat-header-title {
    font-weight: 700;
    font-size: 15px;
    color: #fff !important;
}

div.chat-widget button.chat-close {
    all: unset;
    color: rgba(255,255,255,0.5) !important;
    font-size: 26px !important;
    cursor: pointer !important;
    line-height: 1;
    padding: 0 2px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s ease;
    border: none !important;
    background: transparent !important;
}

div.chat-widget button.chat-close:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.1) !important;
}

div.chat-widget .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
}

div.chat-widget .chat-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.55;
}

div.chat-widget .chat-msg p {
    margin: 0 !important;
}

div.chat-widget .chat-msg.bot {
    background: rgba(255,255,255,0.07) !important;
    color: rgba(255,255,255,0.7) !important;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

div.chat-widget .chat-msg.user {
    background: rgba(250,204,21,0.15) !important;
    color: #fff !important;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

div.chat-widget .chat-msg.error {
    color: #ef4444 !important;
}

div.chat-widget form.chat-input-form {
    display: flex !important;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.25) !important;
    flex-shrink: 0;
    align-items: center;
}

div.chat-widget input.chat-input {
    all: unset;
    flex: 1 !important;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 999px !important;
    padding: 10px 16px !important;
    color: #fff !important;
    font-size: 14px !important;
    box-sizing: border-box;
    font-family: inherit;
    width: auto;
}

div.chat-widget input.chat-input::placeholder {
    color: rgba(255,255,255,0.35);
}

div.chat-widget input.chat-input:focus {
    border-color: #facc15 !important;
    box-shadow: 0 0 0 2px rgba(250,204,21,0.15);
    outline: none !important;
}

div.chat-widget button.chat-send {
    all: unset;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px;
    border-radius: 50% !important;
    background: #facc15 !important;
    color: #000 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-sizing: border-box;
    border: none !important;
    padding: 0 !important;
}

div.chat-widget button.chat-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(250,204,21,0.3);
}

@media (max-width: 768px) {
    div.chat-widget {
        left: 12px;
        bottom: 12px;
    }

    div.chat-widget div.chat-window {
        width: calc(100vw - 24px);
        max-width: 340px;
        height: 420px;
    }

    div.chat-widget button.chat-toggle {
        width: 50px !important;
        height: 50px !important;
    }
}
