/* ==================================================
   CHATBOT AI - CLEAN MODERN CHAT INTERFACE
   WhatsApp/ChatGPT Inspired Design with Green Theme
   ================================================== */

/* ==================================================
   MAIN CONTAINER - Fullscreen Chat
   ================================================== */
.chatbot-split-modern {
    height: calc(100vh - 100px);
    background: #f0f2f5;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Subtle pattern background */
.chatbot-split-modern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(16, 185, 129, 0.02) 35px, rgba(16, 185, 129, 0.02) 70px);
    pointer-events: none;
}

.container-fluid {
    width: 100%;
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    min-height: 0;
}

.chatbot-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 1;
    gap: 0;
}

/* ==================================================
   LEFT SIDEBAR - Quick Info
   ================================================== */
.chatbot-features-panel {
    background: white;
    border-right: 1px solid #e5e7eb;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.features-content {
    flex: 1;
}

/* Bot Profile */
.bot-hero {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 20px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.bot-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.bot-avatar-modern {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.25);
    position: relative;
    z-index: 1;
}

.bot-avatar-modern i {
    font-size: 2.5rem;
    color: white;
}

.avatar-pulse {
    display: none;
}

.features-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 0.5rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.title-highlight {
    color: #10b981;
}

.features-tagline {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Preset Questions Section */
.section-header {
    margin-bottom: 1.25rem;
    text-align: center;
}

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.35rem;
}

.section-header p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.feature-cards {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 2rem;
}

.preset-question {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.preset-question:hover {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-color: #10b981;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.preset-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preset-icon i {
    font-size: 1.15rem;
    color: white;
}

.preset-text {
    flex: 1;
}

.preset-text h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.2rem;
}

.preset-text p {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
    line-height: 1.3;
}

/* Stats */
.stats-mini {
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-top: auto;
}

.stat-mini-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #475569;
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

.stat-mini-item:first-child {
    padding-top: 0;
}

.stat-mini-item:last-child {
    padding-bottom: 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

.stat-mini-item i {
    color: #10b981;
    font-size: 1rem;
}

.status-online {
    color: #10b981;
    font-weight: 600;
}

/* ==================================================
   RIGHT PANEL - Chat Interface
   ================================================== */
.chatbot-chat-panel {
    background: #e5ddd5;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0;
    height: 100%;
}

/* Chat pattern background (WhatsApp style) */
.chatbot-chat-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="260" height="260"><defs><filter id="a" x=".5%" y=".5%" width="99%" height="99%"><feGaussianBlur in="SourceGraphic" stdDeviation="2"/></filter></defs><g filter="url(%23a)"><ellipse cx="130" cy="130" rx="45" ry="50" fill="%23d1d1d1" opacity=".1"/></g></svg>');
    opacity: 0.3;
    pointer-events: none;
}

/* Header */
.chat-header-compact {
    padding: 1.25rem 2rem;
    background: #10b981;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.header-info {
    flex: 1;
}

.bot-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.status-dot-green {
    width: 10px;
    height: 10px;
    background: #34d399;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.3);
}

.bot-status span {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.header-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.clear-chat-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-chat-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(15deg);
}

/* Messages */
.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem;
    position: relative;
    z-index: 1;
    min-height: 0;
}

.message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bot Message */
.bot-message {
    align-items: flex-start;
    justify-content: flex-start;
}

.message-avatar {
    width: 40px;
    height: 40px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.message-avatar i {
    color: white;
    font-size: 1.15rem;
}

.message-content {
    flex: 1;
    max-width: 70%;
}

.message-bubble {
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.bot-bubble {
    background: white;
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bot-bubble p {
    margin: 0 0 0.5rem;
    color: #1e293b;
    font-size: 0.95rem;
}

.bot-bubble p:last-child {
    margin-bottom: 0;
}

.bot-bubble strong {
    color: #10b981;
    font-weight: 700;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.375rem 0;
    color: #475569;
    font-size: 0.9rem;
}

.info-list i {
    color: #10b981;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.tip-text {
    background: #fef3c7;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
    margin-top: 0.75rem !important;
    font-size: 0.875rem;
    color: #92400e;
}

.message-time {
    display: inline-block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.375rem;
}

/* User Message */
.user-message {
    align-items: flex-end;
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.user-message .message-avatar {
    background: #3b82f6;
}

.user-message .message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-bubble {
    background: #dcf8c6;
    border-radius: 12px 0 12px 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-bubble p {
    color: #1e293b;
}

/* Quick Questions */
.quick-questions-bar {
    padding: 1rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    position: relative;
    z-index: 10;
}

.quick-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.quick-chips {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.chip-new {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.chip-new:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* Input */
.chat-input-area {
    padding: 1.25rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    position: relative;
    z-index: 10;
}

.input-wrapper-modern {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.input-wrapper-modern:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.chat-input-modern {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    max-height: 100px;
}

.chat-input-modern::placeholder {
    color: #94a3b8;
}

.input-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.char-counter {
    font-size: 0.75rem;
    color: #94a3b8;
}

.send-btn-modern {
    width: 42px;
    height: 42px;
    background: #10b981;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.send-btn-modern:hover {
    background: #059669;
    transform: scale(1.05);
}

.send-btn-modern:active {
    transform: scale(0.95);
}

.input-hint {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

kbd {
    padding: 0.2rem 0.4rem;
    background: #e2e8f0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
    color: #475569;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.35rem;
    padding: 0.625rem 0.875rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-8px);
    }
}

/* Retry Button Style */
.retry-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.retry-button:hover {
    background: #fee2e2;
    border-color: #ef4444;
    transform: translateY(-1px);
}

.retry-button i {
    font-size: 0.8rem;
}

/* Sidebar Info Cards */
.info-card-modern {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.65rem;
}

.info-card-modern .info-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-card-modern .info-icon i {
    font-size: 1.15rem;
    color: white;
}

.info-card-modern.warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.info-card-modern.warning .info-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.info-card-modern .info-text h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.15rem;
}

.info-card-modern .info-text p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.disclaimer-title {
    color: #92400e !important;
}

.disclaimer-text {
    color: #b45309 !important;
    font-style: italic;
}

/* ==================================================
   RESPONSIVE
   ================================================== */
@media (max-width: 1024px) {
    .chatbot-grid {
        grid-template-columns: 1fr;
    }

    .chatbot-features-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .chat-header-compact {
        padding: 1rem 1.25rem;
    }

    .chat-messages-area {
        padding: 1.5rem 1.25rem;
    }

    .quick-questions-bar {
        padding: 0.875rem 1.25rem;
    }

    .chat-input-area {
        padding: 1rem 1.25rem;
    }

    .message-content {
        max-width: 80%;
    }
}