/* Component "Hỗ trợ khách hàng" — nút nổi + panel trượt phải */

/* ===== Nút nổi ===== */
.bk-support-trigger {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #43a047, #66bb6a);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    z-index: 1055;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bk-support-trigger:hover {
    filter: brightness(1.05);
}

/* ===== Overlay ===== */
.bk-support-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: none;
    z-index: 1059;
}

/* ===== Panel ===== */
/* Reset UA stylesheet của thẻ <dialog> (border/padding/margin/color, display:none khi
   không có [open]) — panel này tự quản lý hiển thị bằng class .bk-open, không dùng
   showModal()/[open]. */
.bk-support-panel {
    position: fixed;
    top: 0;
    right: -420px;
    left: auto;
    bottom: auto;
    margin: 0;
    border: none;
    padding: 0;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    color: inherit;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f6f8;
    z-index: 1060;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
}

#bk-support-root[data-embedded="1"] .bk-support-panel {
    top: 85px;
    height: calc(100vh - 85px);
    max-height: calc(100vh - 85px);
}

.bk-support-panel.bk-open {
    right: 0;
}

/* ===== Header ===== */
.bk-support-header {
    background: linear-gradient(135deg, #43a047, #7cb342);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.bk-support-title {
    font-size: 18px;
    font-weight: 700;
}

.bk-support-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 2px;
}

.bk-support-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 12px;
}

/* ===== Body ===== */
.bk-support-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.bk-support-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.bk-support-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Reset UA stylesheet của <button> — element này trước là div[role=button] */
.bk-support-collapse-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.bk-support-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bk-support-icon--store {
    background: #fdf0e6;
    color: #e65100;
}

.bk-support-icon--help {
    background: #e8f5e9;
    color: #43a047;
}

.bk-support-icon--faq {
    background: #e8f5e9;
    color: #43a047;
}

.bk-support-icon--zalo {
    background: #e3f2fd;
    color: #0068ff;
}

.bk-support-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #212121;
}

.bk-support-card-desc {
    font-size: 13px;
    color: #757575;
    margin-top: 2px;
}

.bk-support-card-desc-red {
    font-size: 13px;
    color: #e13232;
    margin-top: 2px;
}

.bk-support-chevron {
    margin-left: auto;
    color: #9e9e9e;
    transition: transform 0.2s ease;
}

/* Bootstrap collapse: toggle mất class .collapsed khi đang mở */
.bk-support-collapse-toggle:not(.collapsed) .bk-support-chevron {
    transform: rotate(180deg);
}

.bk-support-store-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px;
    border: 1px solid #f0b27a;
    border-radius: 8px;
    background: #fef9f4;
    color: #d35400;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.bk-support-store-btn:hover {
    background: #fdf0e6;
    color: #d35400;
    text-decoration: none;
}

/* Reset UA stylesheet của <button> — element này trước là div[role=button] */
.bk-support-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.bk-support-item:hover {
    background: #fafafa;
}

.bk-support-item-title {
    font-size: 14px;
    font-weight: 700;
    color: #212121;
}

.bk-support-item-desc {
    font-size: 12px;
    color: #757575;
}

.bk-support-arrow {
    margin-left: auto;
    color: #9e9e9e;
    font-size: 20px;
}

/* ===== View FAQ ===== */
.bk-support-back {
    background: none;
    border: none;
    color: #43a047;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 12px;
}

.bk-support-faq-heading {
    font-size: 16px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 12px;
}

.bk-support-faq-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.bk-support-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #212121;
    cursor: pointer;
}

.bk-support-faq-question .bk-support-chevron {
    font-size: 18px;
    line-height: 1;
}

.bk-support-faq-answer {
    display: none;
    padding: 0 14px 12px;
    font-size: 13px;
    color: #424242;
    line-height: 1.5;
}

.bk-support-faq-answer a {
    color: #43a047;
    text-decoration: underline;
}

.bk-support-faq-answer a:hover {
    color: #2e7d32;
}

.bk-support-faq-item.bk-open .bk-support-faq-answer {
    display: block;
}

.bk-support-faq-item.bk-open .bk-support-faq-question .bk-support-chevron {
    transform: rotate(90deg);
}

/* ===== View chọn kênh chat ===== */
.bk-support-chat-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #f66f7e;
    border-radius: 10px;
    background: #faebed;
    color: #e71f3d;
    font-size: 12px;
    line-height: 1.5;
}

.bk-support-chat-note svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ===== Mobile ===== */
@media (max-width: 576px) {
    .bk-support-panel {
        width: 100%;
        right: -100%;
    }
}
