/* Stil general pentru container chat */
#gpt-chat-container {
    max-width: 600px;
    margin: 20px auto;
    border: 1px solid #ddd;
    padding: 15px;
    background: #fff;
    font-family: Arial, sans-serif;
}

/* Istoricul conversației */
#gpt-chat-history {
    height: 350px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    background: #f9f9f9;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Mesaje utilizator */
.user-msg {
    background: #d1e7dd;
    padding: 8px 12px;
    border-radius: 15px;
    margin: 5px 0;
    text-align: right;
}

/* Mesaje asistent */
.assistant-msg {
    background: #e2e3e5;
    padding: 8px 12px;
    border-radius: 15px;
    margin: 5px 0;
    text-align: left;
}

/* Mesaj "scrie..." */
.typing {
    font-style: italic;
    color: #666;
}

/* Formular chat */
#gpt-chat-form {
    display: flex;
    flex-direction: column;
}

/* Input text */
#gpt_message {
    padding: 10px;
    font-size: 16px;
    margin-bottom: 10px;
    border: 1px solid #bbb;
    border-radius: 5px;
}

/* Wrapper pentru input file custom */
.gpt-file-input-wrapper {
    position: relative;
    margin-bottom: 15px;
    width: 100%;
    height: 48px;
}

/* Ascundem input-ul de file original */
#gpt_image {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

/* Label-ul custom pentru input file */
.gpt-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid #bbb;
    border-radius: 6px;
    background: #6c757d;
    color: white;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.gpt-file-label:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Când un fișier este selectat */
#gpt_image:not(:placeholder-shown) + .gpt-file-label,
#gpt_image:valid + .gpt-file-label {
    background: #28a745;
}

#gpt_image:not(:placeholder-shown) + .gpt-file-label:hover,
#gpt_image:valid + .gpt-file-label:hover {
    background: #1e7e34;
}

/* Animație pentru mesajul de typing */
.typing {
    font-style: italic;
    color: #666;
    position: relative;
}

.typing::after {
    content: '...';
    animation: typing-dots 1.5s infinite;
    margin-left: 2px;
}

@keyframes typing-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

/* Animație pentru indicatorul de scriere */
.gpt-typing-indicator {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: #e2e3e5;
    border-radius: 15px;
    margin: 5px 0;
}

.gpt-typing-indicator::after {
    content: '';
    display: inline-flex;
    margin-left: 8px;
}

.gpt-typing-indicator .dot-1,
.gpt-typing-indicator .dot-2,
.gpt-typing-indicator .dot-3 {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #666;
    margin: 0 1px;
    animation: typing-pulse 1.4s infinite ease-in-out;
}

.gpt-typing-indicator .dot-2 {
    animation-delay: 0.2s;
}

.gpt-typing-indicator .dot-3 {
    animation-delay: 0.4s;
}

@keyframes typing-pulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Container pentru butoane */
#gpt-chat-buttons {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

/* Stil uniform pentru toate butoanele */
#gpt-chat-form button[type="submit"],
.gpt-contact-btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    min-width: 120px;
}

/* Buton submit */
#gpt-chat-form button[type="submit"] {
    background: #0d6efd;
}

/* Buton submit hover */
#gpt-chat-form button[type="submit"]:hover {
    background: #084cd9;
    transform: translateY(-1px);
}

/* Buton contact */
.gpt-contact-btn {
    background: #28a745;
}

/* Buton contact hover */
.gpt-contact-btn:hover {
    background: #1e7e34;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Progress bar upload documentație */
progress#gpt-doc-progress {
    height: 20px;
    border-radius: 5px;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    margin-top: 10px;
}

/* Firefox */
progress#gpt-doc-progress::-moz-progress-bar {
    background-color: #0d6efd;
    border-radius: 5px;
}

/* Chrome, Safari, Opera */
progress#gpt-doc-progress::-webkit-progress-bar {
    background-color: #eee;
    border-radius: 5px;
}
progress#gpt-doc-progress::-webkit-progress-value {
    background-color: #0d6efd;
    border-radius: 5px;
}
