/* Dodatkowe style dla czatu */
.message {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    max-width: 80%;
}

.user-message {
    background-color: #e3f2fd;
    color: #1565c0;
    margin-left: auto;
    width: fit-content;
    min-width: 100px;
}

.user-message p {
    margin: 0.5em 0;
}

.user-message pre {
    background-color: #e8f5e9;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0.5em 0;
}

.user-message code {
    background-color: #e8f5e9;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
}

.user-message ul, .user-message ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.user-message blockquote {
    border-left: 4px solid #81c784;
    margin: 0.5em 0;
    padding-left: 1em;
    color: #2e7d32;
}

.assistant-message {
    background-color: #f5f5f5;
    color: #424242;
    margin-right: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    width: fit-content;
    min-width: 100px;
}

.assistant-message p,
.assistant-message ul,
.assistant-message ol,
.assistant-message blockquote,
.assistant-message pre {
    margin: 0;
}

.assistant-message pre {
    background-color: #f8f9fa;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0.5em 0 0 0;
}

.assistant-message code {
    background-color: #f8f9fa;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
}

.assistant-message ul, .assistant-message ol {
    margin: 0.5em 0 0 0;
    padding-left: 1.5em;
}

.assistant-message blockquote {
    border-left: 4px solid #e0e0e0;
    margin: 0.5em 0 0 0;
    padding-left: 1em;
    color: #666;
}

/* Style dla trybu ciemnego */
.dark {
    background-color: #1a1a1a;
    color: #ffffff;
}

.dark .user-message {
    background-color: #1e3a8a;
    color: #ffffff;
    margin-left: auto;
    width: fit-content;
    min-width: 100px;
}

.dark .user-message pre,
.dark .user-message code {
    background-color: #1a237e;
}

.dark .user-message blockquote {
    border-left-color: #4caf50;
    color: #81c784;
}

.dark .assistant-message {
    background-color: #374151;
    color: #ffffff;
    width: fit-content;
    min-width: 100px;
}

.dark .bg-white {
    background-color: #2d3748;
}

.dark .text-gray-800 {
    color: #ffffff;
}

.dark .border-gray-700 {
    border-color: #4a5568;
}

.dark .bg-gray-100 {
    background-color: #1a202c;
}

.dark .bg-gray-800 {
    background-color: #2d3748;
}

.dark .text-gray-600 {
    color: #a0aec0;
}

.dark .assistant-message pre,
.dark .assistant-message code {
    background-color: #2d3748;
}

.dark .assistant-message blockquote {
    border-left-color: #4a5568;
    color: #a0aec0;
}

/* Animacja dla nowych wiadomości */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message {
    animation: fadeIn 0.3s ease-out;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#chatMessages {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.message {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    max-width: 80%;
}

.dark .user-message {
    background-color: #1e3a8a;
    color: #ffffff;
}

.dark .assistant-message {
    background-color: #374151;
    color: #ffffff;
}

/* Style dla pola wprowadzania wiadomości w trybie ciemnym */
.dark #messageInput {
    background-color: #374151 !important;
    border-color: #4B5563 !important;
    color: #ffffff !important;
}

/* Style dla przycisków w trybie ciemnym */
.dark #themeToggle,
.dark #helpButton,
.dark #userDropdownButton {
    background-color: #374151 !important;
    border-color: #4B5563 !important;
}

.dark #themeToggle:hover,
.dark #helpButton:hover,
.dark #userDropdownButton:hover {
    background-color: #4B5563 !important;
}

/* Style dla listy rozwijanej w trybie ciemnym */
.dark #userDropdown {
    background-color: #374151 !important;
    border-color: #4B5563 !important;
}

.dark #userDropdown a:hover {
    background-color: #4B5563 !important;
}

/* Style dla przycisków w trybie jasnym */
#themeToggle,
#helpButton,
#userDropdownButton {
    background-color: #f3f4f6 !important;
    border-color: #E5E7EB !important;
}

#themeToggle:hover,
#helpButton:hover,
#userDropdownButton:hover {
    background-color: #E5E7EB !important;
}

/* Style dla tooltipa */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background-color: #333;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    margin-top: 5px;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
}

/* Strzałka dla tooltipa */
[data-tooltip]:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

[data-tooltip]:hover:after {
    opacity: 1;
    visibility: visible;
}

/* Style dla trybu ciemnego */
.dark [data-tooltip]:before {
    background-color: #fff;
    color: #333;
}

.dark [data-tooltip]:after {
    border-color: transparent transparent #fff transparent;
}

/* Style dla listy rozwijanej w trybie jasnym */
#userDropdown {
    background-color: #f3f4f6 !important;
    border-color: #E5E7EB !important;
}

#userDropdown a:hover {
    background-color: #E5E7EB !important;
} 