/* ============================================================
   YDEAL CHATBOT — STYLES
   Theme color is driven by --ycb-color (set from config).
   ============================================================ */
.ycb-root { --ycb-color: #d6001c; position: fixed; bottom: 24px; z-index: 9999; font-family: "Poppins", sans-serif; }
.ycb-root.ycb-right { right: 24px; }
.ycb-root.ycb-left { left: 24px; }

/* Launcher button */
.ycb-launcher {
    width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--ycb-color); color: #fff; font-size: 26px; line-height: 1;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    display: flex; align-items: center; justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease;
}
.ycb-launcher:hover { transform: scale(1.08); box-shadow: 0 12px 32px rgba(0,0,0,.3); }
.ycb-launcher.ycb-hidden { display: none; }

/* Panel */
.ycb-panel {
    position: absolute; bottom: 0; width: 360px; max-width: calc(100vw - 32px);
    height: 520px; max-height: calc(100vh - 120px);
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,.25);
    display: none; flex-direction: column;
}
.ycb-root.ycb-right .ycb-panel { right: 0; }
.ycb-root.ycb-left .ycb-panel { left: 0; }
.ycb-panel.ycb-open { display: flex; animation: ycb-pop .25s ease; }
@keyframes ycb-pop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

/* Header */
.ycb-header {
    background: var(--ycb-color); color: #fff; padding: 14px 16px;
    display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
}
.ycb-avatar {
    width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--ycb-color);
    font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.ycb-head-text { display: flex; flex-direction: column; line-height: 1.25; }
.ycb-head-text b { font-size: 15px; }
.ycb-status { font-size: 11.5px; opacity: .9; display: flex; align-items: center; gap: 5px; }
.ycb-status i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; display: inline-block; }
.ycb-close {
    margin-left: auto; background: none; border: none; color: #fff; font-size: 26px;
    cursor: pointer; line-height: 1; padding: 0 4px; opacity: .85;
}
.ycb-close:hover { opacity: 1; }

/* Body */
.ycb-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 14px; background: #f7f7f9; }
.ycb-msg { max-width: 85%; margin-bottom: 10px; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; word-wrap: break-word; }
.ycb-bot { background: #fff; color: #333; border-bottom-left-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.ycb-user { background: var(--ycb-color); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.ycb-msg a { color: var(--ycb-color); font-weight: 600; text-decoration: none; }
.ycb-msg a:hover { text-decoration: underline; }
.ycb-user a { color: #fff; text-decoration: underline; }
.ycb-note { font-size: 12px; color: #888; margin-top: 6px; }

/* Lists & pricing inside messages */
.ycb-list { margin: 8px 0 0; padding-left: 16px; }
.ycb-list li { margin-bottom: 5px; }
.ycb-pricelist { margin-top: 8px; }
.ycb-pricelist ul { list-style: none; margin: 6px 0; padding: 0; }
.ycb-pricelist li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed #eee; }
.ycb-pricelist li b { color: var(--ycb-color); white-space: nowrap; }
.ycb-pricelist p { margin: 8px 0 0; }

/* Quick replies */
.ycb-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.ycb-chip {
    background: #fff; border: 1.5px solid var(--ycb-color); color: var(--ycb-color);
    font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 30px; cursor: pointer;
    transition: all .15s ease;
}
.ycb-chip:hover { background: var(--ycb-color); color: #fff; }

/* Typing dots */
.ycb-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.ycb-typing i { width: 7px; height: 7px; border-radius: 50%; background: #bbb; animation: ycb-blink 1.2s infinite; }
.ycb-typing i:nth-child(2) { animation-delay: .2s; }
.ycb-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes ycb-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* Input row */
.ycb-inputrow { display: flex; border-top: 1px solid #eee; background: #fff; flex: 0 0 auto; }
.ycb-input {
    flex: 1; border: none; outline: none; padding: 14px 16px; font-size: 13.5px;
    font-family: inherit; color: #333; background: transparent;
}
.ycb-send {
    border: none; background: none; color: var(--ycb-color); font-size: 18px;
    padding: 0 18px; cursor: pointer; transition: transform .15s ease;
}
.ycb-send:hover { transform: scale(1.15); }

/* Branding */
.ycb-brand { text-align: center; font-size: 10.5px; color: #aaa; padding: 5px 0 7px; background: #fff; flex: 0 0 auto; }

/* Mobile */
@media (max-width: 480px) {
    .ycb-root { bottom: 16px; }
    .ycb-root.ycb-right { right: 16px; }
    .ycb-root.ycb-left { left: 16px; }
    .ycb-panel { height: 70vh; }
}
