/**
 * Stylesheet for VN-Nexus ChatBot (EuroSmart Advisor)
 *
 * Fully responsive, mobile-first, draggable panel.
 */

#es-advisor {
    --es-blue: #0756b9;
    --es-deep: #063875;
    --es-red: #ed1c2e;
    --es-ink: #12264a;
    --es-muted: #637894;
    position: fixed;
    z-index: 999990;
    right: 24px;
    bottom: 22px;
    font: 14px/1.45 Inter, Arial, sans-serif;
    color: var(--es-ink);
}

/* Defensive override: Ensure any legacy top-bar inline advisor is hidden */
.top-bar #es-advisor,
#block-8 #es-advisor,
#es-advisor:not([data-vnspo-chatbot="1"]) {
    display: none !important;
}

#es-advisor * {
    box-sizing: border-box;
}

#es-advisor button,
#es-advisor input {
    font: inherit;
}

#es-advisor button {
    cursor: pointer;
}

#es-advisor-launch {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 3px solid #fff;
    border-radius: 999px;
    padding: 5px 15px 5px 5px;
    background: linear-gradient(135deg, #0877ed, #063f9e);
    color: #fff;
    box-shadow: 0 8px 26px #034aa88a;
    touch-action: none;
    user-select: none;
}

#es-advisor-launch img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    object-position: 50% 24%;
    border-radius: 50%;
    border: 2px solid #d7e8ff;
}

#es-advisor-launch strong {
    font-size: 13px;
}

#es-advisor-launch small {
    display: block;
    font-size: 10px;
    opacity: .9;
}

#es-advisor-launch .es-unread {
    position: absolute;
    right: -4px;
    top: -4px;
    background: var(--es-red);
    border: 2px solid white;
    border-radius: 20px;
    padding: 1px 6px;
    font-weight: 800;
}

#es-advisor-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 390px;
    height: min(620px, calc(100dvh - 110px));
    min-height: 440px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d7e5f7;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 60px #082b5b38;
}

#es-advisor-panel[hidden],
#es-advisor-launch[hidden] {
    display: none;
}

#es-advisor-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    background: linear-gradient(120deg, #073875, #0758ba);
    color: white;
    cursor: move;
    touch-action: none;
    user-select: none;
}

#es-advisor-head img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    object-position: 50% 24%;
    border: 2px solid #d8ebff;
    border-radius: 50%;
}

#es-advisor-head strong {
    font-size: 15px;
}

#es-advisor-head small {
    display: block;
    color: #d4e5ff;
    font-size: 11px;
}

.es-online {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 4px;
    border-radius: 50%;
    background: #39de75;
}

#es-advisor-controls {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

#es-advisor-controls button {
    width: 31px;
    height: 31px;
    border: 0;
    border-radius: 50%;
    background: #ffffff1c;
    color: #fff;
    font-size: 18px;
}

#es-advisor-log {
    flex: 1;
    overflow: auto;
    padding: 16px 14px;
    scroll-behavior: smooth;
}

#es-advisor-disclosure {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 9px;
    background: #f0f6ff;
    color: #526b8d;
    font-size: 10px;
}

#es-advisor-welcome {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 12px;
}

#es-advisor-welcome img {
    width: 37px;
    height: 37px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 24%;
}

#es-advisor-welcome p,
.es-bot-message {
    margin: 0;
    padding: 10px 12px;
    border-radius: 4px 14px 14px;
    background: #f0f5fb;
    color: #1b3152;
    font-size: 13px;
    white-space: pre-line;
}

#es-advisor-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0 14px 45px;
}

#es-advisor-choices button {
    min-height: 70px;
    padding: 8px 5px;
    border: 1px solid #dbe8f7;
    border-radius: 12px;
    background: #fff;
    color: var(--es-blue);
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 3px 12px #0e4d8b0d;
}

#es-advisor-choices button span {
    display: block;
    margin-bottom: 4px;
    font-size: 20px;
}

#es-advisor-messages {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.es-user-message {
    align-self: flex-end;
    max-width: 86%;
    padding: 9px 12px;
    border-radius: 14px 5px 14px 14px;
    background: #0963cc;
    color: white;
    overflow-wrap: anywhere;
}

.es-bot-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.es-bot-row img {
    width: 31px;
    height: 31px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 24%;
}

.es-bot-message {
    max-width: 88%;
}

.es-citations {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #d0deee;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.es-citations-title {
    font-size: 10px;
    font-weight: 700;
    color: #4b6485;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.es-citation-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #dce8f6;
    text-decoration: none !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.es-citation-item:hover {
    background: #eaf2fc;
    border-color: #9ac2f4;
}

.es-citation-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    background: #e2eaf5;
    color: #2b4c7e;
    white-space: nowrap;
}

