﻿@keyframes gradientShift {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    33% {
        transform: rotate(120deg) scale(1.1);
    }

    66% {
        transform: rotate(240deg) scale(0.9);
    }
}

.demo-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Removed diagonal pattern overlay for cleaner look */

.demo-content h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(180deg,
            #ffffff 0%,
            rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
}

.demo-content p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 17px;
    font-weight: 400;
}

.demo-content ul {
    margin: 24px 0;
    padding-left: 24px;
    color: rgba(255, 255, 255, 0.6);
}

.demo-content li {
    margin-bottom: 12px;
    font-size: 16px;
}

.config-section {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    padding: 32px;
    border-radius: 16px;
    margin: 32px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.config-section h3 {
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.config-section code {
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono",
        monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    color: #53fb19;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Chat Widget Styles */
.chat-widget-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
        "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.chat-bubble {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;

    /* ADD THESE LINES */
    position: fixed;
    /* fixed to viewport */
    right: 30px;
    /* distance from right */
    bottom: 25px;
    /* distance from bottom */
}

.chat-bubble::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.chat-bubble:hover::before {
    opacity: 1;
}

.chat-bubble:active {
    transform: scale(0.95);
}

.chat-bubble svg {
    width: 28px;
    height: 28px;
    color: rgba(255, 255, 255, 0.9);
    z-index: 1;
    transition: transform 0.3s ease;
}

.chat-bubble.expanded svg {
    transform: rotate(90deg);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #53fb19 0%, #7bff4a 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(83, 251, 25, 0.6),
        0 0 0 2px rgba(0, 0, 0, 0.2);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.chat-widget {
    position: absolute;
    bottom: 88px;
    right: 0;
    width: 380px;
    height: 600px;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 24px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Removed diagonal pattern overlay for cleaner look */

.chat-widget.expanded {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    padding: 24px;
    color: white;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.chat-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #53fb19;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(83, 251, 25, 0.2),
        0 0 8px rgba(83, 251, 25, 0.6);
    animation: statusGlow 2s ease-in-out infinite;
}

.status-dot.disconnected {
    background: #ff453a;
    animation: none;
    box-shadow: 0 0 0 2px rgba(255, 69, 58, 0.2);
}

@keyframes statusGlow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.chat-title {
    font-weight: 600;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.01em;
}

.chat-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-top: 2px;
}

.close-button {
    margin-left: auto;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

.close-button:active {
    transform: scale(0.95);
}

.close-button svg {
    width: 16px;
    height: 16px;
}

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.4;
    animation: messageSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    word-wrap: break-word;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.user {
    background: linear-gradient(135deg, #53fb19 0%, #7bff4a 100%);
    color: rgba(0, 0, 0, 0.9);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 16px rgba(83, 251, 25, 0.5);
}

.message.agent {
    background: rgba(0, 122, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
    padding-left: 48px;
}

.message.agent::before {
    content: "🤵‍";
    position: absolute;
    top: 12px;
    left: 12px;
    width: 24px;
    height: 24px;
    background: rgba(0, 122, 255, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.message.agent .agent-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
}

.typing-indicator {
    display: none;
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 18px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    backdrop-filter: blur(10px);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-input {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.message-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    resize: none;
    outline: none;
    min-height: 44px;
    max-height: 120px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.message-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.message-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.message-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(83, 251, 25, 0.25);
}

.send-button {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #53fb19 0%, #7bff4a 100%);
    border: none;
    border-radius: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(83, 251, 25, 0.5);
    position: relative;
    overflow: hidden;
}

.send-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.2) 0%,
            transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.send-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(83, 251, 25, 0.6);
}

.send-button:hover:not(:disabled)::before {
    opacity: 1;
}

.send-button:active:not(:disabled) {
    transform: scale(0.95);
}

.send-button svg {
    width: 20px;
    height: 20px;
    color: rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1;
}

/* Custom scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* modalo Styles */
.modalo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modalo {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modalo h3 {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.modalo label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.modalo input,
.modalo textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    outline: none;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modalo textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 120px;
    font-family: inherit;
}

.modalo input:focus,
.modalo textarea:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(83, 251, 25, 0.5);
    box-shadow: 0 0 0 3px rgba(83, 251, 25, 0.25);
}

.modalo .error {
    color: #ff453a;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    background: rgba(255, 69, 58, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 69, 58, 0.2);
}

.modalo-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.modalo-button {
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.modalo-button.submit {
    background: linear-gradient(135deg, #53fb19 0%, #7bff4a 100%);
    color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 4px 16px rgba(83, 251, 25, 0.5);
}

.modalo-button.submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(83, 251, 25, 0.6);
}

.modalo-button.submit:active {
    transform: translateY(0);
}

.modalo-button.cancel {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modalo-button.cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

/* Rating Styles */
.rating-actions {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.rating-action {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.rating-action:hover {
    background: rgba(83, 251, 25, 0.2);
    color: #53fb19;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(83, 251, 25, 0.5);
    border-color: rgba(83, 251, 25, 0.3);
}

.rating-action:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .chat-widget {
        width: calc(100vw - 32px);
        height: calc(100vh - 120px);
        bottom: 88px;
        right: 16px;
        left: 16px;
    }

    .modalo {
        width: calc(100% - 32px);
    }

    .demo-content {
        padding: 32px;
    }

    .demo-content h1 {
        font-size: 36px;
    }
}

/* Subtle loading animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.loading {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}