﻿.chat-header {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 10px auto;
    padding: 10px 0;
    display: flex;
    justify-content: flex-start;
}

.chat-wrapper {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 180px) !important;
    width: 100% !important;
    max-width: 1000px !important;
    margin: 0 auto !important;
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fafafa;
    border-radius: 14px 14px 0 0;
}

/* hide the real file input */
.file-hidden {
    display: none;
}

/* wrapper so the button aligns properly */
.attach-wrapper {
    display: flex;
    align-items: center;
}

/* ChatGPT-style round + button */
.attach-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #d3d3d3;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

    .attach-btn:hover {
        background: #f0f0f0;
        border-color: #bdbdbd;
    }

    .attach-btn:active {
        background: #e5e5e5;
    }

.model-dropdown {
    border: 1px solid #d3d3d3;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    outline: none;
}

    .model-dropdown:focus {
        border-color: #6ea8ff;
    }

/* Loader inside send button */
.loader {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spinBtn 0.8s linear infinite;
}

@keyframes spinBtn {
    to {
        transform: rotate(360deg);
    }
}

/* the + icon matches ChatGPT font weight + spacing */
.plus-icon {
    font-size: 20px;
    font-weight: 300;
    color: #555;
    line-height: 0;
    display: block;
    margin-top: -2px; /* aligns exactly like ChatGPT */
}

.img-upload {
    margin-right: 10px;
}

.img-preview {
    max-height: 120px;
    max-width: 120px;
    border-radius: 8px;
    margin-right: 10px;
}

.search-toggle {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    gap: 8px;
    font-size: 14px;
}

.message {
    display: flex;
    margin-bottom: 20px;
    width: 100%;
}

    .message.user {
        justify-content: flex-end;
    }

    .message.assistant {
        justify-content: flex-start;
    }

.msg-bubble {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 15px;
    white-space: pre-wrap;
}

/* assistant style */
.message.assistant .msg-bubble {
    background: #f7f7f8;
    color: #000;
    border: 1px solid #e8e8ea;
}

/* user style */
.message.user .msg-bubble {
    background: #0159ff;
    color: white;
    border-radius: 12px;
}

/* input bar */
.input-bar {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
    border-top: 1px solid #e0e0e0;
    background: white;
    position: sticky;
    bottom: 0;
}

.chat-input {
    flex: 1;
    resize: none;
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid #d3d3d3;
    min-height: 50px;
    font-size: 15px;
    outline: none;
}

    .chat-input:focus {
        border-color: #6ea8ff;
    }

.send-btn {
    background: #0159ff;
    border: none;
    padding: 0 22px;
    height: 44px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

    .send-btn:disabled {
        opacity: .6;
        cursor: not-allowed;
    }
