/* ========== JEANO CHATBOT WIDGET ========== */
#jeano-chatbot-wrapper {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
#jeano-chatbot-wrapper * {
    box-sizing: border-box;
}
.jeano-position-bottom-right {
    bottom: 20px;
    right: 20px;
}
.jeano-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* ========== TOGGLE BUTTON ========== */
#jeano-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--jeano-primary, #1a1a2e);
    color: var(--jeano-text, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    margin-left: auto;
}
.jeano-position-bottom-left #jeano-chat-toggle {
    margin-left: 0;
    margin-right: auto;
}
#jeano-chat-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(0,0,0,0.35);
}
.jeano-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.jeano-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: jeano-pulse 2s infinite;
}

@keyframes jeano-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ========== CHAT WINDOW ========== */
#jeano-chat-window {
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: var(--jeano-chat-bg, #f5f5f5);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 12px;
    transition: opacity 0.3s, transform 0.3s;
}
#jeano-chat-window.jeano-hidden {
    display: none;
}
#jeano-chat-window.jeano-animate-in {
    animation: jeano-slide-up 0.3s ease-out;
}
@keyframes jeano-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== HEADER ========== */
#jeano-chat-header {
    background: var(--jeano-primary, #1a1a2e);
    color: var(--jeano-text, #fff);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.jeano-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.jeano-avatar {
    font-size: 28px;
    line-height: 1;
}
.jeano-header-info strong {
    display: block;
    font-size: 15px;
}
.jeano-status {
    font-size: 11px;
    opacity: 0.85;
    color: #4ade80;
}
#jeano-chat-minimize {
    background: none;
    border: none;
    color: var(--jeano-text, #fff);
    cursor: pointer;
    opacity: 0.7;
    padding: 4px;
}
#jeano-chat-minimize:hover {
    opacity: 1;
}

/* ========== MESSAGES AREA ========== */
#jeano-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}
#jeano-chat-messages::-webkit-scrollbar {
    width: 4px;
}
#jeano-chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* ========== MESSAGE BUBBLES ========== */
.jeano-msg {
    max-width: 85%;
    animation: jeano-fade-in 0.3s ease-out;
}
@keyframes jeano-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.jeano-msg-bot {
    align-self: flex-start;
}
.jeano-msg-user {
    align-self: flex-end;
}
.jeano-msg-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    word-wrap: break-word;
    white-space: pre-line;
}
.jeano-msg-bot .jeano-msg-bubble {
    background: #fff;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.jeano-msg-user .jeano-msg-bubble {
    background: var(--jeano-primary, #1a1a2e);
    color: var(--jeano-text, #fff);
    border-bottom-right-radius: 4px;
}
.jeano-msg-time {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
    padding: 0 4px;
}
.jeano-msg-bot .jeano-msg-time {
    text-align: left;
}
.jeano-msg-user .jeano-msg-time {
    text-align: right;
}

/* Bold text in messages */
.jeano-msg-bubble strong,
.jeano-msg-bubble b {
    font-weight: 700;
}

/* ========== QUICK BUTTONS ========== */
.jeano-quick-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.jeano-quick-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: 2px solid var(--jeano-secondary, #c9a94e);
    background: #fff;
    color: #333;
    border-radius: 24px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    transition: all 0.2s;
}
.jeano-quick-btn:hover {
    background: var(--jeano-secondary, #c9a94e);
    color: #fff;
    transform: translateX(4px);
}

/* ========== PRODUCT CARDS ========== */
.jeano-products-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}
.jeano-product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    gap: 10px;
    padding: 10px;
    transition: box-shadow 0.2s;
}
.jeano-product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.jeano-product-card img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f0f0f0;
}
.jeano-product-info {
    flex: 1;
    min-width: 0;
}
.jeano-product-info .jeano-product-name {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 2px;
}
.jeano-product-info .jeano-product-price {
    color: #e74c3c;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}
.jeano-product-link {
    display: inline-block;
    padding: 4px 12px;
    background: var(--jeano-secondary, #c9a94e);
    color: #fff !important;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.2s;
}
.jeano-product-link:hover {
    opacity: 0.85;
}

/* ========== OUTFIT RESULT ========== */
.jeano-outfit-result {
    margin-top: 8px;
}
.jeano-outfit-result img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    margin-bottom: 8px;
}
.jeano-buy-btn {
    display: block;
    text-align: center;
    padding: 10px 20px;
    background: var(--jeano-secondary, #c9a94e);
    color: #fff !important;
    border-radius: 24px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    transition: opacity 0.2s;
    margin-top: 4px;
}
.jeano-buy-btn:hover {
    opacity: 0.85;
}

/* ========== INPUT AREA ========== */
#jeano-chat-input-area {
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    flex-shrink: 0;
}
#jeano-upload-preview {
    position: relative;
    margin-bottom: 8px;
    display: inline-block;
}
#jeano-upload-preview.jeano-hidden {
    display: none;
}
#jeano-preview-img {
    max-width: 120px;
    max-height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--jeano-secondary, #c9a94e);
}
#jeano-remove-preview {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jeano-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
#jeano-attach-btn {
    cursor: pointer;
    color: #888;
    padding: 4px;
    display: flex;
    transition: color 0.2s;
    flex-shrink: 0;
}
#jeano-attach-btn:hover {
    color: var(--jeano-secondary, #c9a94e);
}
#jeano-chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 8px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
#jeano-chat-input:focus {
    border-color: var(--jeano-secondary, #c9a94e);
}
#jeano-send-btn {
    background: var(--jeano-primary, #1a1a2e);
    color: var(--jeano-text, #fff);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
#jeano-send-btn:hover {
    opacity: 0.85;
}

/* ========== TYPING INDICATOR ========== */
.jeano-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}
.jeano-typing span {
    width: 8px;
    height: 8px;
    background: #bbb;
    border-radius: 50%;
    animation: jeano-bounce 1.4s infinite ease-in-out;
}
.jeano-typing span:nth-child(1) { animation-delay: 0s; }
.jeano-typing span:nth-child(2) { animation-delay: 0.2s; }
.jeano-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes jeano-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ========== UTILITY ========== */
.jeano-hidden {
    display: none !important;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 480px) {
    #jeano-chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
        border-radius: 12px;
    }
    .jeano-position-bottom-right,
    .jeano-position-bottom-left {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    #jeano-chat-toggle {
        width: 54px;
        height: 54px;
    }
}

/* ========== TRIGGER POPUP ========== */
.jeano-trigger-popup {
    position: absolute;
    bottom: 75px;
    right: 0;
    background: #fff;
    color: #333;
    padding: 14px 36px 14px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    font-size: 14px;
    max-width: 280px;
    cursor: pointer;
    animation: jeano-slide-up 0.4s ease-out;
    border-left: 4px solid var(--jeano-secondary, #c9a94e);
    line-height: 1.5;
    z-index: 10;
}
.jeano-position-bottom-left .jeano-trigger-popup {
    right: auto;
    left: 0;
}
.jeano-trigger-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
}
.jeano-trigger-close:hover {
    color: #333;
}

/* ========== SEARCH RESULTS HOVER ========== */
.jeano-search-result-item:hover {
    border-color: var(--jeano-secondary, #c9a94e) !important;
    background: #fffdf5 !important;
}

/* ========== SEARCH RESULTS ========== */
.jeano-search-result-item:hover {
    border-color: var(--jeano-secondary, #c9a94e) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.jeano-search-input:focus {
    border-color: var(--jeano-secondary, #c9a94e) !important;
    box-shadow: 0 0 0 2px rgba(201, 169, 78, 0.2);
}
