/* ==========================================================================
   EnerThai Premium E-Commerce Website - Base Design System & Styles
   Inspired by Maurten, Neversecond, and Apple
   ========================================================================== */

/* 1. Design System & Variables */
:root {
    --bg-primary: #FAF9F6;
    --bg-card: #FFFFFF;
    --text-primary: #111111;
    --text-muted: #666666;
    --border-color: #E5E5E5;
    
    /* Product Colors */
    --color-sunrise: #E9C46A;
    --color-sunrise-hover: #DFB44F;
    --color-strike: #E76F51;
    --color-strike-hover: #D75F41;
    --color-sunset: #8B5CF6;
    --color-sunset-hover: #7C3AED;
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.15s ease;
    
    --header-height: 80px;
    --max-width: 1200px;
}

/* 2. Global Resets */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
}

/* 3. Utility Classes */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }
.section-padding { padding: 100px 0; }
@media (max-width: 768px) {
    .section-padding { padding: 60px 0; }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.08em;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--text-primary);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: #333333;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--text-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

/* 4. Global Header & Navigation */
.site-header {
    height: var(--header-height);
    background-color: rgba(250, 249, 246, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.site-header.scrolled {
    background-color: rgba(250, 249, 246, 0.95);
    height: calc(var(--header-height) - 16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 54px;
    width: auto;
    object-fit: contain;
}

.logo-dark-theme {
    display: none;
}

body.dark-theme .logo-light-theme {
    display: none;
}

body.dark-theme .logo-dark-theme {
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    position: relative;
    padding: 8px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-toggle {
    position: relative;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background: none;
    border: none;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--text-primary);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.menu-burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: none;
    border: none;
}

.menu-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-smooth);
}

/* Mobile Nav Styles */
@media (max-width: 992px) {
    .main-nav {
        display: none; /* Handled via mobile menu overlay */
    }
    .menu-burger {
        display: flex;
    }
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-primary);
    z-index: 99;
    padding: 120px 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transform: translateY(-100%);
    transition: var(--transition-smooth);
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu-link {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-muted);
}

.mobile-menu-link.active, .mobile-menu-link:hover {
    color: var(--text-primary);
    padding-left: 10px;
}

/* 5. Shopping Cart Drawer */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 440px;
    height: 100vh;
    background-color: var(--bg-card);
    z-index: 201;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: var(--transition-smooth);
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.cart-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
}

.cart-empty-state svg {
    margin-bottom: 16px;
    opacity: 0.3;
}

.cart-item {
    display: flex;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background: linear-gradient(135deg, #eee, #f7f7f7);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.cart-item-name {
    font-weight: 700;
    font-size: 15px;
    font-family: var(--font-heading);
}

.cart-item-purpose {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cart-item-remove {
    background: none;
    border: none;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
}

.cart-item-remove:hover {
    color: #D32F2F;
}

.cart-item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    background-color: var(--bg-card);
}

.qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    font-weight: 600;
    transition: var(--transition-fast);
}

.qty-btn:hover {
    background-color: var(--bg-primary);
}

