/**
 * HISTORA AI Chat Interface Styles
 * Modern, Professional Design with Academic Elegance
 */

/* ================================
   CSS Custom Properties / Variables
   ================================ */
:root {
    /* Primary Colors - Deep Academic Blue & Gold */
    --histora-primary: #1a365d;
    --histora-primary-light: #2d4a7c;
    --histora-primary-dark: #0f2744;
    --histora-accent: #c9a227;
    --histora-accent-light: #e8c547;
    --histora-accent-dark: #9a7a1c;
    
    /* Neutral Colors */
    --histora-bg: #f8f7f4;
    --histora-bg-alt: #fffef9;
    --histora-surface: #ffffff;
    --histora-text: #1a1a1a;
    --histora-text-secondary: #5a5a5a;
    --histora-text-muted: #8a8a8a;
    --histora-border: #e5e2d9;
    --histora-border-light: #f0ede5;
    
    /* Semantic Colors */
    --histora-success: #2d7d46;
    --histora-info: #1a5f7a;
    --histora-warning: #b8860b;
    --histora-error: #a02c2c;
    
    /* Typography */
    --histora-font-display: 'Cormorant Garamond', Georgia, serif;
    --histora-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --histora-space-xs: 0.25rem;
    --histora-space-sm: 0.5rem;
    --histora-space-md: 1rem;
    --histora-space-lg: 1.5rem;
    --histora-space-xl: 2rem;
    --histora-space-2xl: 3rem;
    
    /* Border Radius */
    --histora-radius-sm: 0.375rem;
    --histora-radius-md: 0.75rem;
    --histora-radius-lg: 1rem;
    --histora-radius-xl: 1.5rem;
    --histora-radius-full: 9999px;
    
    /* Shadows */
    --histora-shadow-sm: 0 1px 2px rgba(26, 54, 93, 0.05);
    --histora-shadow-md: 0 4px 12px rgba(26, 54, 93, 0.08);
    --histora-shadow-lg: 0 12px 32px rgba(26, 54, 93, 0.12);
    --histora-shadow-xl: 0 24px 48px rgba(26, 54, 93, 0.16);
    --histora-shadow-glow: 0 0 40px rgba(201, 162, 39, 0.15);
    
    /* Transitions */
    --histora-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --histora-transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --histora-transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --histora-transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ================================
   Base Animations
   ================================ */
@keyframes histora-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes histora-slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes histora-slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes histora-scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes histora-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes histora-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes histora-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes histora-typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

@keyframes histora-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes histora-borderGlow {
    0%, 100% {
        border-color: var(--histora-accent);
        box-shadow: 0 0 5px rgba(201, 162, 39, 0.3);
    }
    50% {
        border-color: var(--histora-accent-light);
        box-shadow: 0 0 20px rgba(201, 162, 39, 0.5);
    }
}

@keyframes histora-gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ================================
   Full Page Chat Container
   ================================ */
.histora-page-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--histora-bg) 0%, #ebe8e0 50%, var(--histora-bg-alt) 100%);
    background-size: 400% 400%;
    animation: histora-gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

.histora-page-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(26, 54, 93, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* Decorative Elements */
.histora-decoration {
    position: absolute;
    pointer-events: none;
    opacity: 0.06;
}

.histora-decoration--1 {
    top: 10%;
    left: 5%;
    width: 300px;
    height: 300px;
    border: 2px solid var(--histora-primary);
    border-radius: 50%;
    animation: histora-float 6s ease-in-out infinite;
}

.histora-decoration--2 {
    bottom: 15%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: var(--histora-accent);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: histora-float 8s ease-in-out infinite reverse;
}

.histora-decoration--3 {
    top: 50%;
    right: 5%;
    font-family: var(--histora-font-display);
    font-size: 15rem;
    font-weight: 600;
    color: var(--histora-primary);
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    letter-spacing: 0.2em;
}

/* ================================
   Chat Container
   ================================ */
.histora-chat-container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--histora-space-lg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    animation: histora-fadeIn 0.6s ease-out;
}

/* ================================
   Header
   ================================ */
.histora-header {
    text-align: center;
    padding: var(--histora-space-2xl) 0;
    animation: histora-slideUp 0.8s ease-out;
}

.histora-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--histora-space-md);
    margin-bottom: var(--histora-space-lg);
}

.histora-logo__icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--histora-primary) 0%, var(--histora-primary-light) 100%);
    border-radius: var(--histora-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--histora-shadow-lg), var(--histora-shadow-glow);
    position: relative;
    overflow: hidden;
}

.histora-logo__icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: histora-shimmer 3s infinite;
}

.histora-logo__icon svg {
    width: 40px;
    height: 40px;
    fill: var(--histora-accent);
    position: relative;
    z-index: 1;
}

