/*
====================================================
 Bibliosense Agent – Main Stylesheet
----------------------------------------------------
 This file contains all global and component styles for
 the Bibliosense Agent web application. Sections are clearly
 marked for maintainability and onboarding.
====================================================
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*
----------------------------------------------------
 Initial Loading Overlay
----------------------------------------------------
*/
.initial-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.initial-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.initial-loading-content {
    text-align: center;
    color: white;
}

.initial-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.initial-loading-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    animation: pulse 1.5s ease-in-out infinite;
}
/* App Name in Initial Loading Overlay */
.app-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 12px;
    letter-spacing: 1px;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/*
----------------------------------------------------
 Base Layout & Typography
----------------------------------------------------
*/
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #f7f7f8;
    color: #2d3748;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    height: 100%;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
}

html {
    height: -webkit-fill-available;
} 

/*
----------------------------------------------------
 Header & Navigation
----------------------------------------------------
*/
header {
    padding: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.5px;
}

.library-selector-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    margin: 0 auto;
    max-width: fit-content;
}

.library-label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.library-selector {
    padding: 0.5rem 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 500;
    color: #5a67d8;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.library-selector:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.library-selector:focus {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#chat-container {
    flex: 1;
    padding: 2rem;
    padding-bottom: calc(2rem - 50px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    width: 1000px;
    margin: 0 auto;
}

#chat-top-spacer {
    display: none;
}

footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/*
----------------------------------------------------
 Responsive Layouts
----------------------------------------------------
*/
@media (max-width: 1000px) {
    #chat-container {
        width: 100%;
        padding: 1rem;
    }
}

.input-area {
    padding: 1rem 2rem;
    display: none;
}

/* Disabled input-area style */
.input-area.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.7);
}

@media (max-width: 768px) {
    body {
        overscroll-behavior: auto;
        position: fixed;
        width: 100%;
    }
    
    .content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .library-selector-container {
        margin: 0 auto;
        padding: 0.6rem 1.2rem;
        gap: 0.4rem;
        box-shadow: 0 3px 8px rgba(102, 126, 234, 0.25);
    }
    
    .library-label {
        font-size: 0.85rem;
    }
    
    .library-selector {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
    }
    

}

.menu-toggle {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    z-index: 1001;
    background: transparent;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-50%) scale(1.05);
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #6366f1;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/*
----------------------------------------------------
 Agent Selector (Sidebar)
----------------------------------------------------
*/
.agent-selector-container {
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.agent-selector-container label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
}

.agent-selector {
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: #ffffff;
    color: #2d3748;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.agent-selector:hover {
    border-color: #6366f1;
    background: #f8f9ff;
}

.agent-selector:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.agent-selector:hover {
    background-color: #ede9fe;
    border-color: #4f46e5;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
}

.agent-selector:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/*
----------------------------------------------------
 Translation & Transcription Results
----------------------------------------------------
*/
.translation-result {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-top: 8px;
}

.translation-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #16a34a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.transcription-result {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-top: 8px;
}

.transcription-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    header {
        flex-wrap: nowrap;
        gap: 6px;
        padding: 0.75rem 1rem;
    }
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 2rem;
    color: #718096;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-sidebar:hover {
    background: #f7f7f8;
    color: #2d3748;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    padding-bottom: 1rem;
}

.footer-info {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    flex-shrink: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #2d3748;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar-link:hover {
    background: #f7f7f8;
    color: #6366f1;
}

.sidebar-link .icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.language-selector-container {
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.language-selector-container label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
}

.language-selector {
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: #ffffff;
    color: #2d3748;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.language-selector:hover {
    border-color: #6366f1;
    background: #f8f9ff;
}

.language-selector:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .sidebar {
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
    }
    
    .sidebar-nav {
        padding-bottom: 2rem;
    }
    
    .footer-info {
        padding: 0.75rem 1rem;
        font-size: 0.85em !important;
    }
}



@media (max-width: 768px) {
    .header {
        padding: 1rem 1rem;
    }
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}




/*
----------------------------------------------------
 Scroll Indicator
----------------------------------------------------
*/
.scroll-indicator {
    position: fixed;
    bottom: 140px;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: #6366f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 50;
}

.scroll-indicator.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.scroll-indicator:hover {
    background: #4f46e5;
    transform: scale(1.1);
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    fill: white;
}

@media (max-width: 768px) {
    .scroll-indicator {
        bottom: 180px;
        right: 1rem;
        width: 44px;
        height: 44px;
    }
}

