/* Custom styles beyond Tailwind */

/* Arkivum brand colors */
:root {
    --arkivum-green: #00B67A;
    --arkivum-darkgreen: #009966;
    --arkivum-lightgreen: #E6F7F1;
    --arkivum-black: #1A1A1A;
    --arkivum-gray: #f3f4f6;
    --arkivum-darkgray: #4b5563;
}

/* Custom utility classes for Arkivum colors */
.bg-arkivum-green { background-color: var(--arkivum-green); }
.bg-arkivum-darkgreen { background-color: var(--arkivum-darkgreen); }
.bg-arkivum-lightgreen { background-color: var(--arkivum-lightgreen); }
.bg-arkivum-black { background-color: var(--arkivum-black); }
.bg-arkivum-gray { background-color: var(--arkivum-gray); }


.text-arkivum-green { color: var(--arkivum-green); }
.text-arkivum-darkgreen { color: var(--arkivum-darkgreen); }
.text-arkivum-darkgray { color: var(--arkivum-darkgray); }
.text-arkivum-white { color: white; }
.text-arkivum-black { color: var(--arkivum-black); }

.border-arkivum-green { border-color: var(--arkivum-green); }
.border-arkivum-darkgreen { border-color: var(--arkivum-darkgreen); }
.border-arkivum-lightgreen { border-color: var(--arkivum-lightgreen); }

/* Animation delay classes for the typing indicator */
.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-400 {
    animation-delay: 0.4s;
}

/* Custom scrollbar for chat messages */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: var(--arkivum-gray);
}

#chat-messages::-webkit-scrollbar-thumb {
    background: var(--arkivum-green);
    border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--arkivum-darkgreen);
}

/* Message animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.flex.justify-start > div,
.flex.justify-end > div {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Focus styles */
input:focus, button:focus {
    outline: 2px solid var(--arkivum-green);
    outline-offset: 2px;
}

/* Layout styles */
html, body {
    height: 100%;
}

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

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

/* Ensure the chat container takes up available space */
.max-w-6xl {
    height: calc(100vh - 180px); /* Adjusted for smaller header */
    min-height: 500px;
    margin-bottom: 1rem;
    width: 90%;
    max-width: 1200px;
}

/* Header styles */
header a {
    position: relative;
    font-weight: 400;
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
    border-radius: 3px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

header a:hover {
    background-color: rgba(0, 182, 122, 0.1);
}

/* Mobile menu transition */
#mobile-menu {
    transition: all 0.3s ease;
    border-bottom: 1px solid #333;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#mobile-menu a:hover {
    background-color: rgba(0, 182, 122, 0.1);
}

/* Header logo styling */
header img {
    filter: brightness(1.05);
    transition: all 0.3s ease;
}

header img:hover {
    filter: brightness(1.1);
}

/* Navigation link spacing for mobile */
@media (max-width: 768px) {
    #mobile-menu a {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 10px 0;
    }

    #mobile-menu a:last-child {
        border-bottom: none;
    }
}

/* Ensure enough space below sticky input */
.chat-messages {
    padding-bottom: 120px; /* Adjust based on input area height */
}