/* General styling */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    font-family: Ysabeau Infant, sans-serif;
}

body {
    background-color: #f9efe4;
    color: var(--dark);
    padding-top: 0;
    font-family: Ysabeau Infant, sans-serif;
    font-variant-ligatures: normal;
    font-variant: none;
    font-size: 20px;
    font-weight: 500;
    line-height: 2em
}

header.header {
    text-align: center;
    background-color: #e4d4c3;
    color: white;
    padding: 20px;
    font-family: Ysabeau Infant, sans-serif;
}

header.header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-family: Ysabeau Infant, sans-serif;
}

h1 {
    letter-spacing: -1px;
    margin-top: 0;
    margin-bottom: 0;
    font-family: Ysabeau Infant, sans-serif;
    font-size: 3rem;
    font-weight: 500;
    line-height: 110%;
    position: relative;
    color: #3a3a3a
}

h2 {
    margin-top: 0;
    margin-bottom: 0;
    font-family: Ysabeau Infant, sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 140%
}

header.header h2 {
    margin: 0;
    font-size: 2rem;
    font-family: Ysabeau Infant, sans-serif;
}

header.header .back-button {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 15px;
    font-size: 1rem;
    background-color: #ddcab5;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-family: Ysabeau Infant, sans-serif;
}

header.header .back-button:hover {
    background-color: #cab7a2;
    font-family: Ysabeau Infant, sans-serif;
}

/* Main container */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    font-family: Ysabeau Infant, sans-serif;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.form-row > div {
    display: flex;
    flex-direction: column;
}

.form-row > div:first-child {
    flex: 2;
    min-width: 220px;
}

.form-row > div:last-child {
    flex: 3;
    min-width: 260px;
}

#jobSearch,
#jobSelector {
    height: 50px;
    font-size: 1.1rem;
    box-sizing: border-box;
}

/* Option Section */
.option-section {
    text-align: center;
    margin-bottom: 20px;
    font-family: Ysabeau Infant, sans-serif;
}

.option-section h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-family: Ysabeau Infant, sans-serif;
}

.option-button {
    display: inline-block;
    margin: 5px 10px;
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #c7a073;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: Ysabeau Infant, sans-serif;
}

.option-button:hover {
    background-color: #ba9060;
}

/* Section Styling */

/* Section container styling */
.section {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px; /* Padding inside the section */
    background-color: #fbfbfb; /* Light background */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Initial box shadow */
    transition: all 0.3s ease; /* Smooth transition */
    font-family: "Ysabeau Infant", sans-serif; /* Use your font */
    text-align: center;

}

.section-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    max-width: 1000px;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.admin-wide {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
}

.search-container {
    display: flex; /* Align items in a row */
    gap: 10px; /* Add space between the input and button */
    align-items: center; /* Vertically align the items */
}

/* Hover effect for the section */
/* .section:hover { */
/*    background-color: #e6dac9; /* Slightly darker background on hover */
/*    transform: translateY(-5px); /* Lift effect */
/*    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Deeper shadow for a lifted look */

.hidden {
    display: none;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-family: Ysabeau Infant, sans-serif;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 5px;
    text-align: center;
    font-family: Ysabeau Infant, sans-serif;
    font-size: 1rem
    
}

table th {
    background-color: #c0a688;
    color: white;
    font-family: Ysabeau Infant, sans-serif;
    font-size:1rem;
}

table tr:nth-child(even) {
    background-color: #f2f2f2;
    font-size: 1rem;
    font-family: Ysabeau Infant, sans-serif;
}

table tr:nth-child(odd) {
    background-color: #f2f2f2;
    font-size: 1rem;
    font-family: Ysabeau Infant, sans-serif;
}

/* Buttons */
.button {
    padding: 10px 15px;
    font-size: 1rem;
    background-color:#ba9060;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: Ysabeau Infant, sans-serif;
    
}

.button:hover {
    background-color: #8e612a;
    font-family: Ysabeau Infant, sans-serif;
}


.sort-button {
    padding: 10px 15px;
    font-size: 1rem;
    background-color:#ba9060;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: Ysabeau Infant, sans-serif;
    
}