.es-citation-item.is-verified .es-citation-badge {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.es-citation-text {
    font-size: 11px;
    font-weight: 500;
    color: #0d4290;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.es-product-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 9px 0 3px 39px;
}

.es-product {
    overflow: hidden;
    border: 1px solid #dce8f6;
    border-radius: 11px;
    background: #fff;
}

.es-product img {
    width: 100%;
    height: 82px;
    object-fit: cover;
    background: #edf4fb;
}

.es-product div {
    padding: 8px;
}

.es-product strong {
    display: block;
    font-size: 11px;
    color: #083f91;
}

.es-product small {
    display: block;
    min-height: 29px;
    color: #62748d;
    font-size: 10px;
}

.es-product b {
    display: block;
    margin: 4px 0;
    color: #083f91;
    font-size: 11px;
}

.es-product a {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    background: #0756b9;
    color: #fff;
    text-decoration: none;
    font-size: 10px;
}

.es-followups {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 5px 39px;
}

.es-followups button {
    border: 1px solid #b9d5f7;
    border-radius: 20px;
    padding: 6px 12px;
    background: #f7faff;
    color: #0756b9;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(7, 86, 185, 0.08);
}

.es-followups button:hover {
    background: #0756b9;
    color: #fff;
    border-color: #0756b9;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(7, 86, 185, 0.2);
}

.es-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 8px 0 5px 39px;
}

.es-contact a {
    padding: 8px 11px;
    border-radius: 20px;
    background: #0756b9;
    color: white !important;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
}

.es-contact a.es-zalo {
    background: #0088ff;
}

.es-contact a.es-messenger {
    background: #0866ff;
}

#es-advisor-compose {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 12px;
    border-top: 1px solid #e8eff8;
    background: #fff;
}

#es-compose-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.es-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #d0e0f5;
    background: #f7faff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.es-action-btn:hover {
    background: #eaf2fc;
    border-color: #0756b9;
    transform: scale(1.05);
}

.es-action-btn.recording {
    background: #ff4d4f !important;
    border-color: #ff4d4f !important;
    color: #fff !important;
    animation: es-record-pulse 1s infinite alternate;
}

@keyframes es-record-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.5); }
    100% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(255, 77, 79, 0); }
}

/* Image preview thumbnail */
#es-advisor-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: #f0f5fb;
    border-radius: 8px;
    border: 1px dashed #b9d5f7;
    margin-bottom: 2px;
}

#es-advisor-preview[hidden] {
    display: none !important;
}

#es-preview-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #cbdcf2;
}

#es-preview-remove {
    background: #e02424;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-left: auto;
}

/* Proactive Contextual Bubble */
#es-proactive-bubble {
    position: absolute;
    right: 0;
    bottom: 84px;
    width: 310px;
    background: #ffffff;
    border: 1px solid #d3e2f5;
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 10px 30px rgba(7, 56, 117, 0.18);
    z-index: 999998;
    animation: es-bounce-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

#es-proactive-bubble[hidden] {
    display: none !important;
}

@keyframes es-bounce-in {
    0% { opacity: 0; transform: translateY(20px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

#es-proactive-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    color: #8c9ba5;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    border-radius: 4px;
}

#es-proactive-close:hover {
    color: #333;
    background: #f0f0f0;
}

#es-proactive-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 14px;
}

#es-proactive-text {
    font-size: 13px;
    font-weight: 600;
    color: #1a3353;
    line-height: 1.4;
}

#es-proactive-hint {
    font-size: 11px;
    color: #0068ff;
    font-weight: 700;
}

#es-advisor-input {
    min-width: 0;
    flex: 1;
    border: 1px solid #ccdaed;
    border-radius: 22px;
    padding: 9px 13px;
    outline: none;
    font-size: 13px;
}

#es-advisor-input:focus {
    border-color: #438ce1;
    box-shadow: 0 0 0 3px #438ce122;
}

#es-advisor-send {
    width: 42px;
    border: 0;
    border-radius: 13px;
    background: #0756b9;
    color: white;
    font-size: 19px;
}

#es-advisor-footnote {
    padding: 0 10px 9px;
    text-align: center;
    color: #7587a0;
    font-size: 9px;
}

#es-advisor-toast {
    position: fixed;
    right: 25px;
    bottom: 95px;
    padding: 8px 12px;
    border-radius: 9px;
    background: #12264a;
    color: #fff;
    font-size: 11px;
}