.qty-val {
    width: 30px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.cart-item-price {
    font-weight: 700;
    font-size: 15px;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background-color: #FFFFFF;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    font-weight: 700;
    font-size: 18px;
    font-family: var(--font-heading);
}

.cart-checkout-btn {
    width: 100%;
}

/* 6. Global Footer */
.site-footer {
    background-color: #111111;
    color: #FFFFFF;
    padding: 80px 0 40px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 48px;
    margin-bottom: 60px;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.footer-logo img {
    height: 112px !important;
    width: auto;
    object-fit: contain;
}

.footer-brand p {
    color: #999999;
    margin-bottom: 24px;
    max-width: 280px;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #222222;
    color: #FFFFFF;
    transition: var(--transition-smooth);
}

.footer-social-link:hover {
    background-color: #FFFFFF;
    color: #111111;
}

.footer-col h4 {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: #999999;
}

.footer-link:hover {
    color: #FFFFFF;
}

.footer-newsletter h4 {
    margin-bottom: 16px;
}

.footer-newsletter p {
    color: #999999;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    border-bottom: 1px solid #333333;
    padding-bottom: 8px;
}

.newsletter-input {
    flex: 1;
    color: #FFFFFF;
    font-size: 14px;
}

.newsletter-input::placeholder {
    color: #666666;
}

.newsletter-submit {
    color: #FFFFFF;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.newsletter-submit:hover {
    color: var(--color-sunrise);
}

.footer-bottom {
    border-top: 1px solid #222222;
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    color: #666666;
    font-size: 12px;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

@media (max-width: 768px) {
    .footer-bottom-links {
        justify-content: center;
    }
}

/* 7. Checkout Simulation Modal */
.checkout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.checkout-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.checkout-modal {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.checkout-modal-overlay.active .checkout-modal {
    transform: translateY(0);
}

.checkout-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 24px;
    color: var(--text-primary);
}

.checkout-modal-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #E6F7ED;
    color: #2E7D32;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.checkout-modal h3 {
    font-size: 22px;
    margin-bottom: 12px;
    text-align: center;
}

.checkout-modal p {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
}

.order-summary-box {
    background-color: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
}

.order-summary-item:last-child {
    margin-bottom: 0;
}

.order-summary-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 12px 0;
}

.order-summary-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 16px;
}

/* ==========================================================================
   Phase 3: Dark Theme & UX Additions
   ========================================================================== */

body.dark-theme {
    --bg-primary: #0C0C0C;
    --bg-card: #161616;
    --text-primary: #FAF9F6;
    --text-muted: #A0A0A0;
    --border-color: #2D2D2D;
}

body.dark-theme .site-header {
    background-color: rgba(12, 12, 12, 0.85);
}

body.dark-theme .site-header.scrolled {
    background-color: rgba(12, 12, 12, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

body.dark-theme .btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-card);
}

body.dark-theme .btn-primary:hover {
    background-color: var(--text-muted);
    color: var(--bg-card);
}

