﻿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;
}

.dropdown-menu {
    top: 62px;
}

.dropdown-item dropdown-toggle {
    color: #0077cc;
}

/* Căn chữ về phải trong phần slider */
.carousel-caption {
    position: absolute;
    bottom: 30%;
    right: 5%;
    text-align: right;
    width: 50%;
}

@media (max-width: 768px) {
    .carousel-caption {
        width: 80%;
        right: 10%;
        text-align: center;
    }
}

/* Hiển thị menu con bên phải */
.dropdown-submenu .submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    margin-top: -1px;
    margin-left: -1px;
}

.dropdown-submenu:hover .submenu {
    display: block;
}

.nav-link.dropdown-toggle {
    color: #0077cc;
}

.nav-link:hover {
    color: white;
}

/* Căn chữ về bên trái trong phần quảng cáo */
.col-lg-4 .text-start {
    padding: 10px;
    border-radius: 5px;
}

.product-image-wrapper {
    overflow: hidden;
    height: 180px;
    width: 100%;
    border-radius: 4px;
}

.product-thumbnail {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-image-wrapper:hover .product-thumbnail {
    transform: scale(1.1);
}

.main-img-warpper {
    overflow: hidden;
    height: auto;
    width: 100%;
    border-radius: 4px;
}

.sub-img-warpper {
    width: 100%;
    height: 150px;
    display: flex;
    gap: 10px;
    border-radius: 4px;
    margin-top: 20px;
    overflow-y: hidden;
    overflow-x: auto; /* Thêm thanh cuộn ngang nếu cần */
    scrollbar-width: thin; /* Cho phép thanh cuộn mỏng hơn (tùy chọn) */
    scrollbar-color: #e0e0e0; /* Màu thanh cuộn (tùy chọn) */
    padding-bottom: 30px;
}

.main-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.sub-img {
    margin: 10px 0 10px 0;
    height: 100%;
    width: 150px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.sub-img-warpper:hover {
    cursor: pointer;
}

.sub-img:hover {
    transform: scale(1.1);
}

.stars {
    --star-size: 24px;
    --star-color: gold;
    --star-background: #ccc;
    font-size: var(--star-size);
    font-family: Arial, sans-serif;
    position: relative;
    display: inline-block;
    line-height: 1;
}

.stars::before {
    content: "★★★★★";
    color: var(--star-background);
}

.stars::after {
    content: "★★★★★";
    color: var(--star-color);
    position: absolute;
    top: 0;
    left: 0;
    width: 0%; /* Sẽ được cập nhật bằng JS */
    overflow: hidden;
    white-space: nowrap;
}

.thumbnail-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
    cursor: pointer;
}

.main-img {
    width: 100%;
    border-radius: 10px;
}

.price-range {
    font-size: 1.25rem;
}

.price-active {
    font-weight: bold;
    color: #28a745;
    font-size: 1.5rem;
}

.weight-option button {
    border-radius: 20px;
    margin-right: 10px;
}

.btn-cart {
    background-color: #28a745;
    color: white;
    border-radius: 5px;
}

.btn-buy {
    background-color: #28a745;
    color: white;
    border-radius: 5px;
}

.dropdown-item {
    color: #0077cc;
}

.star-rating .star {
    font-size: 24px;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating .star.hover,
.star-rating .star.selected {
    color: #f39c12;
}

.custom-dropdown-menu {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
}

.custom-dropdown-menu.show {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
}

.status-btn {
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    color: white;
    font-weight: 500;
    margin: 4px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: default;
}

.status-btn:hover {
    cursor: pointer;
    color: white;
}

.status-btn i {
    font-size: 16px;
}

/* Màu riêng cho từng trạng thái */
.status-btn.pending {
    background-color: #FFA500; /* Cam */
}

.status-btn.preparing {
    background-color: #17a2b8; /* Cyan */
}

.status-btn.shipping {
    background-color: #007bff; /* Xanh dương */
}

.status-btn.delivered {
    background-color: #28a745; /* Xanh lá */
}

.status-btn.canceled {
    background-color: #dc3545; /* Đỏ */
}

.status-btn.returned {
    background-color: #6c757d; /* Xám */
}

.status-btn.exchanged {
    background-color: #20c997; /* Xanh ngọc nhạt */
}

select.form-select option:disabled {
    color: #999999; /* Màu xám nhạt */
    background-color: #f8f9fa; /* Màu nền nhạt (tuỳ chọn) */
}

#chatbot-toggler {
    position: fixed;
    bottom: 30px;
    right: 35px;
    border: none;
    height: 50px;
    width: 50px;
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #00abb1;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

body.show-chatbot #chatbot-toggler {
    transform: rotate(90deg);
}

#chatbot-toggler span {
    color: #fff;
    position: absolute;
}