.histora-logo__text {
    text-align: left;
}

.histora-logo__title {
    font-family: var(--histora-font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--histora-primary);
    letter-spacing: 0.15em;
    line-height: 1;
    margin: 0;
}

.histora-logo__subtitle {
    font-family: var(--histora-font-body);
    font-size: 0.75rem;
    color: var(--histora-text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: var(--histora-space-xs);
}

.histora-tagline {
    font-family: var(--histora-font-display);
    font-size: 1.125rem;
    font-style: italic;
    color: var(--histora-text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ================================
   Chat Window
   ================================ */
.histora-chat-window {
    flex: 1;
    background: var(--histora-surface);
    border-radius: var(--histora-radius-xl);
    box-shadow: var(--histora-shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 500px;
    max-height: 70vh;
    animation: histora-scaleIn 0.6s ease-out 0.3s both;
    border: 1px solid var(--histora-border-light);
}

/* Chat Messages Area */
.histora-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--histora-space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--histora-space-lg);
    scroll-behavior: smooth;
}

.histora-messages::-webkit-scrollbar {
    width: 6px;
}

.histora-messages::-webkit-scrollbar-track {
    background: transparent;
}

.histora-messages::-webkit-scrollbar-thumb {
    background: var(--histora-border);
    border-radius: var(--histora-radius-full);
}

.histora-messages::-webkit-scrollbar-thumb:hover {
    background: var(--histora-text-muted);
}

/* Welcome Message */
.histora-welcome {
    text-align: center;
    padding: var(--histora-space-2xl);
    animation: histora-fadeIn 0.8s ease-out;
}

.histora-welcome__emoji {
    font-size: 3rem;
    margin-bottom: var(--histora-space-md);
    animation: histora-float 3s ease-in-out infinite;
}

.histora-welcome__title {
    font-family: var(--histora-font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--histora-primary);
    margin-bottom: var(--histora-space-sm);
}

.histora-welcome__text {
    font-family: var(--histora-font-body);
    font-size: 1rem;
    color: var(--histora-text-secondary);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Message Bubbles */
.histora-message {
    display: flex;
    gap: var(--histora-space-md);
    animation: histora-slideIn 0.4s ease-out;
}

.histora-message--user {
    flex-direction: row-reverse;
}

.histora-message__avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--histora-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.histora-message--ai .histora-message__avatar {
    background: linear-gradient(135deg, var(--histora-primary) 0%, var(--histora-primary-light) 100%);
    color: var(--histora-accent);
    box-shadow: var(--histora-shadow-md);
}

.histora-message--user .histora-message__avatar {
    background: var(--histora-accent);
    color: var(--histora-primary-dark);
}

.histora-message__content {
    max-width: 75%;
    display: flex;
    flex-direction: column;
    gap: var(--histora-space-xs);
}

.histora-message__bubble {
    padding: var(--histora-space-md) var(--histora-space-lg);
    border-radius: var(--histora-radius-lg);
    font-family: var(--histora-font-body);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.histora-message--ai .histora-message__bubble {
    background: var(--histora-bg);
    color: var(--histora-text);
    border-bottom-left-radius: var(--histora-space-xs);
    border: 1px solid var(--histora-border-light);
}

.histora-message--user .histora-message__bubble {
    background: linear-gradient(135deg, var(--histora-primary) 0%, var(--histora-primary-light) 100%);
    color: #ffffff;
    border-bottom-right-radius: var(--histora-space-xs);
}

.histora-message__time {
    font-size: 0.75rem;
    color: var(--histora-text-muted);
    padding: 0 var(--histora-space-sm);
}

.histora-message--user .histora-message__time {
    text-align: right;
}

/* Message Content Formatting */
.histora-message__bubble p {
    margin: 0 0 var(--histora-space-sm);
}

.histora-message__bubble p:last-child {
    margin-bottom: 0;
}

.histora-message__bubble strong {
    font-weight: 600;
    color: var(--histora-primary);
}

.histora-message--user .histora-message__bubble strong {
    color: var(--histora-accent-light);
}

.histora-message__bubble em {
    font-style: italic;
}

.histora-message__bubble ul,
.histora-message__bubble ol {
    margin: var(--histora-space-sm) 0;
    padding-left: var(--histora-space-lg);
}

.histora-message__bubble li {
    margin-bottom: var(--histora-space-xs);
}

.histora-message__bubble code {
    background: rgba(26, 54, 93, 0.08);
    padding: 0.125rem 0.375rem;
    border-radius: var(--histora-radius-sm);
    font-size: 0.875em;
}

/* Sources/Citations */
.histora-sources {
    margin-top: var(--histora-space-md);
    padding: var(--histora-space-md);
    background: rgba(26, 54, 93, 0.04);
    border-radius: var(--histora-radius-md);
    border-left: 3px solid var(--histora-accent);
}

.histora-sources__title {
    font-family: var(--histora-font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--histora-primary);
    margin-bottom: var(--histora-space-sm);
    display: flex;
    align-items: center;
    gap: var(--histora-space-xs);
}

.histora-sources__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.histora-sources__item {
    font-size: 0.8125rem;
    color: var(--histora-text-secondary);
    padding: var(--histora-space-xs) 0;
    line-height: 1.5;
}

.histora-sources__item em {
    font-style: italic;
}

/* Typing Indicator */
.histora-typing {
    display: flex;
    align-items: center;
    gap: var(--histora-space-md);
    padding: var(--histora-space-md) var(--histora-space-lg);
    animation: histora-fadeIn 0.3s ease-out;
}

.histora-typing__avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--histora-radius-md);
    background: linear-gradient(135deg, var(--histora-primary) 0%, var(--histora-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--histora-accent);
    font-size: 1.25rem;
    box-shadow: var(--histora-shadow-md);
}

.histora-typing__dots {
    display: flex;
    gap: 4px;
    padding: var(--histora-space-md) var(--histora-space-lg);
    background: var(--histora-bg);
    border-radius: var(--histora-radius-lg);
    border-bottom-left-radius: var(--histora-space-xs);
}

.histora-typing__dot {
    width: 8px;
    height: 8px;
    background: var(--histora-primary);
    border-radius: 50%;
    animation: histora-typing 1.4s ease-in-out infinite;
}

.histora-typing__dot:nth-child(2) {
    animation-delay: 0.2s;
}

.histora-typing__dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* ================================
   Input Area
   ================================ */
.histora-input-area {
    padding: var(--histora-space-lg);
    background: var(--histora-surface);
    border-top: 1px solid var(--histora-border-light);
}

.histora-input-wrapper {
    display: flex;
    gap: var(--histora-space-md);
    align-items: flex-end;
}

.histora-input-field {
    flex: 1;
    position: relative;
}

.histora-input {
    width: 100%;
    padding: var(--histora-space-md) var(--histora-space-lg);
    font-family: var(--histora-font-body);
    font-size: 0.9375rem;
    color: var(--histora-text);
    background: var(--histora-bg);
    border: 2px solid transparent;
    border-radius: var(--histora-radius-lg);
    outline: none;
    resize: none;
    min-height: 52px;
    max-height: 150px;
    line-height: 1.5;
    transition: var(--histora-transition-base);
}

.histora-input::placeholder {
    color: var(--histora-text-muted);
}

.histora-input:focus {
    background: var(--histora-surface);
    border-color: var(--histora-primary);
    box-shadow: 0 0 0 4px rgba(26, 54, 93, 0.08);
}

.histora-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.histora-send-btn {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--histora-primary) 0%, var(--histora-primary-light) 100%);
    border: none;
    border-radius: var(--histora-radius-lg);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--histora-transition-base);
    flex-shrink: 0;
}