.sort-button:hover {
    background-color: #8e612a;
    font-family: Ysabeau Infant, sans-serif;
}


.centered-text {
    text-align: center;
    font-family: Ysabeau Infant, sans-serif;
}

/* Success message */
.response-message {
    font-size: 1.1rem;
    color: #482f35;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    font-family: Ysabeau Infant, sans-serif;
}

#downloadDocx {
    text-decoration: none;
    font-family: Ysabeau Infant, sans-serif;
}
#downloadDocx_S3 {
    text-decoration: none;
    font-family: Ysabeau Infant, sans-serif;
}

#downloadDocx:hover {
    text-decoration: underline; /* Optional: Adds underline on hover for better user feedback */
}
#downloadDoc_S3:hover {
    text-decoration: underline; /* Optional: Adds underline on hover for better user feedback */
}


#downloadAudio {
    text-decoration: none;
    font-family: Ysabeau Infant, sans-serif;
}

#downloadAudio:hover {
    text-decoration: underline; /* Optional: Adds underline on hover for better user feedback */
}

#downloadAudio_S3 {
    text-decoration: none;
    font-family: Ysabeau Infant, sans-serif;
}

#downloadAudio_S3:hover {
    text-decoration: underline; /* Optional: Adds underline on hover for better user feedback */
}

code {
    font-size: 20px; /* Makes the text larger */
    color: #d63384; /* Sets the text color (e.g., pinkish-red) */
    background-color: #f8f9fa; /* Optional: Adds a subtle background color */
    padding: 5px; /* Optional: Adds padding inside the <code> block */
    border-radius: 3px; /* Optional: Rounds the corners slightly */
    font-family: Ysabeau Infant, sans-serif;
}


.linkbutton {
    padding: 10px 15px;
    font-size: 1rem;
    background-color:#ba9060;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    font-family: Ysabeau Infant, sans-serif;
    
}

.linkbutton:hover {
    background-color: #8e612a;
    text-decoration: none;
}

.grid-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}



.save-row-button, .delete-button {
        padding: 10px 15px;
        font-size: 1rem;
        background-color:#ba9060;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.3s ease;
        font-family: Ysabeau Infant, sans-serif;   
    }
    
.save-row-button, .delete-button:hover {
        background-color: #8e612a;
    }
    

/* Buttons */
.button {
    padding: 10px 15px;
    font-size: 1rem;
    background-color:#ba9060;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: Ysabeau Infant, sans-serif;
    
}


.logout {
    padding: 5px 10px;
    font-size: 1rem;
    background-color:#ba9060;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: Ysabeau Infant, sans-serif;
    width: 120px;
    text-align: center;
    text-decoration:none;

}

.logout:hover {
    background-color: #ba9060; /*  on hover */
}


.changepass {
    padding: 10px 15px;
    font-size: 1rem;
    background-color:#ba9060;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: Ysabeau Infant, sans-serif;
    width: 120px;
    text-decoration:none;
    text-align: center

}

.logout:hover {
    background-color: #ba9060; /*  on hover */
}

.link {
    text-align: center;
    margin-top: 20px;
}
.link a {
    color: #b56f1e;
    text-decoration: none;
}
.link a:hover {
    text-decoration: underline;
}

.error {
    color: red;
    font-size: 14px;
    margin-bottom: 10px;
}
.success {
    color: green;
    font-size: 14px;
    margin-bottom: 10px;
}


/* Text box styling */
.edit-username, .edit-duration, .edit-duration, .edit-jobs, .edit-status,.edit-job-name,
.edit-user-class {
    width: 150px; /* Fixed width for all input boxes */
    height: 30px; /* Uniform height */
    box-sizing: border-box; /* Include padding and border in width/height */
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden; /* Prevent overflow */
    white-space: nowrap; /* Prevent text wrapping */
    text-overflow: ellipsis; /* Add ellipsis for overflowing text */
    font-family: Ysabeau Infant, sans-serif;
}

