/* JRSS AI Chat Widget Styles */

:root {
    --jrss-primary: #00d2ff;
    /* Cyan for futuristic look */
    --jrss-secondary: #3a7bd5;
    --jrss-bg: rgba(255, 255, 255, 0.1);
    --jrss-glass-border: rgba(255, 255, 255, 0.2);
    --jrss-text: #ffffff;
    --jrss-user-msg-bg: #3a7bd5;
    --jrss-bot-msg-bg: rgba(255, 255, 255, 0.15);
}

/* Chat Button (Floating Action Button) */
.jrss-chat-btn {
    position: fixed;
    bottom: 150px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--jrss-primary), var(--jrss-secondary));
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulse 2s infinite;
}

.jrss-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.6);
}

.jrss-chat-btn svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Chat Window (Glassmorphism) */
.jrss-chat-window {
    position: fixed;
    bottom: 220px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: rgba(18, 18, 18, 0.95);
    /* Clean dark glass */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.jrss-chat-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.jrss-header {
    padding: 15px;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(58, 123, 213, 0.2));
    border-bottom: 1px solid var(--jrss-glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jrss-title {
    color: var(--jrss-text);
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.jrss-status-dot {
    width: 10px;
    height: 10px;
    background-color: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 5px #00ff88;
}

.jrss-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.jrss-close-btn:hover {
    color: white;
}

/* Messages Area */
.jrss-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.jrss-messages::-webkit-scrollbar {
    width: 6px;
}

.jrss-messages::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Message Bubbles */
.jrss-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: white;
    animation: fadeIn 0.3s ease;
}

.jrss-message.bot {
    background: var(--jrss-bot-msg-bg);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.jrss-message.user {
    background: var(--jrss-user-msg-bg);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Input Area */
.jrss-input-area {
    padding: 15px;
    border-top: 1px solid var(--jrss-glass-border);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.jrss-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 10px 15px;
    color: white;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.jrss-input:focus {
    border-color: var(--jrss-primary);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.jrss-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.jrss-send-btn {
    background: var(--jrss-primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.jrss-send-btn:hover {
    transform: scale(1.1);
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 210, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 210, 255, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing Indicator */
.jrss-typing {
    display: flex;
    gap: 4px;
    padding: 10px 15px;
    background: var(--jrss-bot-msg-bg);
    border-radius: 15px;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
    width: fit-content;
}

.jrss-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.jrss-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.jrss-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* =========================================
   JRSS Showcase Section (New)
   ========================================= */
.jrss-showcase-section {
    background: radial-gradient(circle at center, #1a1a2e 0%, #000000 100%);
    position: relative;
    overflow: hidden;
    padding: 100px 0;
}

.jrss-showcase-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.jrss-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.jrss-content {
    flex: 1;
}

/* Glowing Orb Animation */
.jrss-orb-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.jrss-orb {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, #00d2ff 0%, #3a7bd5 60%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 60px rgba(0, 210, 255, 0.6);
    animation: orb-breathe 4s ease-in-out infinite;
    z-index: 2;
}

.jrss-orb-ring {
    position: absolute;
    width: 220px;
    height: 220px;
    border: 2px solid rgba(0, 210, 255, 0.3);
    border-radius: 50%;
    border-top-color: transparent;
    border-bottom-color: transparent;
    animation: ring-spin 10s linear infinite;
}

.jrss-orb-ring.ring-2 {
    width: 280px;
    height: 280px;
    border: 1px dashed rgba(58, 123, 213, 0.4);
    animation: ring-spin-reverse 15s linear infinite;
}

@keyframes orb-breathe {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 60px rgba(0, 210, 255, 0.6);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 90px rgba(0, 210, 255, 0.8);
    }
}

@keyframes ring-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes ring-spin-reverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .jrss-showcase-container {
        flex-direction: column;
        text-align: center;
    }

    .jrss-orb-container {
        width: 250px;
        height: 250px;
    }
}

/* Mobile Chat Styles */
@media (max-width: 480px) {
    .jrss-chat-window {
        width: 100%;
        height: 100dvh;
        /* Dynamic Viewport Height for better mobile support */
        bottom: 0;
        right: 0;
        border-radius: 0;
        border: none;
        z-index: 2001;
        /* Ensure it is above everything else including modals */
    }

    .jrss-chat-btn {
        bottom: 20px;
        right: 20px;
    }
}

/* New Controls */
.jrss-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jrss-voice-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
    filter: grayscale(100%);
    opacity: 0.7;
}

.jrss-voice-btn.active {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.jrss-voice-btn:hover {
    transform: scale(1.1);
    opacity: 1;
}

/* Advanced Status Logs (Clean Style) */
.jrss-status-log {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin: 4px 10px;
    font-family: monospace;
    opacity: 0.8;
    animation: fadeIn 0.3s;
}