.histora-send-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--histora-shadow-lg);
}

.histora-send-btn:active:not(:disabled) {
    transform: translateY(0);
}

.histora-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.histora-send-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.histora-send-btn--loading svg {
    animation: histora-spin 1s linear infinite;
}

/* ================================
   Suggestions
   ================================ */
.histora-suggestions {
    padding: var(--histora-space-md) var(--histora-space-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--histora-space-sm);
    border-top: 1px solid var(--histora-border-light);
    background: rgba(248, 247, 244, 0.5);
}

.histora-suggestions__label {
    width: 100%;
    font-family: var(--histora-font-body);
    font-size: 0.75rem;
    color: var(--histora-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--histora-space-xs);
}

.histora-suggestion-btn {
    padding: var(--histora-space-sm) var(--histora-space-md);
    font-family: var(--histora-font-body);
    font-size: 0.8125rem;
    color: var(--histora-primary);
    background: var(--histora-surface);
    border: 1px solid var(--histora-border);
    border-radius: var(--histora-radius-full);
    cursor: pointer;
    transition: var(--histora-transition-fast);
    white-space: nowrap;
}

.histora-suggestion-btn:hover {
    background: var(--histora-primary);
    color: #ffffff;
    border-color: var(--histora-primary);
    transform: translateY(-1px);
}

/* ================================
   Floating Chat Widget
   ================================ */
.histora-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: var(--histora-font-body);
}

.histora-widget-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--histora-primary) 0%, var(--histora-primary-light) 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--histora-shadow-lg), var(--histora-shadow-glow);
    transition: var(--histora-transition-base);
    position: relative;
    overflow: hidden;
}

.histora-widget-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 70%
    );
    background-size: 200% 200%;
    animation: histora-shimmer 3s infinite;
}

.histora-widget-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--histora-shadow-xl), 0 0 50px rgba(201, 162, 39, 0.3);
}

