/* Offline Corporate Styling */

:root {
    --bot-primary: #0f172a;
    --bot-secondary: #1e293b;
    --bot-accent: #38bdf8;
    --bot-text: #f8fafc;
    --bot-text-muted: #94a3b8;
    --bot-glass: rgba(15, 23, 42, 0.95);
    --bot-border: rgba(255, 255, 255, 0.1);
    --bot-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

.bot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.bot-toggle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--bot-accent);
    color: var(--bot-primary);
    border: none;
    box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.4);
    cursor: pointer;
    font-size: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 25px -5px rgba(56, 189, 248, 0.6);
}

.bot-toggle.active {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #f8fafc;
    box-shadow: 0 16px 32px -8px rgba(37, 99, 235, 0.75), 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.bot-toggle.active:hover {
    box-shadow: 0 20px 36px -8px rgba(37, 99, 235, 0.82), 0 0 0 6px rgba(56, 189, 248, 0.22);
}

@keyframes floating {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

.bot-toggle {
    animation: floating 3s ease-in-out infinite;
}

.bot-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: min(360px, calc(100vw - 32px));
    height: min(500px, calc(100vh - 140px));
    max-height: calc(100vh - 140px);
    background: var(--bot-glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--bot-border);
    border-radius: 20px;
    box-shadow: var(--bot-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom right;
}

.bot-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

@media (max-width: 768px) {
    .bot-container {
        bottom: 20px;
        right: 20px;
    }

    .bot-window {
        width: min(340px, calc(100vw - 24px));
        height: min(460px, calc(100vh - 120px));
        max-height: calc(100vh - 120px);
    }
}

.bot-header {
    padding: 20px;
    background: var(--bot-secondary);
    border-bottom: 1px solid var(--bot-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-avatar-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--bot-accent), #0ea5e9);
    color: var(--bot-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.bot-info h3 {
    font-size: 15px;
    color: var(--bot-text);
    margin: 0;
    font-weight: 600;
}

.bot-status {
    font-size: 11px;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bot-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    box-shadow: 0 0 5px currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.bot-actions {
    display: flex;
    gap: 10px;
}

.bot-action-btn {
    background: transparent;
    border: none;
    color: var(--bot-text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
    transition: color 0.2s;
}

.bot-action-btn:hover {
    color: var(--bot-accent);
}

.bot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: msgFadeIn 0.3s ease-out forwards;
}

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

.message.bot {
    background: var(--bot-secondary);
    color: var(--bot-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.user {
    background: linear-gradient(135deg, var(--bot-accent), #0ea5e9);
    color: var(--bot-primary);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25);
}

.message-time {
    font-size: 10px;
    margin-top: 5px;
    opacity: 0.5;
    text-align: right;
}

.bot-quick-actions {
    display: none;
    justify-content: center;
    gap: 12px;
    padding: 10px 20px;
    border-top: 1px solid var(--bot-border);
    background: rgba(255, 255, 255, 0.02);
}

.bot-quick-actions button {
    background: transparent;
    border: 1px solid var(--bot-accent);
    color: var(--bot-accent);
    padding: 7px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.bot-quick-actions button:hover {
    background: var(--bot-accent);
    color: var(--bot-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.bot-options {
    display: none;
}

.option-btn {
    display: none;
}

.inline-options {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

.inline-option-btn {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--bot-accent);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.inline-option-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--bot-accent);
    color: var(--bot-accent);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.1);
}

.bot-footer {
    padding: 15px 0;
    background: var(--bot-secondary);
}

.bot-input-area {
    margin: 0 20px;
    background: var(--bot-primary);
    border-radius: 12px;
    padding: 5px;
    display: flex;
    align-items: center;
    border: 1px solid var(--bot-border);
}

.bot-input-area input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--bot-text);
    padding: 10px 15px;
    outline: none;
    font-size: 14px;
}

.bot-input-area button {
    width: 40px;
    height: 40px;
    background: var(--bot-accent);
    color: var(--bot-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.bot-input-area button:hover {
    filter: brightness(1.1);
}

.typing-indicator {
    padding: 10px 20px;
    display: none;
    gap: 4px;
    align-items: center;
}

.typing-indicator .dot {
    width: 6px;
    height: 6px;
    background: var(--bot-accent);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator .dot:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

/* Scrollbar Style */
.bot-messages::-webkit-scrollbar {
    width: 5px;
}

.bot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
