/**
 * Khoads Floating Chat Widget Styles
 * Super lightweight, zero bloat, high conversion
 */

.khoads-chat-widget {
    position: fixed;
    bottom: 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.khoads-chat-right {
    right: 24px;
}

.khoads-chat-left {
    left: 24px;
}

/* Main Trigger Button */
.khoads-chat-trigger {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #00AF51;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 175, 81, 0.35);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s;
    outline: none;
    padding: 0;
}

.khoads-chat-trigger:hover {
    transform: scale(1.08);
    background: #009645;
}

.khoads-chat-trigger:active {
    transform: scale(0.96);
}

/* Icons */
.khoads-trigger-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s, transform 0.25s;
}

.khoads-icon-close {
    position: absolute;
    color: #ffffff;
    font-size: 32px;
    line-height: 1;
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
}

.khoads-chat-widget.active .khoads-icon-open {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
}

.khoads-chat-widget.active .khoads-icon-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Pulse animation rings */
.khoads-pulse-ring,
.khoads-pulse-ring-2 {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #00AF51;
    top: 0;
    left: 0;
    animation: khoadsPulse 2.2s infinite ease-out;
    pointer-events: none;
}

.khoads-pulse-ring-2 {
    animation-delay: 1.1s;
}

.khoads-chat-widget.active .khoads-pulse-ring,
.khoads-chat-widget.active .khoads-pulse-ring-2 {
    display: none;
}

@keyframes khoadsPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Tooltip / Bubble */
.khoads-chat-tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: #ffffff;
    color: #1e293b;
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    border: 1px solid #e2e8f0;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: khoadsFadeInUp 0.3s ease-out;
    cursor: pointer;
}

.khoads-chat-left .khoads-chat-tooltip {
    right: auto;
    left: 0;
}

.khoads-tooltip-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.khoads-tooltip-close:hover {
    color: #475569;
}

/* Expansion Panel */
.khoads-chat-panel {
    position: absolute;
    bottom: 74px;
    right: 0;
    width: 280px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.khoads-chat-left .khoads-chat-panel {
    right: auto;
    left: 0;
}

.khoads-chat-widget.active .khoads-chat-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.khoads-panel-header {
    background: #0f172a;
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.khoads-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.khoads-panel-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.khoads-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #1e293b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.khoads-contact-item:hover {
    background: #f0fdf4;
    border-color: #bbf7d0;
    transform: translateX(-2px);
}

.khoads-chat-left .khoads-contact-item:hover {
    transform: translateX(2px);
}

.khoads-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    flex-shrink: 0;
}

.khoads-contact-phone .khoads-item-icon {
    background: #00AF51;
    color: #ffffff;
}

.khoads-item-info {
    flex-grow: 1;
}

.khoads-item-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
}

.khoads-item-desc {
    font-size: 12px;
    color: #64748b;
}

@keyframes khoadsFadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .khoads-chat-widget {
        bottom: 18px;
    }
    .khoads-chat-right {
        right: 18px;
    }
    .khoads-chat-left {
        left: 18px;
    }
    .khoads-chat-panel {
        width: calc(100vw - 36px);
        max-width: 320px;
    }
}