.histora-widget-toggle svg {
    width: 28px;
    height: 28px;
    fill: var(--histora-accent);
    position: relative;
    z-index: 1;
    transition: var(--histora-transition-base);
}

.histora-widget-toggle--open svg {
    transform: rotate(90deg);
}

.histora-widget-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 400px;
    max-height: 600px;
    background: var(--histora-surface);
    border-radius: var(--histora-radius-xl);
    box-shadow: var(--histora-shadow-xl);
    overflow: hidden;
    display: none;
    animation: histora-scaleIn 0.3s ease-out;
    transform-origin: bottom right;
}

.histora-widget-popup--open {
    display: flex;
    flex-direction: column;
}

.histora-widget-header {
    padding: var(--histora-space-md) var(--histora-space-lg);
    background: linear-gradient(135deg, var(--histora-primary) 0%, var(--histora-primary-light) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: var(--histora-space-md);
}

.histora-widget-header__icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--histora-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.histora-widget-header__icon svg {
    width: 24px;
    height: 24px;
    fill: var(--histora-accent);
}

.histora-widget-header__info {
    flex: 1;
}

.histora-widget-header__title {
    font-family: var(--histora-font-display);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.histora-widget-header__status {
    font-size: 0.75rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: var(--histora-space-xs);
}

.histora-widget-header__status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: histora-pulse 2s infinite;
}

.histora-widget-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: var(--histora-radius-md);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--histora-transition-fast);
}

.histora-widget-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.histora-widget-close svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.histora-widget-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.histora-widget .histora-messages {
    min-height: 300px;
    max-height: 350px;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 768px) {
    .histora-chat-container {
        padding: var(--histora-space-md);
    }
    
    .histora-header {
        padding: var(--histora-space-lg) 0;
    }
    
    .histora-logo__title {
        font-size: 2rem;
    }
    
    .histora-logo__icon {
        width: 56px;
        height: 56px;
    }
    
    .histora-chat-window {
        min-height: 400px;
        max-height: 65vh;
        border-radius: var(--histora-radius-lg);
    }
    
    .histora-messages {
        padding: var(--histora-space-md);
    }
    
    .histora-message__content {
        max-width: 85%;
    }
    
    .histora-message__bubble {
        padding: var(--histora-space-sm) var(--histora-space-md);
    }
    
    .histora-widget {
        bottom: 16px;
        right: 16px;
    }
    
    .histora-widget-popup {
        width: calc(100vw - 32px);
        max-width: 400px;
        right: 0;
    }
    
    .histora-decoration {
        display: none;
    }
}

@media (max-width: 480px) {
    .histora-logo {
        flex-direction: column;
        text-align: center;
    }
    
    .histora-logo__text {
        text-align: center;
    }
    
    .histora-logo__title {
        font-size: 1.75rem;
    }
    
    .histora-tagline {
        font-size: 1rem;
    }
    
    .histora-widget-popup {
        bottom: 72px;
        max-height: calc(100vh - 100px);
    }
    
    .histora-suggestions {
        padding: var(--histora-space-sm) var(--histora-space-md);
    }
    
    .histora-suggestion-btn {
        font-size: 0.75rem;
        padding: var(--histora-space-xs) var(--histora-space-sm);
    }
}

/* ================================
   Dark Mode Support
   ================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --histora-bg: #1a1a1f;
        --histora-bg-alt: #22222a;
        --histora-surface: #2a2a35;
        --histora-text: #f0f0f2;
        --histora-text-secondary: #a0a0a8;
        --histora-text-muted: #707078;
        --histora-border: #3a3a45;
        --histora-border-light: #2f2f3a;
    }
    
    .histora-message--ai .histora-message__bubble {
        background: #2a2a35;
        border-color: var(--histora-border);
    }
    
    .histora-message--ai .histora-message__bubble strong {
        color: var(--histora-accent);
    }
    
    .histora-sources {
        background: rgba(201, 162, 39, 0.08);
    }
    
    .histora-input {
        background: #22222a;
    }
    
    .histora-input:focus {
        background: #2a2a35;
    }
    
    .histora-suggestion-btn {
        background: #2a2a35;
        border-color: var(--histora-border);
    }
}

/* ================================
   Print Styles
   ================================ */
@media print {
    .histora-widget,
    .histora-input-area,
    .histora-suggestions,
    .histora-decoration {
        display: none !important;
    }
    
    .histora-chat-window {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .histora-messages {
        max-height: none;
        overflow: visible;
    }
}

/* ================================
   Accessibility
   ================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.histora-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible styles */
.histora-input:focus-visible,
.histora-send-btn:focus-visible,
.histora-suggestion-btn:focus-visible,
.histora-widget-toggle:focus-visible {
    outline: 2px solid var(--histora-accent);
    outline-offset: 2px;
}