.edit-email {
    width: 250px; /* Fixed width for all input boxes */
    height: 30px; /* Uniform height */
    box-sizing: border-box; /* Include padding and border in width/height */
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden; /* Prevent overflow */
    white-space: nowrap; /* Prevent text wrapping */
    text-overflow: ellipsis; /* Add ellipsis for overflowing text */
    font-family: Ysabeau Infant, sans-serif;

}


.edit-username:focus,
.edit-email:focus,
.edit-user-class:focus {
    outline: none;
    border-color: #635052; /* Highlight border on focus */
    background-color: #f9f9f9;
    
}

.usertext {
    width: 100%; /* Fixed width for all input boxes */
    height: 40px; /* Uniform height */
    box-sizing: border-box; /* Include padding and border in width/height */
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden; /* Prevent overflow */
    white-space: nowrap; /* Prevent text wrapping */
    text-overflow: ellipsis; /* Add ellipsis for overflowing text */
    font-family: Ysabeau Infant, sans-serif;
    font-size: 1.5rem;
}


.usertext-short {
    font-family: Ysabeau Infant, sans-serif;
}

.usertext-select {
    font-family: Ysabeau Infant, sans-serif;
    width: 30%; /* Fixed width for all input boxes */
    height: 40px; /* Uniform height */
    padding: 5px;
    border: 1px solid #ddd;

}

/* Base Styling for Textarea */
textarea {
    width: 90%; /* Full-width textarea */
    padding: 10px;
    font-family: Ysabeau Infant, sans-serif;
    font-size: 1.5rem; /* Adjust font size */
    font-weight: normal; /* Adjust font weight (normal, bold, etc.) */
    line-height: 1.5; /* Adjust line spacing */
    color: #333; /* Text color */
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    resize: both; /* Allow vertical resizing only */
}

/* Styling for Focused Textarea */
textarea:focus {
    border-color: #635052;
    box-shadow: 0 0 5px rgba(187, 133, 145, 0.186);
    outline: none;
}

select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
}

select:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

/* Compact select for small dropdowns */
.compact-select select {
    width: auto;
    min-width: 140px;
    display: inline-block;
    font-family: inherit;
}

/* Inline layout for dropdown + buttons */
.inline-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.inline-row .form-group.inline {
    margin: 0;
}
.inline-row .button-row.inline {
    margin: 0;
    display: flex;
    gap: 10px;
}
.checkbox-inline.inline {
    margin: 0;
    display: flex;
    align-items: center;
}

/* Search-style input */
.search-bar .search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.search-bar input[type="url"] {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border-radius: 999px;
    border: 1px solid #ccc;
    font-size: 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}
.search-bar input[type="url"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 6px rgba(0, 123, 255, 0.3);
    outline: none;
}
.clear-input {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #888;
}
.clear-input:hover {
    color: #444;
}

.progress-wrap {
    position: relative;
    margin-top: 10px;
    height: 10px;
    background: #eee;
    border-radius: 999px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4caf50, #007bff);
    transition: width 0.3s ease;
}
.progress-label {
    position: absolute;
    top: -22px;
    right: 0;
    font-size: 12px;
    color: #555;
}



/* General list styling */
ul {
    list-style: none; /* Remove default bullets */
    padding: 0; /* Remove default padding */
    margin: 20px 0; /* Add some space above and below the list */
}

ul li {
    padding: 10px 15px; /* Add spacing inside the list items */
    margin-bottom: 8px; /* Add space between list items */
    background-color: #f9f1e9; /* Light background */
    border-radius: 5px; /* Slightly rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle box shadow */
    font-size: 1rem; /* Font size */
    color: #3a3a3a; /* Darker text color */
    display: flex; /* Align items nicely */
    align-items: center;
    gap: 10px; /* Add gap between bullet and text */
    font-family: "Ysabeau Infant", sans-serif; /* Use your font */
}

/* Custom bullet using a pseudo-element */
ul li::before {
    content: "●"; /* Custom bullet */
    color: #b98952; /* Bullet color */
    font-size: 1.2rem; /* Make the bullet slightly larger */
    display: inline-block;
    margin-right: 10px; /* Add spacing between bullet and text */
}

/* Hover effect */
ul li:hover {
    background-color: #e6dac9; /* Change background color on hover */
    transform: translateY(-2px); /* Slight lift effect */
    transition: all 0.3s ease; /* Smooth transition */
}