#chatbot-toggler span:last-child,
body.show-chatbot #chatbot-toggler span:first-child {
    opacity: 0;
}

body.show-chatbot #chatbot-toggler span:last-child {
    opacity: 1;
}

.chatbot-popup {
    position: fixed;
    right: 35px;
    bottom: 90px;
    width: 420px;
    overflow: hidden;
    background: #ececec;
    border-radius: 15px;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.2);
    transform-origin: bottom right;
    box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1), 0 32px 64px -48px rgba(0, 0, 0, 0.5);
    transition: all 0.1s ease;
}

body.show-chatbot .chatbot-popup {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 15px 22px;
    background: #00abb1;
    justify-content: space-between;
}

.chat-header .header-info {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-info .chatbot-logo {
    width: 50px;
    height: 50px;
    padding: 6px;
    fill: #00abb1;
    flex-shrink: 0;
    background: #fff;
    border-radius: 50%;
}

.header-info .logo-text {
    color: #fff;
    font-weight: 600;
    font-size: 1.31rem;
    letter-spacing: 0.02rem;
}

.chat-header #close-chatbot {
    border: none;
    color: #fff;
    height: 40px;
    width: 40px;
    font-size: 1.9rem;
    margin-right: -10px;
    padding-top: 2px;
    cursor: pointer;
    border-radius: 50%;
    background: none;
    transition: 0.2s ease;
}

.chat-header #close-chatbot:hover {
    background: #005f63;
}

.chat-body {
    padding: 25px 22px;
    gap: 20px;
    display: flex;
    height: 460px;
    overflow-y: auto;
    margin-bottom: 82px;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #b9fdff transparent;
}

.chat-body,
.chat-form .message-input:hover {
    scrollbar-color: #b9fdff transparent;
}

.chat-body .message {
    display: flex;
    gap: 11px;
    align-items: center;
}

.chat-body .message .bot-avatar {
    width: 50px;
    height: 50px;
    padding: 6px;
    fill: #fff;
    flex-shrink: 0;
    margin-bottom: 2px;
    align-self: flex-end;
    border-radius: 50%;
    background: #fff;
}

.chat-body .message .message-text {
    padding: 12px 16px;
    max-width: 75%;
    font-size: 0.95rem;
}

.chat-body .bot-message.thinking .message-text {
    padding: 2px 16px;
}

.chat-body .bot-message .message-text {
    background: #fff;
    border-radius: 13px 13px 13px 3px;
}

.chat-body .user-message {
    flex-direction: column;
    align-items: flex-end;
}

.chat-body .user-message .message-text {
    color: #fff;
    background: #00abb1;
    border-radius: 13px 13px 3px 13px;
}

.chat-body .user-message .attachment {
    width: 50%;
    margin-top: -7px;
    border-radius: 13px 3px 13px 13px;
}

.chat-body .bot-message .thinking-indicator {
    display: flex;
    gap: 4px;
    padding-block: 15px;
}

