/* Demo Page Styles - Production Ready */

/* ===== HERO SECTION ===== */
.demo-hero-modern {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 30%, #f1f5f9 100%);
    padding: 120px 0 80px !important;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Demo Blobs */
.demo-blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 50%, transparent 100%);
    border-radius: 50%;
    filter: blur(40px);
    animation: float 8s ease-in-out infinite;
}

.demo-blob-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Demo Orbs */
.floating-demo-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.demo-orb {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(99, 102, 241, 0.05));
    animation: float-orb 12s infinite ease-in-out;
}

.demo-orb.orb-1 {
    width: 100px;
    height: 100px;
    top: 15%;
    right: 15%;
    animation-delay: -3s;
}

.demo-orb.orb-2 {
    width: 60px;
    height: 60px;
    top: 70%;
    right: 25%;
    animation-delay: -7s;
}

.demo-orb.orb-3 {
    width: 80px;
    height: 80px;
    top: 50%;
    left: 5%;
    animation-delay: -1s;
}

@keyframes float-orb {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

/* ===== TYPOGRAPHY ===== */
.demo-headline {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

.demo-subtext {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #64748b;
    max-width: 500px;
}

/* Gradient Text */
.gradient-text-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern Badge */
.modern-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 50px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.1);
}

.badge-glow {
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.6), rgba(99, 102, 241, 0.4), rgba(16, 185, 129, 0.4));
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(8px);
}

.modern-badge:hover .badge-glow {
    opacity: 1;
}

.badge-glow.primary {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.6), rgba(99, 102, 241, 0.4), rgba(129, 140, 248, 0.4));
}

.badge-text {
    position: relative;
    z-index: 1;
    font-weight: 600;
    color: #4f46e5;
    font-size: 14px;
}

/* ===== INDUSTRY SELECTOR ===== */
.industry-selector-container {
    margin-top: 2rem;
}

.industry-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    font-size: 15px;
}

.industry-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.industry-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.industry-card:hover {
    border-color: #4f46e5;
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
}

.industry-card.active {
    border-color: #4f46e5;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(99, 102, 241, 0.02));
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.12);
}

.industry-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.industry-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.industry-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 15px;
}

.industry-desc {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

.industry-check {
    color: #4f46e5;
    font-size: 20px;
}

/* ===== DEMO FEATURES ===== */
.demo-features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.demo-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
}

.demo-feature i {
    font-size: 16px;
}

/* ===== CHAT WIDGET CONTAINER ===== */
.demo-widget-wrapper {
    position: sticky;
    top: 100px;
}

.demo-chat-container {
    width: 100%;
    max-width: 440px;
    height: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Chat Header */
.demo-chat-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 110px;
}

.demo-header-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.demo-chat-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    color: white;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.demo-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.demo-chat-info {
    flex: 1;
    min-width: 0;
}

.demo-chat-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.demo-industry-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: white;
    backdrop-filter: blur(10px);
}

.demo-industry-badge .industry-icon {
    font-size: 14px;
}

/* Messages Container */
.demo-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    background: #f5f6f8;
    scroll-behavior: smooth;
    margin-top: 0px !important;
}

.demo-messages-container::-webkit-scrollbar {
    width: 6px;
}

.demo-messages-container::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 3px;
}

/* Message Styling */
.message-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    max-width: 85%;
    word-wrap: break-word;
    position: relative;
}

.message.user {
    align-self: flex-end;
    margin-left: auto;
}

.message.assistant,
.message.system {
    align-self: flex-start;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.message.user .message-bubble {
    background: #4f46e5;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant .message-bubble {
    background: white;
    color: #1a1d29;
    border-bottom-left-radius: 4px;
    border: 1px solid #f3f4f6;
}

.message-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
    padding: 0 4px;
}

.message.user .message-time {
    text-align: right;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    max-width: 80px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid #f3f4f6;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    margin: 0 2px;
    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;
    }
}

/* Input Container */
.demo-input-container {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.demo-input-wrapper {
    flex: 1;
    position: relative;
}

.demo-message-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-height: 120px;
    line-height: 1.5;
    color: #1a1d29;
    background: #f8f9fb;
}

.demo-message-input::placeholder {
    color: #9ca3af;
}

.demo-message-input:focus {
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.demo-send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.demo-send-button:hover:not(:disabled) {
    background: #4338ca;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.demo-send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.demo-send-button:hover:not(:disabled) .send-icon {
    transform: translateX(2px);
}

/* Chat Footer */
.demo-chat-footer {
    padding: 12px;
    text-align: center;
    background: #f8f9fb;
    border-top: 1px solid #f3f4f6;
}

.powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
}

.powered-by a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    line-height: 0;
}

/* No Chatbot State */
.demo-no-chatbot {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 60px 40px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.no-chatbot-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #94a3b8;
    margin: 0 auto 24px;
}

.demo-no-chatbot h3 {
    color: #0f172a;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.demo-no-chatbot p {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 24px;
}

/* ===== CTA SECTION ===== */
.demo-cta-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.demo-cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.section-headline {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.section-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #64748b;
}

.demo-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary-modern {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 16px;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
    color: white;
}

.btn-outline-modern {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(79, 70, 229, 0.2);
    border-radius: 12px;
    padding: 14px 30px;
    font-weight: 600;
    font-size: 16px;
    color: #4f46e5;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-outline-modern:hover {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

/* Message content formatting */
.message-bubble ul,
.message-bubble ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-bubble ul {
    list-style-type: disc;
}

.message-bubble ol {
    list-style-type: decimal;
}

.message-bubble li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.message-bubble li:last-child {
    margin-bottom: 0;
}

.message-bubble p {
    margin: 6px 0;
}

.message-bubble p:first-child {
    margin-top: 0;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.message-bubble strong,
.message-bubble b {
    font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .demo-hero-modern {
        padding: 100px 0 60px !important;
    }

    .demo-widget-wrapper {
        position: relative;
        top: 0;
        margin-top: 40px;
    }

    .demo-chat-container {
        height: 650px;
    }
}

@media (max-width: 768px) {
    .demo-hero-modern {
        padding: 80px 0 40px !important;
    }

    .demo-headline {
        font-size: 2rem;
    }

    .demo-subtext {
        font-size: 1rem;
    }

    .industry-cards {
        gap: 10px;
    }

    .industry-card {
        padding: 14px 16px;
    }

    .industry-icon {
        font-size: 24px;
    }

    .demo-features {
        flex-direction: column;
        gap: 12px;
    }

    .demo-chat-container {
        max-width: 100%;
        height: 550px;
        border-radius: 16px;
    }

    .demo-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary-modern,
    .btn-outline-modern {
        width: 100%;
        justify-content: center;
    }
}