.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    font-family: Ysabeau Infant, sans-serif;

}

.pagination button {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    cursor: pointer;
    font-family: Ysabeau Infant, sans-serif;

}

.pagination button.active {
    background: #b48146;
    color: white;
    border-color: #b98952;
}


/* Basic styling for the dropdown button */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    padding: 12px 16px;
    border-radius: 5px;
}

/* Show the dropdown menu when the button is clicked */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Position dropdown upwards */
.dropdown-content-up {
    bottom: 100%; /* Move the dropdown above */
    left: 0;
    margin-bottom: 5px; /* Add a small gap between the button and the dropdown */
}
.sorted-asc::after {
    content: " ▲"; /* Up arrow for ascending */
}

.sorted-desc::after {
    content: " ▼"; /* Down arrow for descending */
}

/* @media screen and (max-width: 768px) {
    header.header h1 {
        font-size: 2rem;
    }

    .button {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    table th, table td {
        font-size: 0.9rem;
    }
} */

@media screen and (max-width: 480px) {
    header.header h1 {
        font-size: 1.8rem;
    }

    .button {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    table th, table td {
        font-size: 0.8rem;
    }
}


/* Mobile Styles for Screens Smaller Than 768px */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Adjust font size for readability */
    }

    .container {
        padding: 10px;
    }

    .header {
        text-align: center;
        padding: 10px;
    }

    .button {
        display: block;
        width: 100%; /* Make buttons full-width on mobile */
        margin: 10px 0;
        padding: 12px;
    }

    table {
        display: block;
        overflow-x: auto; /* Enable scrolling for wide tables */
        width: 100%;
    }

    th, td {
        font-size: 14px;
        text-align: left;
        padding: 8px;
        display: block; /* Stack table cells on mobile */
    }

    .form-container {
        padding: 15px;
    }

    .form-group {
        margin-bottom: 15px;
        display: flex;
        flex-direction: column;
    }

    input, textarea, select {
        width: 100%;
        padding: 10px;
        margin-top: 5px;
        font-size: 16px;
    }

    .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .pagination button {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}


/* ensure these sections sit above stray positioned siblings */
#downloadSection, #downloadInputSection {
  position: relative;
  z-index: 2;
}

/* make the links themselves establish a stacking context */
#downloadSection a.button, #downloadInputSection a.button {
  position: relative;
  z-index: 3;
}

/* only show/hide via .hidden class; keep disabled links visible but inactive */
a.button.disabled {
  opacity: .5;
  pointer-events: none;
  cursor: not-allowed;
}

/* ensure these sections sit above stray positioned siblings */
#downloadSection, #downloadInputSection {
  position: relative;
  z-index: 2;
}

/* make the links themselves establish a stacking context */
#downloadSection a.button, #downloadInputSection a.button {
  position: relative;
  z-index: 3;
}

/* only show/hide via .hidden class; keep disabled links visible but inactive */
a.button.disabled {
  opacity: .5;
  pointer-events: none;
  cursor: not-allowed;
}


/* FIX download links visibility + stacking */
#downloadSection, #downloadInputSection { position: relative; z-index: 2; }
#downloadSection a.button, #downloadInputSection a.button { position: relative; z-index: 3; }
a.button.disabled { opacity: .5; pointer-events: none; cursor: not-allowed; }

/* Correct IDs */
#downloadDocx_S3, #downloadAudio_S3 { text-decoration: none; }
#downloadDocx_S3:hover, #downloadAudio_S3:hover { text-decoration: underline; }

#gibberishIntro {
  margin-bottom: 12px;
  color: #4a4a4a;
  font-size: 1rem;
}

#gibberishList {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.gibberish-card {
  padding: 12px 16px;
  border: 1px solid #d7c6b5;
  border-radius: 8px;
  background-color: #fffaf5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.gibberish-headline {
  font-weight: 600;
  margin-bottom: 8px;
  color: #5b4636;
}

.gibberish-text {
  margin: 0 0 8px 0;
  padding-left: 12px;
  border-left: 3px solid #d7c6b5;
  font-style: normal;
  color: #3a3a3a;
}

