/* Alonet Floating Messenger Widget & Modal CSS */
.alonet-widget-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
}

.alonet-bubble-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.4), 0 8px 10px -6px rgba(2, 132, 199, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.alonet-bubble-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 28px -5px rgba(2, 132, 199, 0.5);
}

.alonet-status-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    background-color: #22c55e;
    border: 2px solid #ffffff;
    border-radius: 50%;
    animation: alonet-pulse 2s infinite;
}

@keyframes alonet-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.alonet-chat-modal {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 380px;
    height: 520px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    animation: alonet-slide-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes alonet-slide-up {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.alonet-chat-header {
    background: #0f172a;
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
}

.alonet-header-left {
    display: flex;
    flex-direction: column;
}

.alonet-brand-title {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.alonet-brand-title em {
    font-style: normal;
    color: #38bdf8;
    font-size: 12px;
    font-weight: 400;
    margin-left: 4px;
}

.alonet-mesh-badge {
    font-size: 11px;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

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

.alonet-header-close:hover {
    color: #ffffff;
}

.alonet-chat-body {
    flex: 1;
    padding: 16px;
    background: #f8fafc;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alonet-notice {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11px;
    color: #64748b;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    line-height: 1.4;
}

.alonet-msg-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
    position: relative;
}

.alonet-msg-bubble strong {
    display: block;
    font-size: 11px;
    color: #0284c7;
    margin-bottom: 2px;
}

.alonet-msg-bubble.incoming {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.alonet-msg-bubble.outgoing {
    background: #0284c7;
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.alonet-msg-time {
    display: block;
    font-size: 10px;
    opacity: 0.7;
    text-align: right;
    margin-top: 4px;
}

.alonet-chat-footer {
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alonet-chat-footer input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease;
}

.alonet-chat-footer input:focus {
    border-color: #0284c7;
}

.alonet-chat-footer button {
    background: #0284c7;
    color: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.alonet-chat-footer button:hover {
    background: #0369a1;
}

@media (max-width: 480px) {
    .alonet-chat-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
}
