/* static/style.css (v14.2 - Final Font Fix) */

:root {
    --primary-red: #da2b26;
    --secondary-gray: #4A5568;
    --light-gray: #F7FAFC;
    --background-color: #F8F9FA;
    --text-color: #2D3748;
    --text-color-light: #5A677B;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --border-color: #E2E8F0;
}

/* --- Base & Mobile-First Styles --- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 15px;
    box-sizing: border-box;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.logo-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.header-logo {
    max-width: 220px;
    height: auto;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}

#upload-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

#upload-form input[type=file] { display: none; }

#file-name {
    flex-basis: 100%;
    text-align: center;
    color: #718096;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    order: 2;
    margin-top: 10px;
    font-size: 0.9rem;
}

#upload-form .btn-secondary,
#upload-form .btn-primary {
    flex-grow: 1;
}
#upload-form .btn-secondary { order: 1; }
#upload-form .btn-primary { order: 3; }


.analysis-status { text-align: center; margin-top: 15px; font-weight: 500; color: var(--primary-red); }
.video-preview-container { margin-top: 20px; background-color: #000; border-radius: 8px; overflow: hidden; }
#video-preview { width: 100%; max-height: 250px; display: block; }

.btn {
    padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 0.9rem;
    cursor: pointer; transition: all .2s ease-in-out; display: flex;
    align-items: center; justify-content: center; gap: 8px; border: none;
}
.btn-primary { background-color: var(--primary-red); color: white; }
.btn-primary:hover { background-color: #B92B31; }
.btn-secondary { background-color: var(--secondary-gray); color: white; }
.btn-secondary:hover { background-color: #2D3748; }

.section-heading {
    text-align: center; font-weight: 500; color: var(--text-color-light);
    margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1.5px;
    font-size: 1rem;
}
.section-heading::after {
    content: ''; display: block; width: 30px; height: 3px;
    background-color: var(--primary-red); margin: 8px auto 0; border-radius: 2px;
}

.report-card { background: var(--primary-red); color: white; padding: 25px; text-align: center; }
.report-card h3 { font-weight: 500; margin: 15px 0 15px 0; font-size: 1rem; opacity: 0.9; }
.emotion-pill { display: inline-block; background: white; color: var(--primary-red); padding: 10px 20px; border-radius: 50px; font-weight: 600; font-size: 1rem; margin-bottom: 20px; text-transform: uppercase; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.report-details p { margin: 10px 0; font-size: 0.95rem; font-weight: 500; }
.report-buttons-container { margin-top: 25px; display: flex; flex-direction: column; gap: 10px; }
.report-action-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.4); color: #fff;
    padding: 12px 20px; border-radius: 8px; font-weight: 500; cursor: pointer; transition: background-color 0.2s; text-decoration: none;
    font-family: inherit; /* <-- THIS IS THE FONT FIX for the <button> element */
}
.report-action-btn:hover { background: rgba(255, 255, 255, 0.4); }
.report-action-btn:disabled { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.5); cursor: not-allowed; }
.report-action-btn .material-icons { font-size: 1.2rem; }

/* --- Styles for Video Generation Output Area --- */
#video-generation-output {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(0,0,0,0.1);
    border-radius: 8px;
    text-align: center;
}
#video-generation-output p {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 500;
}
.processed-video-wrapper {
    margin-bottom: 15px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}
.processed-video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
}
#video-generation-output .loader {
    border-top: 4px solid #fff;
    margin-bottom: 10px;
}
.progress-container {
    width: 100%;
    background-color: #4a4a4a; /* Darker grey background */
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden; /* Ensures the inner bar has rounded corners */
    border: 1px solid #666;
}

.progress-bar {
    width: 0%;
    height: 24px;
    background-color: #F8F9FA; /* Bootstrap blue */
    text-align: center;
    line-height: 24px;
    color: black;
    font-weight: bold;
    font-size: 14px;
    transition: width 0.4s ease-in-out; /* Smooth animation */
    white-space: nowrap;
}

#progress-status {
    color: #e0e0e0;
    font-size: 14px;
    margin-bottom: 5px;
    text-align: center;
}

.error-text {
    color: #ff8a8a;
    font-weight: bold;
    text-align: center;
}

.traceback-text {
    color: #ffdddd;
    text-align: left;
    font-size: 12px;
    white-space: pre-wrap;
    background-color: #333;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.processed-video-wrapper {
    margin-top: 15px;
}

.processed-video-wrapper video {
    width: 100%;
    max-width: 640px;
    height: auto;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}
/* --- END Video Styles --- */


#chat-card { border-top: 3px solid var(--primary-red); padding-top: 5px; }
#chat-box { height: 250px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: 8px; padding: 15px; margin-bottom: 15px; background-color: var(--light-gray); display: flex; flex-direction: column; }
.message { margin-bottom: 15px; display: flex; flex-direction: column; max-width: 90%; }
.message p { padding: 10px 15px; border-radius: 18px; margin: 0; line-height: 1.5; word-wrap: break-word; font-size: 0.9rem; }
.user-message { align-items: flex-end; align-self: flex-end; }
.user-message p { background-color: var(--primary-red); color: white; border-bottom-right-radius: 4px; }
.bot-message { align-items: flex-start; align-self: flex-start; }
.bot-message p { background-color: #E2E8F0; color: #2D3748; border-bottom-left-radius: 4px; }
.bot-message.thinking p { font-style: italic; color: #718096;}
.chat-input-area { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-color); border-radius: 12px; padding: 5px; }
.btn-icon.attachment-btn { background-color: var(--secondary-gray); color: white; border-radius: 8px; border: none; padding: 10px; }
.btn-icon.attachment-btn .material-icons { font-size: 20px; }
#chat-input { flex-grow: 1; border: none; padding: 10px; font-size: 1rem; background-color: transparent; }
#chat-input:focus { outline: none; box-shadow: none; }
.send-btn, #chat-action-button { background-color: var(--primary-red); color: white; border-radius: 8px; border: none; font-weight: 500; padding: 10px 20px; }
#chat-action-button.stop-button { background-color: #E53E3E; }
.attachment-name { display: block; text-align: center; font-size: .8rem; color: #718096; margin-top: 5px; height: 1.2em; }
.loader{border:4px solid #f3f3f3;border-top:4px solid var(--primary-red);border-radius:50%;width:30px;height:30px;animation:spin 1s linear infinite;margin:20px auto 0}
@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}

@media (min-width: 768px) {
    body { padding: 40px; }
    .container { max-width: 700px; }
    .header-logo { max-width: 250px; }
    .card { padding: 25px; }
    #upload-form { flex-wrap: nowrap; }
    #file-name { order: 0; width: auto; margin-top: 0; }
    #upload-form .btn-secondary, #upload-form .btn-primary { flex-grow: 0; order: 0; }
    .btn { padding: 12px 24px; font-size: 1rem; }
    #video-preview { max-height: 350px; }
    .report-buttons-container { flex-direction: row; justify-content: center; gap: 15px; flex-wrap: wrap; }
    .report-action-btn { width: auto; }
    #chat-box { height: 350px; }
    .message p { font-size: 1rem; }
}

@media (min-width: 992px) {
    .container { max-width: 800px; }
    .header-logo { max-width: 300px; }
}

.disclaimer-text {
    font-size: 0.75rem; /* Makes the font smaller */
    color: var(--text-color-light); /* Uses the light grey text color variable */
    text-align: center;
    margin-top: 15px; /* Adds space between the form and the disclaimer */
    margin-bottom: 0;
    padding: 0 10px; /* Adds some side padding on small screens */
    font-style: italic;
}

