﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}
/* ===========================
   CHAT BUTTON (Góc dưới phải)
=========================== */
.chat-button {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 58px;
    height: 58px;
    background: #0d6efd;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    font-size: 26px;
    transition: all 0.25s ease;
    z-index: 9999;
}

    .chat-button:hover {
        transform: scale(1.1);
        background: #0b5ed7;
    }

/* ===========================
   CHAT WINDOW
=========================== */
.chat-window {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 22px;
    width: 360px;
    max-height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    overflow: hidden;
    z-index: 9999;
    animation: fadeInChat 0.25s ease;
}

/* Animation mở chat */
@keyframes fadeInChat {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   HEADER
=========================== */
.chat-header {
    background: #0d6efd;
    padding: 12px 16px;
    color: #fff;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.chat-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
}

/* ===========================
   MESSAGE LIST
=========================== */
.chat-messages {
    height: 320px;
    padding: 12px;
    overflow-y: auto;
    background: #f1f3f5;
}

    /* Custom scroll bar */
    .chat-messages::-webkit-scrollbar {
        width: 6px;
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background: #c8c9cb;
        border-radius: 10px;
    }

/* Bubble khách */
.chat-msg-customer {
    text-align: right;
    margin: 6px 0;
}

    .chat-msg-customer .bubble {
        display: inline-block;
        background: #0d6efd;
        color: white;
        padding: 8px 12px;
        border-radius: 12px;
        max-width: 75%;
    }

/* Bubble nhân viên */
.chat-msg-staff {
    text-align: left;
    margin: 6px 0;
}

    .chat-msg-staff .bubble {
        display: inline-block;
        background: #e9ecef;
        padding: 8px 12px;
        border-radius: 12px;
        max-width: 75%;
    }

/* ===========================
   INPUT
=========================== */
.chat-input-container {
    padding: 10px;
    display: flex;
    gap: 8px;
    background: #fff;
    border-top: 1px solid #dee2e6;
}

.chat-input {
    flex: 1;
    border-radius: 20px;
    border: 1px solid #ced4da;
    padding: 8px 14px;
    outline: none;
}

    .chat-input:focus {
        border-color: #0d6efd;
    }

.chat-send-btn {
    background: #0d6efd;
    border: none;
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .chat-send-btn:hover {
        background: #0b5ed7;
    }
#chatWidget {
    z-index: 9999;
}

/* Button mở chat */
#chatButton {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50%;
    transition: 0.2s;
}

    #chatButton:hover {
        transform: scale(1.08);
    }

/* Cửa sổ chat */
#chatWindow {
    position: fixed;
    right: 20px;
    bottom: 90px;
    border-radius: 12px;
    overflow: hidden;
    animation: fadeInChat 0.25s ease;
}

/* Animation */
@keyframes fadeInChat {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tin nhắn */
#chatMessages {
    scrollbar-width: thin;
    scrollbar-color: #bcbcbc #f8f9fa;
}

    #chatMessages::-webkit-scrollbar {
        width: 6px;
    }

    #chatMessages::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 10px;
    }
