/* =========================================================
   Sheetla Mata Assistant - Floating Chat Widget CSS
   ========================================================= */

/* Scroll to Top Floating Button */
.sm-scroll-top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e07a5f 0%, #d45b3a 100%);
    box-shadow: 0 6px 20px rgba(212, 91, 58, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    z-index: 99998;
    border: none;
    outline: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.9);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.sm-scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.sm-scroll-top-btn:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 10px 24px rgba(212, 91, 58, 0.55);
}

.sm-scroll-top-btn i {
    font-size: 20px;
}

/* Floating Chat Toggle Button (Positioned above Scroll to Top button) */
.sm-chat-launcher {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e07a5f 0%, #d45b3a 100%);
    box-shadow: 0 8px 24px rgba(212, 91, 58, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    z-index: 99999;
    border: none;
    outline: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.sm-chat-launcher:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(212, 91, 58, 0.55);
}

.sm-chat-launcher i {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.sm-chat-launcher.active i {
    transform: rotate(90deg);
}

/* Chat Widget Window */
.sm-chat-widget {
    position: fixed;
    bottom: 155px;
    right: 25px;
    width: 380px;
    max-width: calc(100vw - 30px);
    height: 540px;
    max-height: calc(100vh - 180px);
    background: #fdfaf6;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
    font-family: 'Karla', system-ui, -apple-system, sans-serif;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.sm-chat-widget.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Header */
.sm-chat-header {
    background: #1e293b;
    color: #ffffff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #e07a5f;
}

.sm-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sm-chat-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fcd34d;
}

.sm-chat-header-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.sm-chat-header-subtitle {
    font-size: 12px;
    color: #94a3b8;
}

.sm-chat-close-btn {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.sm-chat-close-btn:hover {
    color: #ffffff;
}

/* Messages Area */
.sm-chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fcf8f2;
}

/* Message Bubbles */
.sm-msg {
    max-width: 85%;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    position: relative;
    word-break: break-word;
    animation: smFadeIn 0.25s ease-out;
}

@keyframes smFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.sm-msg-bot {
    background: #ffffff;
    color: #2d3748;
    align-self: flex-start;
    border: 1px solid #ede8e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border-top-left-radius: 4px;
}

.sm-msg-user {
    background: #e07a5f;
    color: #ffffff;
    align-self: flex-end;
    box-shadow: 0 2px 8px rgba(224, 122, 95, 0.25);
    border-top-right-radius: 4px;
}

.sm-msg-time {
    display: block;
    font-size: 10px;
    margin-top: 5px;
    opacity: 0.65;
    text-align: right;
}

.sm-msg-bot ul {
    margin: 6px 0 0 16px;
    padding: 0;
}

.sm-msg-bot li {
    margin-bottom: 4px;
}

/* Quick Action Chips */
.sm-chat-chips {
    padding: 10px 14px;
    background: #fdfaf6;
    border-top: 1px solid #ede8e1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
}

.sm-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sm-chip:hover {
    background: #e07a5f;
    border-color: #e07a5f;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Input Form */
.sm-chat-footer {
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid #ede8e1;
}

.sm-chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    padding: 4px 6px 4px 14px;
}

.sm-chat-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 13.5px;
    color: #1e293b;
    padding: 6px 0;
}

.sm-chat-input-wrapper input::placeholder {
    color: #94a3b8;
}

.sm-chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e07a5f;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.sm-chat-send-btn:hover {
    background: #d45b3a;
}

.sm-chat-powered {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 6px;
}

.sm-chat-powered span {
    color: #e07a5f;
    font-weight: 600;
}
