﻿.chat-wrapper {
    width: 800px;
    display: flex;
    flex-direction: column;
}

h1 {
    text-align: center;
    color: #133e5e;
    margin-bottom: 10px;
}

.chat-container {
    margin: 10px;
    border-radius: 15px;
    background-color: #fff;
    height: 500px;
    overflow-y: auto;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    scroll-behavior: smooth;
    transition: height 0.2s ease;
}

.chat-input-container {
    display: flex;
    margin: 10px;
}

    .chat-input-container input {
        flex: 1;
        padding: 12px 15px;
        border-radius: 25px;
        border: 1px solid #ccc;
        font-size: 14px;
        margin-right: 5px;
    }

    .chat-input-container button {
        padding: 12px 18px;
        border-radius: 25px;
        border: none;
        background-color: #133e5e;
        color: #fff;
        cursor: pointer;
        font-weight: bold;
        transition: background 0.2s;
    }

        .chat-input-container button:hover {
            background-color: #0f2d45;
        }

.message {
    margin: 10px;
    white-space: pre-line;
    max-width: 70%;
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 20px;
    word-wrap: break-word;
    clear: both;
    animation: fadeIn 0.2s ease-in;
}

    .message.user {
        background-color: #133e5e;
        color: white;
        float: right;
        border-bottom-right-radius: 0;
    }

    .message.system {
        background-color: #e5e5ea;
        color: black;
        float: left;
        border-bottom-left-radius: 0;
    }

.timestamp {
    display: block;
    font-size: 0.75em;
    color: gray;
    margin-top: 3px;
}

#typingIndicator {
    background-color: #e5e5ea;
    color: black;
    float: left;
    border-radius: 15px;
    padding: 10px 15px;
    margin: 5px 0;
    max-width: 50%;
    clear: both;
    font-style: italic;
}

.dot {
    animation: blink 1s infinite;
}

    .dot:nth-child(1) {
        animation-delay: 0s;
    }

    .dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes blink {
    0%, 50%, 100% {
        opacity: 0;
    }

    25%, 75% {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 450px) {
    .chat-wrapper {
        width: 95%;
    }

    .chat-input-container input {
        font-size: 13px;
    }

    .chat-input-container button {
        font-size: 14px;
        padding: 10px 15px;
    }
}

/* Fullscreen on mobile */
@media (max-width: 768px) {
    /* Mobile adjustments */
    h1 {
        font-size: 1.5em;
        margin-bottom: 5px;
        text-align: center;
    }

    .chat-wrapper {
        display: flex;
        flex-direction: column;
        height: 100vh; /* full viewport */
        width: 100vw; /* full viewport */
    }

    .chat-container {
        flex: 1; /* takes remaining space */
        overflow-y: auto;
        padding: 10px;
        box-sizing: border-box;
    }

    .chat-input-container {
        margin-top: auto;
        display: flex;
    }

        .chat-input-container input {
            font-size: 14px;
            padding: 10px;
        }

        .chat-input-container button {
            font-size: 14px;
            padding: 10px 15px;
        }
}

#attachBtn {
    background-color: transparent;
    color: #133e5e;
    font-size: 20px;
    border: none;
    cursor: pointer;
    padding: 0 10px;
}

    #attachBtn:hover {
        color: #0f2d45;
    }

.chat-image {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 5px;
}

.chat-click {
    display: inline-block;
    background-color: #133e5e; /* NextLegal hoofdkleur */
    color: #ffffff;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 2px 0;
}

    .chat-click:hover {
        background-color: #0f2d45; /* Donkerdere tint bij hover */
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .chat-click:active {
        transform: translateY(0);
        box-shadow: none;
    }

    .chat-click::after {
        content: " 📄"; /* Klein document-icoontje */
        font-size: 0.9em;
    }



/* Container met sidebar + chat */
.layout-container {
    display: flex;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

/* Sidebar links */
.sidebar {
    width: 400px;
    background: #133e5e;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 15px;
    box-sizing: border-box;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

    .sidebar-header h2 {
        margin: 0;
        font-size: 18px;
    }

#newConversationBtn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background-color: #fff;
    color: #133e5e;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

    #newConversationBtn:hover {
        background-color: #e5e5ea;
    }

/* Lijst met gesprekken */
.conversation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

    .conversation-item:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .conversation-item span {
        flex: 1;
    }

.delete-btn {
    background: transparent;
    border: none;
    color: #ffb3b3;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
}

    .delete-btn:hover {
        color: red;
    }

/* Mobiel: sidebar wordt boven chat geplaatst */
@media (max-width: 768px) {
    .layout-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
    }
}