/* Reset i Główne kontenery */
#mcat-seo-llm-wrapper {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    line-height: 1.6;
}
#mcat-seo-llm-wrapper * { box-sizing: border-box; }

/* Header */
.mcat-header {
    background-color: #1e1e2f;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}
.mcat-logo-text { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.mcat-logo-text .highlight { color: #7c4dff; }
.mcat-product-badge { background: #333; color: #aaa; padding: 4px 8px; border-radius: 4px; font-size: 12px; margin-left: 10px; font-weight: 600; text-transform: uppercase;}
.status-dot { height: 10px; width: 10px; background-color: #00e676; border-radius: 50%; display: inline-block; margin-right: 8px; }

/* Layout - Posiada teraz 700px wysokości dla wygody */
.mcat-main-container { 
    display: flex; 
    height: 700px; 
}

/* Sidebar - Kuloodporny scroll */
.mcat-sidebar { 
    width: 270px; 
    background-color: #181824; 
    padding: 20px; 
    border-right: 1px solid #333; 
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important; 
    display: block;
}

/* Scrollbar Sidebara */
.mcat-sidebar::-webkit-scrollbar {
    width: 6px;
}
.mcat-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.mcat-sidebar::-webkit-scrollbar-thumb {
    background-color: #3a3a5a;
    border-radius: 4px;
}
.mcat-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #5a5a7a;
}

.mcat-card { background: #232336; border-radius: 8px; padding: 15px; margin-bottom: 20px; }
.mcat-card h3 { margin-top: 0; font-size: 16px; color: #fff; border-bottom: 1px solid #3d3d5c; padding-bottom: 10px; }
.mcat-steps-list { list-style: none; padding: 0; margin: 0; font-size: 13px; color: #aaa; }
.mcat-steps-list li { padding: 8px 0; border-bottom: 1px solid #2e2e42; }

/* Chat Section */
.mcat-chat-section { flex: 1; display: flex; flex-direction: column; background-color: #121212; position: relative; }
.mcat-chat-window { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }

/* Wiadomości */
.mcat-message { display: flex; gap: 15px; max-width: 85%; animation: fadeIn 0.3s ease; }
.bot-message { align-self: flex-start; }
.user-message { align-self: flex-end; flex-direction: row-reverse; }
.message-avatar { width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 12px; flex-shrink: 0; }
.bot-message .message-avatar { background: #7c4dff; color: #fff; }
.user-message .message-avatar { background: #444; color: #fff; }

.message-content {
    background: #232336;
    padding: 15px;
    padding-right: 40px; 
    border-radius: 0 12px 12px 12px;
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    position: relative;
    word-wrap: break-word;
}
.user-message .message-content { background: #3d3d5c; border-radius: 12px 0 12px 12px; padding-right: 15px; }

/* PRZYCISK KOPIOWANIA */
.mcat-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: #aaa;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}
.mcat-copy-btn:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.mcat-copy-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* Input */
.mcat-input-area { padding: 20px; background: #1e1e2f; border-top: 1px solid #333; display: flex; gap: 10px; align-items: flex-end; }
#mcat-user-input { flex: 1; background: #121212; border: 1px solid #333; border-radius: 8px; padding: 12px; color: #fff; resize: none; font-family: inherit; min-height: 50px; max-height: 150px; }
#mcat-user-input:focus { outline: none; border-color: #7c4dff; }
#mcat-send-btn { background: #7c4dff; color: #fff; border: none; padding: 0 25px; height: 50px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: background 0.2s; display: flex; align-items: center; gap: 5px; }
#mcat-send-btn:hover { background: #651fff; }
#mcat-send-btn:disabled { background: #444; opacity: 0.7; cursor: not-allowed; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.mcat-chat-window::-webkit-scrollbar { width: 8px; }
.mcat-chat-window::-webkit-scrollbar-track { background: #121212; }
.mcat-chat-window::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

/* --- ANIMACJA PISANIA --- */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 0;
    min-width: 40px;
    justify-content: center;
}
.typing-dot {
    width: 6px;
    height: 6px;
    background: #aaa;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* --- Sekcja Domen --- */
.mcat-domain-list { list-style: none; padding: 0; margin: 10px 0; font-size: 13px; color: #e0e0e0; }
.mcat-domain-list li { padding: 8px 0; border-bottom: 1px solid #3d3d5c; display: flex; align-items: center; gap: 8px; }
.mcat-domain-list li.empty-domain { color: #aaa; font-style: italic; border: none; justify-content: center; text-align: center; }

/* Wymuszony układ przycisku dodawania */
.mcat-add-domain-box { 
    display: block !important; 
    margin-top: 15px !important; 
}
#mcat-new-domain { 
    width: 100% !important; 
    padding: 10px !important; 
    border-radius: 4px !important; 
    border: 1px solid #333 !important; 
    background: #121212 !important; 
    color: #fff !important; 
    font-size: 12px !important; 
    box-sizing: border-box !important; 
    margin-bottom: 10px !important; 
}
#mcat-new-domain:focus { 
    outline: none !important; 
    border-color: #00e676 !important; 
}
#mcat-add-domain-btn { 
    width: 100% !important; 
    display: block !important;
    padding: 10px !important; 
    border-radius: 4px !important; 
    border: none !important; 
    background: #00e676 !important; 
    color: #000 !important; 
    font-weight: bold !important; 
    cursor: pointer !important; 
    font-size: 13px !important; 
    transition: background 0.2s !important; 
    text-align: center !important; 
    box-sizing: border-box !important; 
}
#mcat-add-domain-btn:hover { background: #00c853 !important; }
#mcat-add-domain-btn:disabled { background: #444 !important; color: #888 !important; cursor: not-allowed !important; }