/* ==========================================================================
   EMMI'S 4.0 - PRAXIS-BERATER FÜR 24/7 HOFLÄDEN & VERKAUFSCONTAINER
   ========================================================================== */

:root {
    --emmis-green: #0B6E4F;
    --emmis-green-dark: #074B35;
    --emmis-green-light: #E6F4EA;
    --emmis-green-border: #A3D9C9;
    --emmis-copper: #B45309;
    --emmis-copper-light: #FEF3C7;
    --emmis-dark: #1E293B;
    --emmis-slate: #475569;
    --emmis-light-slate: #94A3B8;
    --emmis-bg: #ECEFF3;
    --card-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    --border-color: #CBD5E1;
}

html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    position: relative;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--emmis-bg);
    background-image: linear-gradient(180deg, #F1F5F9 0%, #E2E8F0 100%);
    color: var(--emmis-dark);
    min-height: 100vh;
}

/* Navbar */
.navbar-emmis {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

/* Main Container Layout - Minimalist, Modern & Structured */
.app-container {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
    min-height: 580px;
    max-width: 960px;
    margin: 0.5rem auto;
}

/* Header inside Chat */
.chat-header {
    background: linear-gradient(135deg, var(--emmis-dark) 0%, #0F172A 100%);
    color: #ffffff;
    padding: 0.9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--emmis-green);
    flex-shrink: 0;
}

.emmi-header-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--emmis-green);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* Chat Box - Soft Slate Gray Background for high readability */
.chat-box {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #F1F5F9;
    display: flex;
    flex-direction: column;
}

/* Welcome Card Styling */
.welcome-card {
    border: 1px solid var(--border-color) !important;
    border-left: 5px solid var(--emmis-green) !important;
    background: #ffffff !important;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04) !important;
    animation: fadeIn 0.3s ease;
}

.message {
    margin-bottom: 1.25rem;
    padding: 1.1rem 1.35rem;
    border-radius: 18px;
    max-width: 85%;
    line-height: 1.6;
    font-size: 0.98rem;
    position: relative;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    background: #E8F5E9;
    color: #0F5132;
    align-self: flex-end;
    margin-left: auto;
    border: 1px solid var(--emmis-green-border);
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 6px rgba(11, 110, 79, 0.08);
}

.message.bot {
    background: #ffffff;
    color: var(--emmis-dark);
    border: 1px solid var(--border-color);
    align-self: flex-start;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    border-bottom-left-radius: 4px;
}

.message.bot ul, .message.bot ol {
    margin-bottom: 0.5rem;
    padding-left: 1.25rem;
}

.message.bot strong {
    color: #0F172A;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    background: #ffffff;
    border: 1px solid var(--border-color);
    align-self: flex-start;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1.35rem;
    border-radius: 18px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: var(--emmis-light-slate);
    display: inline-block;
    border-radius: 50%;
    animation: bounce 1.3s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.15s; margin-left: 4px; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; margin-left: 4px; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Input Area */
.input-area {
    padding: 1.1rem 1.5rem;
    background: #EAEEF3;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 -4px 15px rgba(15, 23, 42, 0.03);
}

.input-area input {
    flex: 1;
    min-width: 0;
    padding: 0.9rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    outline: none;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: var(--emmis-dark);
}

.input-area input::placeholder {
    color: #64748B;
}

.input-area input:focus {
    background: #ffffff;
    border-color: var(--emmis-green);
    box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.18);
}

.btn-send {
    background: var(--emmis-green);
    color: #ffffff;
    border: none;
    padding: 0.9rem 1.75rem;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(11, 110, 79, 0.2);
}

.btn-send:hover {
    background: var(--emmis-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 110, 79, 0.3);
}

.voice-btn {
    background: #ffffff;
    color: var(--emmis-dark);
    border: 2px solid var(--border-color);
    padding: 0.9rem;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.03);
}

.voice-btn:hover {
    background: #F1F5F9;
    border-color: #94A3B8;
}

.voice-btn.recording {
    background: #EF4444;
    color: #ffffff;
    border-color: #EF4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Image Trigger Card Styling */
.emmis-image-card {
    transition: transform 0.2s ease;
}
.emmis-image-card:hover {
    transform: scale(1.01);
}

/* Referenzprojekte Showcase Styling */
.project-nav-pills {
    background: #E2E8F0;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    gap: 6px;
}

.project-nav-pills .nav-link {
    color: var(--emmis-slate);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.project-nav-pills .nav-link:hover {
    background-color: var(--emmis-green-light);
    color: var(--emmis-green-dark);
    border-color: var(--emmis-green-border);
}

.project-nav-pills .nav-link.active {
    background-color: var(--emmis-green) !important;
    color: #ffffff !important;
    border-color: var(--emmis-green-dark) !important;
    box-shadow: 0 2px 8px rgba(11, 110, 79, 0.25);
}

.tab-logo-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 50%;
    vertical-align: -2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    background: #ffffff;
    display: inline-block;
    flex-shrink: 0;
}

/* Modal Styling */
.modal-content {
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.modal-header {
    background: #F8FAFC;
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    background: #F8FAFC;
    border-top: 1px solid var(--border-color);
}

/* Modern Clean Studio Stage for Project Images (Eliminates Black Bars) */
.main-image-wrapper {
    background: radial-gradient(circle at 50% 50%, #F8FAFC 0%, #E2E8F0 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02);
}

.main-image-wrapper img {
    max-height: 360px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 4px 10px -2px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.main-image-wrapper img:hover {
    transform: scale(1.015);
}

.thumb-container {
    background: #F1F5F9;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.thumb-img {
    transition: all 0.2s ease;
    opacity: 0.8;
    border-radius: 8px !important;
}

.thumb-img:hover, .thumb-img.active {
    opacity: 1;
    border-color: var(--emmis-green) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 110, 79, 0.25);
}

/* Responsive Rules */
@media (max-width: 768px) {
    .app-container {
        height: 85vh;
        margin: 0;
        border-radius: 0;
        border: none;
    }
    .chat-header {
        padding: 0.75rem 1rem;
    }
    .input-area {
        padding: 0.75rem 0.75rem;
        gap: 6px;
    }
    .btn-send {
        padding: 0.75rem 1.1rem;
    }
    .message {
        max-width: 92%;
        padding: 0.85rem 1rem;
    }
}