/*
----------------------------------------------------
 Chat Message Bubbles
----------------------------------------------------
*/
.message {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    animation: fadeIn 0.3s ease-in;
    border-radius: 12px;
    max-width: 100%;
    margin: 0;
    width: 100%;
}

@media (max-width: 768px) {
    .message {
        padding: 0.75rem;
        gap: 0.5rem;
        flex-direction: column;
    }
    
    .message .message-icon {
        align-self: flex-start;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.message.assistant {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.message-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.message.user .message-icon {
    background: #10b981;
    color: #ffffff;
}

.message.assistant .message-icon {
    background: #6366f1;
    color: #ffffff;
}

.message-content {
    flex: 1;
    line-height: 1.5;
}

.message-text {
    margin-bottom: 0.35rem;
}

.message-text img {
    max-width: 200px;
    width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    display: block;
    margin-bottom: 0.75rem;
}

/* Placeholder for broken images */
.broken-image-placeholder {
    max-width: 200px;
    width: 200px;
    height: 280px;
    background: #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.broken-image-placeholder i {
    font-size: 48px;
    color: #94a3b8;
}

/* Book recommendation sections */
.message-text h3 {
    margin-top: 0;
    margin-bottom: 0.15rem;
    color: #2d3748;
}

/* Author line directly after title */
.message-text h3 + p em,
.message-text h3 + p i {
    display: block;
    color: #718096;
    font-size: 0.95em;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* Reduced spacing between paragraphs */
.message-text p {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
    line-height: 1.5;
}

/* Section headings in book recommendations */
.message-text p strong:first-child {
    color: #667eea;
    font-size: 1.05em;
    display: block;
    margin-top: 0.5rem;
    margin-bottom: 0.15rem;
}

/* Details list styling */
.message-text ul {
    list-style: none;
    padding-left: 0;
    margin: 0.25rem 0;
}

.message-text ul li {
    padding: 0.15rem 0;
    color: #4a5568;
    line-height: 1.4;
}

/* Style for borrow book link */
.message-text a[href*="pretnumerique.ca"] {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin: 0.75rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.message-text a[href*="pretnumerique.ca"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Separator line between books */
.message-text hr {
    border: none;
    border-top: 3px solid #e2e8f0;
    margin: 1.5rem 0;
}

.message-text {
    margin-bottom: 0.35rem;
}

.message-disclaimer {
    font-size: 0.75rem;
    font-style: italic;
    color: #718096;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

.message.user .message-disclaimer {
    display: none;
}



@media (max-width: 768px) {
    .input-area {
        padding: 1rem 1rem 1rem;
    }
}

.input-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.input-wrapper .input-box {
    flex: 1;
    min-width: 0;
}

.input-buttons {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
}

.input-disclaimer {
    max-width: 800px;
    margin: 0.5rem auto 0;
    font-size: 0.75rem;
    color: #718096;
    text-align: center;
    font-style: italic;
}

.input-box {
    width: 100%;
    padding: 1rem 7rem 1rem 1rem;
    background: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: 12px;
    color: #2d3748;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.input-box::placeholder {
    color: #a0aec0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.input-box:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

@media (max-width: 768px) {
    .input-box {
        font-size: 14px;
    }
    
    .input-box::placeholder {
        font-size: 14px;
    }
}

/*
----------------------------------------------------
 Voice & Send Buttons
----------------------------------------------------
*/
.voice-button {
    width: 32px;
    height: 32px;
    background: #10b981;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.voice-button:hover:not(:disabled) {
    background: #059669;
    transform: scale(1.05);
}

.voice-button:active:not(:disabled) {
    transform: scale(0.95);
    background: #ef4444;
}

.voice-button.recording {
    background: #ef4444 !important;
    animation: pulse 1.5s ease-in-out infinite;
}

.voice-button.recording:hover {
    background: #dc2626 !important;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.voice-button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

.voice-button svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.send-button {
    width: 32px;
    height: 32px;
    background: #6366f1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    background: #4f46e5;
    transform: scale(1.05);
}

.send-button:active:not(:disabled) {
    transform: scale(0.95);
}

.send-button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

.send-button svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.send-button i {
    color: white !important;
    font-size: 16px;
}

/*
----------------------------------------------------
 TTS (Text-to-Speech) Toggle Button
----------------------------------------------------
*/
.tts-toggle {
    width: 28px;
    height: 28px;
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
    padding: 0;
    flex-shrink: 0;
}

.tts-toggle:hover {
    background: #cbd5e0;
    transform: scale(1.1);
}

.tts-toggle.active {
    background: #6366f1;
}

.tts-toggle.active svg {
    fill: white;
}

.tts-toggle svg {
    width: 14px;
    height: 14px;
    fill: #4a5568;
}

.tts-toggle.speaking {
    animation: tts-pulse 1s ease-in-out infinite;
}

@keyframes tts-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
}

.spinner-border {
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tts-spin 0.75s linear infinite;
}

.spinner-border-sm {
    width: 12px;
    height: 12px;
    border-width: 2px;
}

@keyframes tts-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    display: flex !important;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem 0;
}

.loading-dot {
    width: 10px;
    height: 10px;
    background: #6366f1;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
    display: inline-block;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/*
----------------------------------------------------
 Empty State & Suggestions
----------------------------------------------------
*/
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1rem;
}

.empty-state-icon {
    font-size: 4rem;
}

@media (max-width: 768px) {
    .empty-state-icon {
        font-size: 3rem;
    }
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: contain;
    padding: 18px;
    background: #fff;
    border: 4px solid #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

@media (max-width: 768px) {
    .profile-photo {
        width: 100px;
        height: 100px;
        border-width: 3px;
    }
}

.empty-state h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1a202c;
    text-align: center;
}

@media (max-width: 768px) {
    .empty-state h2 {
        font-size: 1.5rem;
    }
}

.empty-state p {
    text-align: center;
    max-width: 800px;
}

.suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 700px;
    margin: 2rem auto 0;
    width: 100%;
    justify-content: center;
}

@media (max-width: 768px) {
    .suggestions {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .suggestions {
        grid-template-columns: repeat(2, 1fr);
    }
}

.suggestion-card {
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.suggestion-card:hover {
    background: #f8fafc;
    border-color: #6366f1;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.suggestion-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a202c;
}

.suggestion-card p {
    font-size: 0.875rem;
    color: #718096;
    line-height: 1.5;
}

/* Agent-specific card styling */
.suggestion-card.agent-card[data-agent="translator"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.suggestion-card.agent-card[data-agent="translator"]:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
    border-color: #5568d3;
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.suggestion-card.agent-card[data-agent="translator"] h3,
.suggestion-card.agent-card[data-agent="translator"] p {
    color: #ffffff;
}

.suggestion-card.agent-card[data-agent="dok2u"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
}

.suggestion-card.agent-card[data-agent="dok2u"]:hover {
    background: linear-gradient(135deg, #0d9668 0%, #047857 100%);
    border-color: #0d9668;
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}

.suggestion-card.agent-card[data-agent="dok2u"] h3,
.suggestion-card.agent-card[data-agent="dok2u"] p {
    color: #ffffff;
}

/*
----------------------------------------------------
 Cookie Banner
----------------------------------------------------
*/
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.cookie-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #1a202c;
}

.cookie-content p {
    margin: 0 0 1rem 0;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-accept {
    background: #6366f1;
    color: white;
}

.cookie-accept:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}

.cookie-decline {
    background: #e2e8f0;
    color: #4a5568;
}

.cookie-decline:hover {
    background: #cbd5e0;
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-content h3 {
        font-size: 1.1rem;
    }
    
    .cookie-content p {
        font-size: 0.9rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 0.875rem;
    }
}

/*
----------------------------------------------------
 Mobile Keyboard State
----------------------------------------------------
Styles when mobile keyboard is visible
*/

body.keyboard-visible {
    /* Prevent body scroll when keyboard is shown */
    overflow: hidden;
}

body.keyboard-visible #chat-container {
    /* Adjust chat container when keyboard appears */
    padding-bottom: 0;
}

body.keyboard-visible .input-area {
    /* Ensure input stays visible above keyboard */
    position: sticky;
    bottom: 0;
    z-index: 100;
}

@media (max-width: 768px) {
    body.keyboard-visible .content {
        /* Adjust content height for mobile keyboard */
        max-height: calc(100vh - env(safe-area-inset-bottom));
    }
    
    body.keyboard-visible #chat-container {
        /* Reduce padding when keyboard is visible */
        padding: 1rem;
        padding-bottom: 0;
    }
}

/*
----------------------------------------------------
 Action Buttons
----------------------------------------------------
*/

.action-btn {
    border-radius: 50%;
    padding: 8px;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}



.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.action-btn i {
    font-size: 1.3em;
}

.copy-btn{
    background: #f3f3f3;
    margin-left: 6px;
}

.like-btn {
    background: #e6f9e6;
    margin-left: 6px;
}

.dislike-btn {
    background: #f9e6e6;
    margin-left: 2px;
}