#es-advisor-toast[hidden] {
    display: none;
}

/* ==========================================================================
   E-COMMERCE PRODUCT CARDS & DIRECT SALES STYLES
   ========================================================================== */
.es-product-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

.es-product-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #d4e3f8;
    border-radius: 12px;
    padding: 9px 10px;
    box-shadow: 0 3px 10px rgba(7, 86, 185, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.es-product-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(7, 86, 185, 0.12);
}

.es-product-thumb {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5fa;
    border: 1px solid #e2ecf8;
    flex-shrink: 0;
}

.es-product-info {
    flex: 1;
    min-width: 0;
}

.es-product-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--es-ink);
    line-height: 1.35;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.es-product-unit {
    font-size: 10px;
    color: #6a7f9a;
    margin-bottom: 3px;
}

.es-product-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--es-red);
}

.es-product-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.es-btn-order-now {
    background: linear-gradient(135deg, #0756b9, #0972f5);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(7, 86, 185, 0.25);
    transition: opacity 0.15s ease;
}

.es-btn-order-now:hover {
    opacity: 0.92;
}

.es-btn-cart-link {
    background: #f0f6ff;
    color: #0756b9 !important;
    border: 1px solid #c2dbfe;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
}

.es-btn-cart-link:hover {
    background: #e2eeff;
}

/* Inline Quick Order Form */
.es-order-form {
    background: #f7faff;
    border: 1.5px solid #bdd7fc;
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    width: 100%;
}

.es-order-form-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--es-deep);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.es-order-form input {
    width: 100%;
    padding: 7px 10px;
    margin-bottom: 7px;
    border: 1px solid #cbdcf7;
    border-radius: 8px;
    font-size: 12px;
    background: #ffffff;
    outline: none;
}

.es-order-form input:focus {
    border-color: #0756b9;
    box-shadow: 0 0 0 2px rgba(7, 86, 185, 0.15);
}

.es-order-form-submit {
    width: 100%;
    background: linear-gradient(135deg, #ed1c2e, #ff3b4e);
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(237, 28, 46, 0.3);
    transition: transform 0.1s ease;
}

.es-order-form-submit:active {
    transform: scale(0.98);
}

/* Zalo 1-Tap Handoff Pill */
.es-followups button.es-zalo-pill,
a.es-zalo-pill {
    background: linear-gradient(135deg, #0068ff, #0054d1) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(0, 104, 255, 0.35) !important;
    animation: es-pulse-glow 2s infinite;
}

@keyframes es-pulse-glow {
    0%, 100% { box-shadow: 0 3px 10px rgba(0, 104, 255, 0.35); }
    50% { box-shadow: 0 4px 16px rgba(0, 104, 255, 0.65); }
}

/* Text-to-Speech (TTS 🔊) Button */
.es-tts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e6f0fa;
    color: var(--es-blue);
    border: none;
    font-size: 12px;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    transition: background 0.15s, transform 0.15s;
    user-select: none;
}

.es-tts-btn:hover {
    background: #cce3ff;
    transform: scale(1.08);
}

.es-tts-btn.is-speaking {
    background: var(--es-red);
    color: #fff;
    animation: es-tts-pulse 1s infinite alternate;
}

@keyframes es-tts-pulse {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.15); opacity: 1; }
}

/* In-Chat Coupon Row */
.es-coupon-row {
    display: flex;
    gap: 6px;
    margin-bottom: 7px;
}

