/* =========================================================
   Pranavam Enterprises - Chatbot
   Every class is prefixed with  web-chatbot-design
   ========================================================= */

.web-chatbot-design {
    /* change these two to move the launcher */
    --web-chatbot-design-side: 20px;
    --web-chatbot-design-bottom: 20px;

    --web-chatbot-design-primary: #0787ff;
    --web-chatbot-design-primary-dark: #0865bc;
    --web-chatbot-design-navy: #061429;
    --web-chatbot-design-bg: #f3f6fb;
    --web-chatbot-design-text: #1c2733;
    --web-chatbot-design-muted: #6b7785;

    position: fixed;
    left: var(--web-chatbot-design-side);
    bottom: var(--web-chatbot-design-bottom);
    z-index: 1060;
    font-family: "Nunito", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: var(--web-chatbot-design-text);
}

.web-chatbot-design *,
.web-chatbot-design *::before,
.web-chatbot-design *::after {
    box-sizing: border-box;
}

/* ---------- Launcher ---------- */
.web-chatbot-design-launcher {
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--web-chatbot-design-primary), var(--web-chatbot-design-primary-dark));
    box-shadow: 0 8px 22px rgba(7, 135, 255, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: web-chatbot-design-pulse 2.4s ease-in-out infinite;
}

.web-chatbot-design-launcher:hover {
    transform: scale(1.08);
}

.web-chatbot-design-launcher svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.web-chatbot-design-launcher-hidden {
    display: none;
}

@keyframes web-chatbot-design-pulse {
    0%, 100% { box-shadow: 0 8px 22px rgba(7, 135, 255, 0.45), 0 0 0 0 rgba(7, 135, 255, 0.35); }
    50%      { box-shadow: 0 8px 22px rgba(7, 135, 255, 0.45), 0 0 0 12px rgba(7, 135, 255, 0); }
}

/* ---------- Window ---------- */
.web-chatbot-design-window {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 370px;
    height: 560px;
    max-height: calc(100vh - 40px);
    display: none;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(6, 20, 41, 0.35);
    transform-origin: bottom left;
}

.web-chatbot-design-window.web-chatbot-design-is-open {
    display: flex;
    animation: web-chatbot-design-pop 0.28s ease;
}

@keyframes web-chatbot-design-pop {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Header ---------- */
.web-chatbot-design-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--web-chatbot-design-navy), var(--web-chatbot-design-primary-dark));
}

.web-chatbot-design-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
}

.web-chatbot-design-avatar svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.web-chatbot-design-title-wrap {
    flex: 1;
    min-width: 0;
}

.web-chatbot-design-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.web-chatbot-design-status {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.web-chatbot-design-status::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 50%;
    background: #3ddc84;
}

.web-chatbot-design-icon-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    transition: background 0.2s ease;
}

.web-chatbot-design-icon-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.web-chatbot-design-icon-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ---------- Messages ---------- */
.web-chatbot-design-messages {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 12px;
    background: var(--web-chatbot-design-bg);
    scroll-behavior: smooth;
}

.web-chatbot-design-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    animation: web-chatbot-design-fade 0.25s ease;
}

@keyframes web-chatbot-design-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

.web-chatbot-design-row-bot  { align-items: flex-start; }
.web-chatbot-design-row-user { align-items: flex-end; }

.web-chatbot-design-bubble {
    max-width: 88%;
    padding: 10px 13px;
    border-radius: 14px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.web-chatbot-design-row-bot .web-chatbot-design-bubble {
    background: #fff;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(6, 20, 41, 0.08);
}

.web-chatbot-design-row-user .web-chatbot-design-bubble {
    color: #fff;
    background: linear-gradient(135deg, var(--web-chatbot-design-primary), var(--web-chatbot-design-primary-dark));
    border-bottom-right-radius: 4px;
}

.web-chatbot-design-bubble-wide {
    width: 100%;
    max-width: 100%;
}

.web-chatbot-design-text {
    margin: 0;
}

.web-chatbot-design-time {
    margin-top: 3px;
    padding: 0 4px;
    font-size: 11px;
    color: var(--web-chatbot-design-muted);
}

/* typing dots */
.web-chatbot-design-typing {
    display: inline-flex;
    gap: 4px;
    padding: 4px 2px;
}

.web-chatbot-design-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9aa8b8;
    animation: web-chatbot-design-bounce 1.1s infinite ease-in-out;
}

