/* =================================== */
/* Dark Theme Styles                   */
/* =================================== */

body {
    background-color: #121212; /* A very dark gray, less harsh than black */
    color: #e0e0e0;            /* A soft white for body text */
    max-width: 1280px;
}

hr {
    border: 0;                /* Remove the default 3D-effect border */
    height: 2px;              /* Set the thickness of the line */
    background-color: #004d40;   /* Set the line color (a medium gray) */
}

/* Make headings pure white to stand out */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
}

/* Make links a readable light blue */
a {
    color: #8ab4f8;
}

a:visited {
    color: #8ab4f8;
}

/* Optional: Add a hover effect for better interactivity */
a:hover {
    color: #a9c7f9; /* A slightly brighter blue */
}

/* Style for containers like the upload form */
.upload-form {
    background-color: #1e1e1e;
    max-width: 600px;         /* Sets the form's maximum width. Adjust as needed. */
    margin: 2rem auto;        /* Centers the form horizontally and adds vertical space. */
    padding: 2rem;            /* Adds space inside the form box. */
    border: 1px solid #ddd;   /* Adds a light gray border. */
    border-radius: 5px;       /* Rounds the corners of the border. */
    font-weight: bold;
}

/* Style for the clickable file list */
.clickable-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.clickable-list .file-item {
    padding: 0.75rem;
    border: 1px solid #ddd; /* This sets the color */
    margin-bottom: -1px;
    background-color: #1e1e1e;

}
.clickable-list .file-item:hover {
    background-color: #333;
}
.clickable-list .file-item.active {
    background-color: #0d47a1; /* A deep blue for the active item */
    border-color: #8ab4f8;
}

.remove-file-btn {
    margin-left: 15px;
    padding: 2px 8px;
    font-size: 1rem;
    font-weight: bold;
    color: #999;
    background-color: transparent;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.remove-file-btn:hover {
    color: #000;
    background-color: #f0f0f0;
}

/* Dark theme for tables */
table, th, td {
    border-color: #444;
}

.time-column {
    width: 140px; /* Adjust this value as needed */
}


/* Dark theme for buttons */
button, .process-button {
    background-color: #004d40; /* A dark teal */
    color: #ffffff;
    border-color: #004d40;
    padding: 1.5rem; 
    font-weight: bold;
    font-size: 1.8rem;
}
button:hover, .process-button:hover {
    background-color: #00695c; /* A slightly lighter teal for hover */
    border-color: #00695c;
}

.review-container {
    display: flex;
    gap: 2rem; 
}

.left-column {
    flex: 1; 
}

.right-column {
    flex: 3; 
}

.word-toggle {
    cursor: pointer;
}

.word-toggle.censored {
    color: #d32f2f;
    text-decoration: line-through;
}

s {
    color: #d32f2f;
    text-decoration: line-through;
}

footer {
    text-align: center;    
    margin-top: 4rem;       
    padding-bottom: 2rem;   
}

footer p {
    color: #888; 
}

/* =================================== */
/* Loading Overlay Styles              */
/* =================================== */
#loading-overlay {
    position: fixed; /* This is the key property that lifts it over the page */
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(18, 18, 18, 0.85);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-box {
    text-align: center;
    padding: 2rem 3rem;
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 5px;
}

/* A simple class to hide the overlay by default */
#loading-overlay.hidden {
    display: none;
}

.btn-secondary {
    display: block; /* Make the link behave like a block for styling */
    text-align: center;
    text-decoration: none;
    margin-top: 1rem;
    padding: 0.75rem; /* Make padding a bit smaller than the main button */
    border-radius: 5px;
    font-weight: bold;
    background-color: transparent;
    border: 2px solid #004d40;
    color: #004d40;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-secondary:hover {
    background-color: #004d40; /* Fill in the color on hover */
    color: #ffffff;
}

.btn-browse {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border-radius: 5px;
    background-color: #555;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    border: 1px solid #666;
    margin-bottom: 1rem;
}
.btn-browse:hover {
    background-color: #666;
}

/* Visual feedback for when a user drags a file over the form */
.upload-form.drag-over {
    border-color: #8ab4f8; /* A light blue to indicate a valid drop zone */
    background-color: #2a2a2a;
}

/* --- Collapsible Advanced Options --- */
.collapsible {
    margin: 1.5rem 0;
}

.collapsible-toggle {
    background-color: #1e1e1e; /* Matches upload form background */
    color: #e0e0e0;            /* Soft white text color */
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: 1px solid #444;    /* Subtle border color */
    text-align: left;
    outline: none;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.collapsible-toggle:hover {
    background-color: #333; /* Slightly lighter on hover */
}

.collapsible-toggle.active {
    background-color: #004d40; /* Teal accent color when active */
    color: #ffffff;
    border-color: #00695c;
}

.collapsible-toggle:after {
    content: '';
    float: right;
    margin-left: 5px; /* Increased margin */
    width: 1em;     /* Increased size */
    height: 1em;    /* Increased size */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23888'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s;
}

.collapsible-toggle.active:after {
    transform: rotate(180deg); /* Point up */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.collapsible-content {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    background-color: transparent; /* Makes content area blend in */
    border: 1px solid #444;
    border-top: none;
    border-radius: 0 0 4px 4px;
}

.collapsible-content p {
    margin-top: 1rem;
    color: #aaa; /* Lighter text for description */
}

.collapsible-content textarea {
    width: 100%;
    box-sizing: border-box;
    background-color: #121212;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 0.5rem;
}

.collapsible-content label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.untranscribed-warning {
    color: #ffcc00; /* A gold/yellow color for warnings */
    font-style: italic;
}

/* .recovered-word {color: #86d0dd;} */

/* This existing rule will correctly override the color when a recovered word is censored */
.word-toggle.censored {
    color: #d32f2f;
    text-decoration: line-through;
}

/* Styles for Methodology Page */
/* ------------------------- */
.methodology-card {
    background-color: #1e1e1e; /* Darker background for the card */
    border: 2px solid #444;    /* Subtle border */
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.methodology-card h4 {
    color: #00695c; /* Highlight card titles with a readable accent color */
    margin-top: 0;
    margin-bottom: 0.75rem;
}
.methodology-card p {
    color: #e0e0e0; /* Consistent text color */
    line-height: 1.6;
}



/* =================================== */
/* Code Block Formatting               */
/* =================================== */

pre {
  background-color: #1e1e1e; /* Matches your dark card/form background */
  color: #e0e0e0;            /* Soft white text for readability */
  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
  padding: 1.5rem;
  border: 1px solid #444;    /* Subtle border, same as your tables */
  border-radius: 8px;        /* Rounded corners */
  overflow-x: auto;          /* Adds a scrollbar if code is too wide */
}

/* Ensures the <code> tag inside <pre> inherits the correct font */
pre code {
  font-family: inherit;
  background: none; /* Prevents nested backgrounds */
  padding: 0;
}

/* Style for inline <code> snippets (outside of <pre> blocks) */
code {
  background-color: #004d40; /* Dark teal accent color */
  color: #ffffff;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 85%;
}

details {
  border: 1px solid #004d40;
  border-radius: 4px;
  padding: 0.5rem;
  margin: 1rem 0;
}

summary {
  font-weight: bold;
  cursor: pointer; /* Changes the mouse to a pointer on hover */
  outline: none; /* Removes the focus outline on some browsers */
}

/* Optional: Style for the list inside */
details ul {
  margin-top: 0.5rem;
  margin-bottom: 0;
}