/* Nyxzie Chatbot Demo Widgets - Reusable Styles */

.nyxzie-demo-widget {
    position: fixed;
    right: 2rem;
    z-index: 9999;
    font-family: var(--font-main, 'Outfit', sans-serif);
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Stack demos vertically above main chatbot */
.nyxzie-demo-style-1 {
    bottom: 180px;
}

.nyxzie-demo-style-2 {
    bottom: 120px;
}

/* Demo Chat Button */
.nyxzie-demo-button {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nyxzie-demo-style-1 .nyxzie-demo-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.nyxzie-demo-style-1 .nyxzie-demo-button:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.nyxzie-demo-style-2 .nyxzie-demo-button {
    background: linear-gradient(135deg, #ff6b35, #06b6d4);
}

.nyxzie-demo-style-2 .nyxzie-demo-button:hover {
    background: linear-gradient(135deg, #06b6d4, #ff6b35);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.5);
}

.nyxzie-demo-button-active {
    transform: scale(0.9);
}

/* Demo Chat Modal */
.nyxzie-demo-modal {
    position: fixed;
    right: 2rem;
    width: 360px;
    max-width: calc(100vw - 4rem);
    height: 550px;
    max-height: calc(100vh - 140px);
    background: var(--bg-dark, #0a0a12);
    border: 1px solid var(--border-light, rgba(255, 255, 255, 0.1));
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.nyxzie-demo-modal-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nyxzie-demo-style-1 .nyxzie-demo-modal {
    bottom: 250px;
}

.nyxzie-demo-style-2 .nyxzie-demo-modal {
    bottom: 190px;
}

/* Demo Header */
.nyxzie-demo-header {
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light, rgba(255, 255, 255, 0.1));
}

.nyxzie-demo-style-1 .nyxzie-demo-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
}

.nyxzie-demo-style-2 .nyxzie-demo-header {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(245, 87, 108, 0.2));
}

.nyxzie-demo-header-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nyxzie-demo-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.nyxzie-demo-header-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-main, #f8fafc);
    font-weight: 600;
}

.nyxzie-demo-status {
    font-size: 0.7rem;
    color: #25D366;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nyxzie-demo-status::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #25D366;
    border-radius: 50%;
    display: inline-block;
    animation: nyxzie-demo-status-pulse 2s ease-in-out infinite;
}

@keyframes nyxzie-demo-status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.nyxzie-demo-close {
    background: transparent;
    border: none;
    color: var(--text-muted, #94a3b8);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nyxzie-demo-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main, #f8fafc);
}

/* Demo Messages */
.nyxzie-demo-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
}

.nyxzie-demo-messages::-webkit-scrollbar {
    width: 5px;
}

.nyxzie-demo-messages::-webkit-scrollbar-track {
    background: transparent;
}

.nyxzie-demo-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.nyxzie-demo-message {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    animation: nyxzie-demo-message-appear 0.3s ease-out;
}

@keyframes nyxzie-demo-message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nyxzie-demo-message-user {
    align-items: flex-end;
}

.nyxzie-demo-message-bot {
    align-items: flex-start;
}

.nyxzie-demo-message-content {
    max-width: 75%;
    padding: 0.7rem 1rem;
    border-radius: 16px;
    word-wrap: break-word;
}

.nyxzie-demo-message-user .nyxzie-demo-message-content {
    color: white;
    border-bottom-right-radius: 4px;
}

.nyxzie-demo-style-1 .nyxzie-demo-message-user .nyxzie-demo-message-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.nyxzie-demo-style-2 .nyxzie-demo-message-user .nyxzie-demo-message-content {
    background: linear-gradient(135deg, #ff6b35, #06b6d4);
}

.nyxzie-demo-message-bot .nyxzie-demo-message-content {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main, #f8fafc);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-light, rgba(255, 255, 255, 0.1));
}

.nyxzie-demo-message-content p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Demo Input */
.nyxzie-demo-input-container {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid var(--border-light, rgba(255, 255, 255, 0.1));
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nyxzie-demo-input {
    flex: 1;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light, rgba(255, 255, 255, 0.1));
    border-radius: 25px;
    color: var(--text-main, #f8fafc);
    font-family: var(--font-main, 'Outfit', sans-serif);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.3s ease;
}

.nyxzie-demo-input:focus {
    border-color: var(--primary, #7c3aed);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.nyxzie-demo-style-1 .nyxzie-demo-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.nyxzie-demo-style-2 .nyxzie-demo-input:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.nyxzie-demo-input::placeholder {
    color: var(--text-muted, #94a3b8);
}

.nyxzie-demo-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nyxzie-demo-style-1 .nyxzie-demo-send {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.nyxzie-demo-style-2 .nyxzie-demo-send {
    background: linear-gradient(135deg, #ff6b35, #06b6d4);
}

.nyxzie-demo-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nyxzie-demo-send:active {
    transform: scale(0.95);
}

/* Adjust main chatbot position to accommodate demos */
.nyxzie-chatbot-widget {
    bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nyxzie-demo-widget {
        right: 1rem;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .nyxzie-demo-style-1 {
        bottom: 160px !important;
    }

    .nyxzie-demo-style-2 {
        bottom: 100px !important;
    }

    .nyxzie-demo-modal {
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
        height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
        bottom: 80px !important;
    }

    .nyxzie-demo-style-1 .nyxzie-demo-modal {
        bottom: 80px !important;
    }

    .nyxzie-demo-style-2 .nyxzie-demo-modal {
        bottom: 80px !important;
    }

    .nyxzie-demo-button {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }

    .nyxzie-demo-header {
        padding: 1rem 1.2rem;
    }

    .nyxzie-demo-header h4 {
        font-size: 1rem;
    }

    .nyxzie-demo-header span {
        font-size: 0.75rem;
    }

    .nyxzie-demo-messages {
        padding: 1rem;
    }

    .nyxzie-demo-message-content {
        max-width: 85%;
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .nyxzie-demo-input-container {
        padding: 1rem;
    }

    .nyxzie-demo-input {
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
    }

    .nyxzie-demo-send {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .nyxzie-demo-widget {
        right: 1rem;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .nyxzie-demo-style-1 {
        bottom: 140px !important;
    }

    .nyxzie-demo-style-2 {
        bottom: 80px !important;
    }

    .nyxzie-demo-modal {
        border-radius: 20px 20px 0 0;
        bottom: 0 !important;
        right: 0;
        left: 0;
        width: 100vw;
        height: calc(100vh - 80px);
        max-height: calc(100vh - 80px);
    }

    .nyxzie-demo-style-1 .nyxzie-demo-modal,
    .nyxzie-demo-style-2 .nyxzie-demo-modal {
        bottom: 0 !important;
    }

    .nyxzie-demo-button {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }

    .nyxzie-demo-header {
        padding: 1rem;
    }

    .nyxzie-demo-header h4 {
        font-size: 0.95rem;
    }

    .nyxzie-demo-header span {
        font-size: 0.7rem;
    }

    .nyxzie-demo-avatar {
        width: 35px;
        height: 35px;
    }

    .nyxzie-demo-messages {
        padding: 15px;
    }

    .nyxzie-demo-message-content {
        max-width: 85%;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .nyxzie-demo-input-container {
        padding: 10px 15px;
    }

    .nyxzie-demo-input {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }

    .nyxzie-demo-send {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* Typing Indicator */
.nyxzie-demo-typing {
    opacity: 0.8;
}

.nyxzie-demo-typing-dots {
    display: flex;
    gap: 6px;
    padding: 8px 0;
}

.nyxzie-demo-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted, #94a3b8);
    animation: nyxzie-demo-typing-bounce 1.4s ease-in-out infinite;
}

.nyxzie-demo-typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.nyxzie-demo-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.nyxzie-demo-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes nyxzie-demo-typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Markdown Support in Demo Messages */
.nyxzie-demo-message-bot .nyxzie-demo-message-content strong {
    color: var(--secondary, #06b6d4);
    font-weight: 600;
}

.nyxzie-demo-message-bot .nyxzie-demo-message-content a {
    color: var(--secondary, #06b6d4);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nyxzie-demo-message-bot .nyxzie-demo-message-content a:hover {
    color: var(--primary, #7c3aed);
    text-decoration: underline;
}

.nyxzie-demo-message-bot .nyxzie-demo-message-content ul {
    margin: 8px 0;
    padding-left: 20px;
    list-style: none;
}

.nyxzie-demo-message-bot .nyxzie-demo-message-content li {
    margin-bottom: 6px;
    position: relative;
    padding-left: 1rem;
}

.nyxzie-demo-message-bot .nyxzie-demo-message-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--secondary, #06b6d4);
    font-weight: bold;
    font-size: 1.2em;
}

.nyxzie-demo-message-bot .nyxzie-demo-message-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

.nyxzie-demo-message-bot .nyxzie-demo-message-content em {
    font-style: italic;
    opacity: 0.8;
    font-size: 0.9em;
}

.nyxzie-demo-message-bot .nyxzie-demo-message-content p {
    margin: 0.5rem 0;
}

.nyxzie-demo-message-bot .nyxzie-demo-message-content p:first-child {
    margin-top: 0;
}

.nyxzie-demo-message-bot .nyxzie-demo-message-content p:last-child {
    margin-bottom: 0;
}