.web-chatbot-design-dot:nth-child(2) { animation-delay: 0.15s; }
.web-chatbot-design-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes web-chatbot-design-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30%           { transform: translateY(-5px); opacity: 1; }
}

/* ---------- Quick action chips ---------- */
.web-chatbot-design-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.web-chatbot-design-chip {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border: 1.5px solid #091E3E;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #091E3E;
    background: #d9edff;
    box-shadow: 0 3px 8px rgba(9, 30, 62, 0.12);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* small arrow after the label */
.web-chatbot-design-chip::after {
    content: "→";
    font-size: 15px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.web-chatbot-design-chip:hover {
    color: #ffffff;
    background: #091E3E;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(9, 30, 62, 0.3);
}

.web-chatbot-design-chip:hover::after {
    transform: translateX(3px);
}

.web-chatbot-design-chip:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(9, 30, 62, 0.2);
}

.web-chatbot-design-chip:focus-visible {
    outline: 2px solid #0787ff;
    outline-offset: 2px;
}

/* ---------- Choice lists (categories / subcategories) ---------- */
.web-chatbot-design-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.web-chatbot-design-group-title {
    margin: 12px 0 0;
    padding-left: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #091E3E;
    border-left: 4px solid #091E3E;
}

.web-chatbot-design-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0;
    padding: 8px 8px 10px;
    cursor: pointer;
    border: 1.5px solid #091E3E;
    border-radius: 14px;
    background: #d9edff;
    box-shadow: 0 3px 10px rgba(9, 30, 62, 0.1);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.web-chatbot-design-choice:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(9, 30, 62, 0.22);
}

.web-chatbot-design-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.web-chatbot-design-choice-img {
    width: 100%;
    height: 78px;
    flex: none;
    object-fit: cover;
    border-radius: 9px;
    background: #ffffff;
}

.web-chatbot-design-choice-name {
    flex: 1;
    padding: 0 2px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    color: #091E3E;
    transition: color 0.2s ease;
}

/* tick badge (top-right of the tile) */
.web-chatbot-design-check {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 22px;
    height: 22px;
    border: 2px solid #091E3E;
    border-radius: 50%;
    background: #ffffff;
    transition: all 0.2s ease;
}

.web-chatbot-design-choice input:checked ~ .web-chatbot-design-check {
    border-color: #ffffff;
    background: #ffffff;
}

.web-chatbot-design-choice input:checked ~ .web-chatbot-design-check::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #091E3E;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* selected tile = dark blue */
.web-chatbot-design-choice input:checked ~ .web-chatbot-design-choice-name {
    color: #ffffff;
}

.web-chatbot-design-choice:has(input:checked) {
    background: #091E3E;
    border-color: #091E3E;
}

.web-chatbot-design-step-done .web-chatbot-design-choice {
    cursor: default;
    opacity: 0.75;
}

.web-chatbot-design-step-done .web-chatbot-design-choice:hover {
    transform: none;
    box-shadow: 0 3px 10px rgba(9, 30, 62, 0.1);
}

.web-chatbot-design-next {
    width: 100%;
    margin-top: 14px;
    padding: 11px 14px;
    border: 0;
    border-radius: 0px;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
    background: #091E3E;
    box-shadow: 0 6px 14px rgba(9, 30, 62, 0.3);
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.web-chatbot-design-next:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(9, 30, 62, 0.35);
}

.web-chatbot-design-next:disabled {
    cursor: default;
    opacity: 0.5;
    box-shadow: none;
}

@media (max-width: 340px) {
    .web-chatbot-design-choices {
        grid-template-columns: 1fr;
    }
}

.web-chatbot-design-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--web-chatbot-design-muted);
}

.web-chatbot-design-warn {
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #d93025;
}

