/* Jimmy 27022026 10:30 - FAQ Chat Widget styles */

/* ===== Floating Bubble ===== */
.a2e-faq-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #1f58ff;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(31, 88, 255, 0.4);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.a2e-faq-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(31, 88, 255, 0.5);
}

.a2e-faq-bubble:active {
    transform: scale(0.95);
}

.a2e-faq-bubble svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.a2e-faq-bubble .a2e-faq-bubble-close {
    display: none;
}

.a2e-faq-bubble.is-open .a2e-faq-bubble-icon {
    display: none;
}

.a2e-faq-bubble.is-open .a2e-faq-bubble-close {
    display: block;
    font-size: 24px;
    line-height: 1;
}

/* ===== Widget Panel ===== */
.a2e-faq-panel {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 360px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 99998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.a2e-faq-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ===== Header ===== */
.a2e-faq-header {
    background: #1f58ff;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    flex-shrink: 0;
}

.a2e-faq-header-back {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    display: none;
    white-space: nowrap;
}

.a2e-faq-header-back:hover {
    background: rgba(255, 255, 255, 0.15);
}

.a2e-faq-panel.is-answer .a2e-faq-header-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.a2e-faq-header-title {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.a2e-faq-header-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
}

.a2e-faq-header-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== Body / Content ===== */
.a2e-faq-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Welcome message */
.a2e-faq-welcome {
    background: #f0f4ff;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

/* ===== FAQ List ===== */
.a2e-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.a2e-faq-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-size: 14px;
    color: #333;
}

.a2e-faq-item:hover {
    background: #e8edff;
    border-color: #c0cdff;
}

.a2e-faq-item-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.a2e-faq-item-text {
    flex: 1;
    font-weight: 500;
}

.a2e-faq-item-arrow {
    color: #adb5bd;
    font-size: 14px;
    flex-shrink: 0;
}

/* ===== Answer View ===== */
.a2e-faq-answer {
    display: none;
}

.a2e-faq-panel.is-answer .a2e-faq-list-view {
    display: none;
}

.a2e-faq-panel.is-answer .a2e-faq-answer {
    display: block;
}

.a2e-faq-answer-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f58ff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.a2e-faq-answer-content {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    white-space: pre-line;
}

/* ===== Order Status ===== */
.a2e-faq-orders {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.a2e-faq-order-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
}

.a2e-faq-order-card a {
    color: #1f58ff;
    text-decoration: none;
    font-weight: 500;
}

.a2e-faq-order-card a:hover {
    text-decoration: underline;
}

.a2e-faq-order-number {
    font-weight: 600;
    margin-bottom: 4px;
}

.a2e-faq-order-meta {
    color: #666;
    line-height: 1.5;
}

.a2e-faq-order-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.a2e-faq-order-status.status-pending,
.a2e-faq-order-status.status-on-hold {
    background: #fff3cd;
    color: #856404;
}

.a2e-faq-order-status.status-processing {
    background: #cce5ff;
    color: #004085;
}

.a2e-faq-order-status.status-completed {
    background: #d4edda;
    color: #155724;
}

.a2e-faq-orders-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
}

.a2e-faq-orders-link a {
    color: #1f58ff;
    text-decoration: none;
}

.a2e-faq-orders-link a:hover {
    text-decoration: underline;
}

.a2e-faq-loading {
    text-align: center;
    padding: 16px;
    color: #888;
    font-size: 14px;
}

.a2e-faq-login-notice {
    background: #fff3cd;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #856404;
    text-align: center;
}

/* ===== LINE Button ===== */
.a2e-faq-footer {
    padding: 12px 16px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.a2e-faq-line-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #06C755;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
}

.a2e-faq-line-btn:hover {
    background: #05b04b;
    color: #fff;
    text-decoration: none;
}

.a2e-faq-line-btn:active {
    background: #049a42;
}

.a2e-faq-line-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    flex-shrink: 0;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 480px) {
    .a2e-faq-panel {
        width: calc(100vw - 16px);
        right: 8px;
        bottom: 88px;
        max-height: calc(100vh - 120px);
        border-radius: 12px;
    }

    .a2e-faq-bubble {
        bottom: 16px;
        right: 16px;
        width: 54px;
        height: 54px;
    }

    .a2e-faq-bubble svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 360px) {
    .a2e-faq-panel {
        width: calc(100vw - 8px);
        right: 4px;
    }
}