.es-coupon-input {
    flex: 1;
    margin-bottom: 0 !important;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.es-btn-apply-coupon {
    background: #0756b9;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.es-btn-apply-coupon:hover {
    background: #0972f5;
}

.es-coupon-msg {
    font-size: 11px;
    margin-bottom: 7px;
    padding: 5px 8px;
    border-radius: 6px;
    display: none;
    line-height: 1.35;
}

.es-coupon-msg.is-valid {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.es-coupon-msg.is-invalid {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Smart Cross-Selling Items */
.es-cross-sell-box {
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #d4e3f8;
    border-radius: 10px;
    padding: 10px 12px;
}

.es-cross-sell-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--es-deep);
    text-transform: uppercase;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.es-cross-sell-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #e2edf9;
    font-size: 11.5px;
}

.es-cross-sell-item:last-child {
    border-bottom: none;
}

.es-cross-sell-name {
    font-weight: 600;
    color: #1e293b;
}

.es-cross-sell-spec {
    display: block;
    font-size: 10px;
    color: #64748b;
}

.es-cross-sell-price {
    font-weight: 700;
    color: var(--es-red);
    white-space: nowrap;
    margin-left: 8px;
}

/* Digital Warranty Certificate Card */
.es-warranty-card {
    margin-top: 10px;
    background: #fff;
    border: 2px solid #0756b9;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(7, 86, 185, 0.08);
}
.es-warranty-badge {
    display: inline-block;
    background: #0756b9;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}
.es-warranty-code {
    font-size: 13px;
    color: #063875;
    margin-bottom: 8px;
    font-family: monospace;
}
.es-warranty-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #334155;
    background: #f8fafc;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.es-warranty-footer {
    font-size: 11px;
    color: #64748b;
    border-top: 1px dashed #e2e8f0;
    padding-top: 6px;
    text-align: center;
}

/* Multi-project Combo Wizard */
.es-combo-wizard {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px;
    margin-top: 8px;
}
.es-combo-title {
    font-size: 12.5px;
    font-weight: 800;
    color: #0756b9;
    margin-bottom: 6px;
}
.es-combo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    border: 1px solid #e2e8f0;
    font-size: 12px;
}
.es-combo-item label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.es-combo-area {
    width: 65px;
    padding: 4px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 12px;
    text-align: right;
}
.es-btn-calc-combo {
    width: 100%;
    background: #0756b9;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    box-shadow: 0 3px 8px rgba(7, 86, 185, 0.25);
    transition: opacity 0.15s;
}
.es-btn-calc-combo:hover {
    opacity: 0.9;
}

#es-advisor:focus-visible button:focus-visible {
    outline: 3px solid #ffb400;
    outline-offset: 2px;
}

@media(max-width: 600px) {
    #es-advisor {
        right: 14px;
        bottom: max(14px, env(safe-area-inset-bottom));
    }
    #es-advisor-launch img {
        width: 48px;
        height: 48px;
    }
    #es-advisor-panel {
        position: fixed;
        inset: auto 0 0;
        width: 100%;
        height: min(78dvh, 680px);
        min-height: 390px;
        border-radius: 20px 20px 0 0;
        border-bottom: 0;
    }
    #es-advisor-head {
        padding: 11px 13px;
    }
    #es-advisor-log {
        padding: 13px 11px;
    }
    #es-advisor-compose {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    .es-product img {
        height: 74px;
    }
    #es-advisor-toast {
        right: 12px;
        bottom: 84px;
    }
}

@media(prefers-reduced-motion: reduce) {
    #es-advisor-log {
        scroll-behavior: auto;
    }
}

/* --- v1.8.0 Construction Weather Card --- */
.es-weather-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.es-weather-card.is-safe {
    border-left: 4px solid #16a34a;
    background: #f0fdf4;
}
.es-weather-card.is-caution {
    border-left: 4px solid #eab308;
    background: #fefce8;
}
.es-weather-card.is-danger {
    border-left: 4px solid #dc2626;
    background: #fef2f2;
}
.es-weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
}
.es-weather-badge {
    font-weight: 700;
    color: #0f172a;
}
.es-weather-loc {
    color: #64748b;
    font-weight: 600;
}
.es-weather-metrics {
    display: flex;
    gap: 12px;
    background: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.06);
    font-size: 12px;
    margin-bottom: 8px;
}
.es-w-metric span { color: #64748b; margin-right: 4px; }
.es-w-metric strong { color: #0f172a; }
.es-weather-advice {
    font-size: 12px;
    line-height: 1.5;
    color: #334155;
}

/* --- v1.8.0 3D/SVG 4-Layer Simulator --- */
.es-layer-simulator {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.es-layer-title {
    font-size: 13px;
    font-weight: 800;
    color: #0756b9;
    margin-bottom: 10px;
    text-align: center;
}
.es-layer-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    perspective: 600px;
}
.es-sim-layer {
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}
.es-sim-layer:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.es-sim-layer.is-active {
    border-color: #0756b9;
    box-shadow: 0 0 0 2px rgba(7,86,185,0.25);
    font-weight: 600;
}
.es-sim-layer.layer-4 { background: #e2e8f0; color: #1e293b; }
.es-sim-layer.layer-3 { background: #bfdbfe; color: #1e40af; }
.es-sim-layer.layer-2 { background: #93c5fd; color: #1d4ed8; }
.es-sim-layer.layer-1 { background: #fde047; color: #854d0e; }
.es-l-num {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}
.es-l-name { font-size: 12px; flex: 1; }
.es-l-spec { font-size: 11px; opacity: 0.8; }
.es-layer-detail-box {
    margin-top: 10px;
    background: #f8fafc;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #1e293b;
}