/* ---------- Product cards (2-column grid) ---------- */
.web-chatbot-design-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.web-chatbot-design-pcard {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    background: #d9edff;
    border: 1px solid #d9edff;
    box-shadow: 0 4px 12px rgba(6, 20, 41, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #091E3E;
}

.web-chatbot-design-pcard:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(6, 20, 41, 0.16);
}

.web-chatbot-design-pcard-media {
    position: relative;
    height: 120px;
    overflow: hidden;
    background: #eef2f7;
}

.web-chatbot-design-pcard-media::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(6, 20, 41, 0.65), rgba(6, 20, 41, 0));
    pointer-events: none;
}

.web-chatbot-design-pcard-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.web-chatbot-design-pcard:hover .web-chatbot-design-pcard-img {
    transform: scale(1.08);
}

.web-chatbot-design-pcard-stock {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 2px 8px 2px 16px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #0b6b36;
    background: #dff7e8;
    border-radius: 20px;
}

.web-chatbot-design-pcard-stock::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: #1fc16b;
}

.web-chatbot-design-pcard-price {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 2;
    padding: 3px 10px;
    font-size: 14px;
    font-weight: 800;
    color: #091E3E;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(7, 135, 255, 0.45);
}

.web-chatbot-design-pcard-body {
    flex: 1;
    padding: 9px 10px 4px;
}

.web-chatbot-design-pcard-name {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--web-chatbot-design-navy);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.web-chatbot-design-pcard-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 6px 10px 10px;
    padding: 7px 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    background: #091E3E;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.web-chatbot-design-pcard-btn:hover {
    color: #fff;
    text-decoration: none;
    background:#091E3E;
}

.web-chatbot-design-pcard-btn span {
    transition: transform 0.2s ease;
}

.web-chatbot-design-pcard-btn:hover span {
    transform: translateX(3px);
}

@media (max-width: 360px) {
    .web-chatbot-design-products {
        grid-template-columns: 1fr;
    }
}

/* ---------- Contact buttons ---------- */
.web-chatbot-design-contact-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.web-chatbot-design-call-btn,
.web-chatbot-design-wa-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 10px;
    text-align: left;
    text-decoration: none;
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 14px rgba(6, 20, 41, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.web-chatbot-design-call-btn {
    background: linear-gradient(135deg, #1a95ff, var(--web-chatbot-design-primary-dark));
}

.web-chatbot-design-wa-btn {
    background: linear-gradient(135deg, #2fe074, #128c4a);
}

.web-chatbot-design-call-btn:hover,
.web-chatbot-design-wa-btn:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(6, 20, 41, 0.25);
    filter: brightness(1.05);
}

.web-chatbot-design-call-btn:active,
.web-chatbot-design-wa-btn:active {
    transform: translateY(0);
}

.web-chatbot-design-btn-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.web-chatbot-design-btn-icon svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.web-chatbot-design-btn-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.web-chatbot-design-btn-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.web-chatbot-design-btn-value {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.web-chatbot-design-btn-arrow {
    font-size: 24px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease;
}

.web-chatbot-design-call-btn:hover .web-chatbot-design-btn-arrow,
.web-chatbot-design-wa-btn:hover .web-chatbot-design-btn-arrow {
    transform: translateX(3px);
}

/* ---------- Footer / input ---------- */
.web-chatbot-design-footer {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e1e7ef;
    background: #fff;
}

.web-chatbot-design-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    font: inherit;
    color: var(--web-chatbot-design-text);
    border: 1.5px solid #dbe3ed;
    border-radius: 22px;
    outline: none;
    transition: border-color 0.2s ease;
}

.web-chatbot-design-input:focus {
    border-color: var(--web-chatbot-design-primary);
}

.web-chatbot-design-send {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--web-chatbot-design-primary), var(--web-chatbot-design-primary-dark));
}

.web-chatbot-design-send:disabled {
    opacity: 0.5;
    cursor: default;
}

.web-chatbot-design-send svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ---------- Mobile ---------- */
@media (max-width: 575.98px) {
    .web-chatbot-design {
        --web-chatbot-design-side: 12px;
        --web-chatbot-design-bottom: 12px;
    }

    .web-chatbot-design-window {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .web-chatbot-design-bubble {
        max-width: 92%;
    }
}