.chat-body .bot-message .thinking-indicator .dot {
    height: 7px;
    width: 7px;
    opacity: 0.7;
    border-radius: 50%;
    background: #00abb1;
    animation: dotPulse 1.8s ease-in-out infinite;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(1) {
    animation-delay: 0.2s;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(2) {
    animation-delay: 0.3s;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {

    0%, 44% {
        transform: translateY(0);
    }

    28% {
        opacity: 0.4;
        transform: translateY(-4px);
    }

    44% {
        opacity: 0.2;
    }
}

.chat-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #ececec;
    padding: 15px 22px 20px;
}

.chat-footer .chat-form {
    display: flex;
    align-items: center;
    position: relative;
    background: #fff;
    border-radius: 32px;
    outline: 1px solid #CCCCE5;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.06);
    transition: 0s ease, border-radius 0s;
}

.chat-form:focus-within {
    outline: 2px solid #00abb1;
}

.chat-form .message-input {
    width: 100%;
    height: 47px;
    outline: none;
    resize: none;
    border: none;
    max-height: 180px;
    scrollbar-width: thin;
    border-radius: inherit;
    font-size: 0.95rem;
    padding: 14px 0 12px 18px;
    scrollbar-color: transparent transparent;
}

.chat-form .chat-controls {
    gap: 3px;
    height: 47px;
    display: flex;
    padding-right: 6px;
    align-items: center;
    align-self: flex-end;
}

.chat-form .chat-controls button {
    height: 35px;
    width: 35px;
    border: none;
    cursor: pointer;
    color: #00abb1;
    border-radius: 50%;
    font-size: 1.15rem;
    background: none;
    transition: 0.2s ease;
}

.chat-form .chat-controls button:hover,
body.show-emoji-picker .chat-controls #emoji-picker {
    color: #00abb1;
    background: #f1f1ff;
}

.chat-form .chat-controls #send-message {
    color: #fff;
    display: none;
    background: #00abb1;
}

.chat-form .chat-controls #send-message:hover {
    background: #00abb1;
}

.chat-form .message-input:valid ~ .chat-controls #send-message {
    display: block;
}

.chat-form .file-upload-wrapper {
    position: relative;
    height: 35px;
    width: 35px;
}

.chat-form .file-upload-wrapper :where(button, img) {
    position: absolute;
}

.chat-form .file-upload-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-form .file-upload-wrapper #file-cancel {
    color: #ff0000;
    background: #fff;
}

.chat-form .file-upload-wrapper :where(img, #file-cancel),
.chat-form .file-upload-wrapper.file-uploaded #file-upload {
    display: none;
}

.chat-form .file-upload-wrapper.file-uploaded img,
.chat-form .file-upload-wrapper.file-uploaded:hover #file-cancel {
    display: block;
}

em-emoji-picker {
    position: absolute;
    left: 50%;
    top: -337px;
    width: 100%;
    max-width: 350px;
    visibility: hidden;
    max-height: 330px;
    transform: translateX(-50%);
}

body.show-emoji-picker em-emoji-picker {
    visibility: visible;
}

/* Responsive media query for mobile screens */
@media (max-width: 520px) {
    #chatbot-toggler {
        right: 20px;
        bottom: 20px;
    }

    .chatbot-popup {
        right: 0;
        bottom: 0;
        height: 100%;
        border-radius: 0;
        width: 100%;
    }

    .chatbot-popup .chat-header {
        padding: 12px 15px;
    }

    .chat-body {
        height: calc(90% - 55px);
        padding: 25px 15px;
    }

    .chat-footer {
        padding: 10px 15px 15px;
    }

    .chat-form .file-upload-wrapper.file-uploaded #file-cancel {
        opacity: 0;
    }
}

.chart {
    margin-bottom: 50px;
}

/* ----------------------------------------------------------------Footer---------------------------------------------------------------- */
.footer[b-y28icia9us] {
    position: relative !important;
}