body.dark-theme .rec-product-pill {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

body.dark-theme .cart-badge {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

body.dark-theme .checkout-modal {
    background-color: var(--bg-card);
}

body.dark-theme .order-summary-box {
    background-color: var(--bg-primary);
}

body.dark-theme .cart-drawer {
    background-color: var(--bg-card);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

body.dark-theme .cart-footer {
    background-color: var(--bg-card);
}

body.dark-theme .cart-item-image {
    background: linear-gradient(135deg, #2D2D2D, #161616);
}

body.dark-theme .faq-item {
    background-color: var(--bg-card);
}

body.dark-theme .preset-btn {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

body.dark-theme .preset-btn.active, 
body.dark-theme .preset-btn:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

body.dark-theme .select-custom, 
body.dark-theme input {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

body.dark-theme .contact-form-card {
    background-color: var(--bg-card);
}

body.dark-theme .science-chart-wrapper {
    background-color: var(--bg-card);
}

body.dark-theme .gallery-main {
    background-color: var(--bg-card);
}

body.dark-theme .btn-secondary {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

body.dark-theme .btn-secondary:hover {
    background-color: var(--text-primary);
    color: var(--bg-card);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-message {
    background-color: var(--text-primary);
    color: var(--bg-card);
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-width: 300px;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-action {
    color: var(--color-sunrise);
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
}

/* Header Currency & Theme buttons style adjustments */
.currency-selector-nav {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    background-color: transparent;
    color: var(--text-primary);
    transition: var(--transition-fast);
}
.currency-selector-nav:hover {
    border-color: var(--text-primary);
}

.theme-toggle-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    cursor: pointer;
    background-color: transparent;
    color: var(--text-primary);
    transition: var(--transition-fast);
}
.theme-toggle-nav:hover {
    border-color: var(--text-primary);
}

/* Print Media Overrides for PDF plans */
@media print {
    body {
        background-color: #FFFFFF !important;
        color: #000000 !important;
    }
    .site-header, .site-footer, .calc-sidebar, #welcomeState, .recommended-products-box, .notes-box, #btnBuyBundle, .mobile-menu, #mobileMenu {
        display: none !important;
    }
    .container {
        padding: 0 !important;
        max-width: 100% !important;
    }
    .calc-layout {
        display: block !important;
    }
    .calc-results {
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
    .timeline {
        border-left-color: #000000 !important;
    }
    .timeline-dot {
        border-color: #FFFFFF !important;
        background-color: #000000 !important;
    }
    .timeline-content {
        background-color: #F0F0F0 !important;
        color: #000000 !important;
        border: 1px solid #CCCCCC !important;
    }
    .timeline-product-tag {
        border: 1px solid #000000 !important;
        color: #000000 !important;
        background-color: transparent !important;
    }
}

/* ==========================================================================
   Phase 6: AI Chatbot (EnerBot) Widget Styles
   ========================================================================== */

/* Adjust Toast Notifications to stack above the Chatbot Toggle */
.toast-container {
    bottom: 96px;
}

/* Chatbot Float Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9900, #FF3300); /* Premium sunset gradient */
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(255, 102, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 28px rgba(255, 102, 0, 0.4);
}

.chatbot-toggle svg {
    transition: transform 0.3s ease;
}

.chatbot-toggle.active svg {
    transform: rotate(90deg);
}

/* Chatbot Main Window Container */
.chatbot-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 520px;
    max-height: calc(100vh - 140px);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 999;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chatbot-window.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Header Section */
.chatbot-header {
    padding: 16px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9900, #FF3300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: #FFFFFF;
    font-family: 'Outfit', sans-serif;
}

.chatbot-status-info {
    text-align: left;
}

.chatbot-name {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.chatbot-status-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.chatbot-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #2ECC71; /* Green status indicator */
}

.chatbot-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.chatbot-close-btn:hover {
    color: var(--text-primary);
}

/* Chat Message Logs */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: transparent;
}

.chatbot-msg-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
    text-align: left;
}

/* User Message Bubble */
.chatbot-msg-bubble.user {
    align-self: flex-end;
    background-color: var(--text-primary);
    color: var(--bg-card);
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Assistant Message Bubble */
.chatbot-msg-bubble.assistant {
    align-self: flex-start;
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.chatbot-msg-bubble p {
    margin-bottom: 8px;
}
.chatbot-msg-bubble p:last-child {
    margin-bottom: 0;
}
.chatbot-msg-bubble ul, .chatbot-msg-bubble ol {
    margin-left: 16px;
    margin-bottom: 8px;
}
.chatbot-msg-bubble ul:last-child, .chatbot-msg-bubble ol:last-child {
    margin-bottom: 0;
}
.chatbot-msg-bubble li {
    margin-bottom: 4px;
}

.chatbot-msg-bubble a {
    color: #FF6600; /* EnerThai brand orange link */
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.chatbot-msg-bubble a:hover {
    color: #FF3300;
}

/* Quick Suggestion Chips */
.chatbot-suggestions {
    padding: 10px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background-color: transparent;
    border-top: 1px dashed var(--border-color);
}

.chatbot-chip {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-chip:hover {
    border-color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* Input Form Controls */
.chatbot-input-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.chatbot-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 13px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
}

.chatbot-input:focus {
    border-color: var(--text-primary);
}

.chatbot-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--text-primary);
    color: var(--bg-card);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Typing Indicator Animation */
.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    opacity: 0.4;
    animation: typingPulse 1.4s infinite both;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingPulse {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* Dark Theme Adjustments for Chatbot */
body.dark-theme .chatbot-window {
    background: rgba(22, 22, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-theme .chatbot-msg-bubble.user {
    background-color: var(--text-primary);
    color: var(--bg-card);
}

body.dark-theme .chatbot-msg-bubble.assistant {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

/* Print Overrides to Hide Chatbot */
@media print {
    .chatbot-toggle, .chatbot-window {
        display: none !important;
    }
}