.gibberish-highlight {
  font-weight: 700;
  color: #b0363e;
}

.gibberish-meta {
  font-size: 0.9rem;
  color: #6b6b6b;
  margin-bottom: 8px;
}

.gibberish-status {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #a96545;
}

.gibberish-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gibberish-actions small {
  color: #6b6b6b;
}

.button-secondary {
  background-color: #e8ded1;
  color: #4a4a4a;
  border: 1px solid #d7c6b5;
}

.button-secondary:hover {
  background-color: #d6c8b7;
}

.button-ghost {
  background-color: transparent;
  color: #5b4636;
  border: 1px solid #d7c6b5;
}

.button-ghost:hover {
  background-color: #f2e6db;
}

.gibberish-confirm {
  background-color: #c37b59;
  border-color: #c37b59;
  color: #fff;
}

.gibberish-confirm:hover {
  background-color: #a96545;
  border-color: #a96545;
}


.gibberish-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.gibberish-actions-inline {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gibberish-card .button {
    margin: 0;
}

#manualEditSection {
  text-align: left;
}

.selection-quick-actions {
  display: flex;
  gap: 0.5rem;
  padding: 6px 10px;
  background-color: #fffaf5;
  border: 1px solid #d7c6b5;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 10px;
}

.manual-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 12px 0;
  justify-content: flex-start;
}

.manual-table-wrapper {
  margin-top: 10px;
  overflow-x: auto;
}

#manualEditTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

#manualEditTable th,
#manualEditTable td {
  border: 1px solid #d7c6b5;
  padding: 8px;
  vertical-align: top;
  text-align: left;
}

#manualEditTable thead th {
  background-color: #f1e4d2;
  color: #4a3b2a;
  font-weight: 600;
}

#manualEditTable textarea.manual-original {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  font-family: inherit;
  font-size: 0.95rem;
}

#manualEditTable input.manual-replacement {
  width: 100%;
  font-size: 0.95rem;
  padding: 6px 8px;
  box-sizing: border-box;
}

.manual-submit-actions {
  margin-top: 12px;
  text-align: right;
}

.manual-message {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #5b4636;
  text-align: left;
}

.token-span {
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: inline-block;
  margin-right: 2px;
}

.token-span.token-playing {
  background-color: #d5f5e3;
}

.token-span.token-punct {
  cursor: default;
}

.token-span.token-low {
  color: #c0392b;
  font-weight: 700;
}

.token-span.token-perfect {
  color: #0b6cff;
  /* font-weight: 500; */
}

.token-span.token-search-hit {
  background-color: #f9e79f;
}

.token-span.token-search-current {
  background-color: #f4d03f;
}

.token-seg {
  display: block;
  margin-bottom: 6px;
}

.token-meta {
  font-weight: 700;
  color: #2c3e50;
}

#transcriptionText {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.audio-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.audio-controls-row audio {
  flex: 1 1 260px;
  min-width: 220px;
}
.audio-controls-row.compact {
  gap: 8px;
}
.waveform-times {
  margin-top: 6px;
  font-size: 0.95rem;
  color: #374151;
}

.waveform-container {
  width: 100%;
  height: 80px;
  background: #f5f7fa;
  border: 1px solid #d9dfe7;
  border-radius: 8px;
  overflow: hidden;
}

.waveform-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 0.95rem;
  color: #4b5563;
}

.waveform-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legend-block {
  display: inline-block;
  width: 16px;
  height: 10px;
  border-radius: 4px;
  margin-right: 6px;
}

.legend-keep {
  background: rgba(52, 211, 153, 0.5);
}

.legend-cut {
  background: rgba(11, 108, 255, 0.35);
}

.legend-deleted {
  background: rgba(239, 68, 68, 0.5);
}

.waveform-container {
  position: relative;
}

.waveform-ruler {
  width: 100%;
  display: block;
  border-top: 1px solid rgba(0,0,0,0.12);
  margin-top: 0;
  height: 26px;
}

.waveform-ruler {
  /* giúp chữ nét hơn trên canvas nền sáng */
  background: transparent;
}
