/* General Body and Font Styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}
sup {
    font-size: 0.75em;
    vertical-align: super;
    color: #0014FF;
}

@font-face {
    font-family: 'Poppins';
    src: url('./assets/fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('./assets/fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

/* Theme variables */
.light-theme {
    --background-color: #FAFAFA;
    --text-color: #0f1044c0;
    --panel-background: #FFF;
    --title-background: rgba(15, 16, 68, 0.03);
    --button-color: #0014FF;
    --navbar-background: white;
}

.dark-theme {
    --background-color: #121212;
    --text-color: #FFFFFF;
    --panel-background: #1E1E1E;
    --title-background: rgba(255, 255, 255, 0.05);
    --button-color: #0F1044;
    --navbar-background: #1E1E1E;
}

/* Apply theme variables */
.app {
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

h3 {
    color: var(--text-color);
    font-size: 0.875rem;
    font-style: bold;
    font-weight: 700;
    line-height: normal;
}

.left-panel input {    
    width: 30%; /* Ensure input fields take full width */
    padding: 0.55rem;
    margin: 5px 20px 0 0;
    border: 1px solid #ccc;
    border-radius: 5rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--button-color);
    outline: none;
}

/* Navbar Styles */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--navbar-background);
    height: 4rem;
    flex-shrink: 0;
    padding: 0 1rem;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
    height: 1.5rem;
    margin-right: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}


/* Main Container for Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--background-color);
    padding: 2rem;
}

/* Panel that holds the form and media */
.login-panel {
    display: flex;
    width: 100%;
    max-width: 70%;
    min-height: 80%;
    background-color: var(--panel-background);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Company Logo */
.company-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 500px; /* Adjust size as needed */
    max-height: 500px; /* Adjust size as needed */
    mix-blend-mode: luminosity;
    z-index: 1;
}

/* Versioning */
.version-number {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: bold;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    background-color: white;
    border-radius: 25px;
    padding: 2px;
    z-index: 1;
}

/* Form Section */
.form-section {
    flex: 0.7;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Centers the form vertically */
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

.form-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers form content vertically */
    align-items: center;
    width: 100%;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.input-group {
    width: 50%; /* Set width to 50% */
    margin: 0 auto 1.5rem; /* Center the input group */
}

.input-field {    
    width: 100%; /* Ensure input fields take full width */    
    border: 1px solid #ccc;
    border-radius: 5rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-field:focus {
    border-color: var(--button-color);
    outline: none;
}

/* Submit Button */
.submit-button {
    width: 100%; /* Make button responsive */
    max-width: 600px; /* Set a maximum width */
    padding: 0.75rem;
    background-color: var(--button-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 5rem;
    cursor: pointer;
    transition: background-color 0.3s;    
}

.submit-button:hover {
    background-color: #0010cc;
}

/* Disabled button styling */
.submit-button:disabled {
    background-color: #cccccc;  /* Gray out the button */
    color: #666666;             /* Lighten the text color */
    cursor: not-allowed;        /* Show "not-allowed" cursor */
    opacity: 0.6;               /* Make the button slightly transparent */
}

/* Media Section */
.media-section {
    flex: 1;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative; /* Added to allow absolute positioning of the logo */
    background-color: white;
    box-sizing: border-box;
}

.media-content {
    width: 100%;  /* Ensures the video takes the full width of the container */
    height: 100%; /* Ensures the video takes the full height of the container */
    object-fit: cover; /* Ensures the video covers the entire area without distortion */
    border-radius: 7rem 1rem 1rem 0rem;
    position: absolute; /* Ensure the video is positioned absolutely */
    top: 0;
    left: 0;
    z-index: 0; /* Ensure the video is behind the logo */
}

/* Terms and Conditions */
.terms-and-conditions {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-color);
    font-size: 0.875rem;
}

.terms-and-conditions a {
    color: var(--button-color);
    text-decoration: none;
    font-weight: 500;
}

.terms-and-conditions a:hover {
    text-decoration: underline;
}


/* Error Message */
.error-message {
    color: #e4000049;
    margin-top: 1rem;
}

/* Panel Container */
.content {
    flex: 1 1 auto;
    display: flex;
    overflow: hidden;
    padding: 2rem 2rem 2rem 2rem;
}



/* Panel Styles */
.left-panel, .right-panel, .middle-panel {
    border-radius: 0.9375rem;
    box-shadow: 0px 6px 16px 0px rgba(15, 16, 68, 0.16);
    box-sizing: border-box;
    margin: 0 1rem;
    position: relative;
    background-color: var(--panel-background);
    overflow-y: auto;
}

.left-panel, .right-panel {
    flex: 1;
    min-width: 18%;
    max-width: 18%;
}


/* Blueprint Selector Styles */
.blueprint-selector {
    padding: 1rem;
    margin-top: 2rem;
}

.blueprint-selector select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
    font-size: 1rem;
    background-color: var(--panel-background);
    color: var(--text-color);
    transition: border-color 0.3s;
}

.blueprint-selector select:focus {
    border-color: var(--button-color);
    outline: none;
}

/* Pattern Container */
.pattern-container {
    padding: 1rem;
    margin-top: 1rem;
    background: var(--background-secondary);
}

.thread {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 25px;
}

.thread-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 10px; /* Adjust the gap as needed */
}

.nuance {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.thread input[type="text"] {
    flex: 8;
}

.thread input[type="number"] {
    flex: 2;
}

.nuance input[type="text"] {
    flex: 8;
}

.nuance input[type="number"] {
    flex: 2;
}


.remove-button {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0 5px;
}
.remove-button:hover {
    color: #ff0000;
}

/* Middle Panel Styles */
.middle-panel {
    flex: 6;
    border: 1px solid rgba(15, 16, 68, 0.15);
    margin: 0 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.section-title {
    font-size: 0.875rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 1.5rem 0 auto;
}

/* Settings Container */
#settings-container {
    padding: 0 1rem 0 1rem;    
    overflow-y: auto; /* Allows scrolling if content is too tall */
    width: 95%;
    margin: auto;
}

.toolbar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: auto;
    margin-bottom: 1.5rem; /* Added margin-bottom */
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}


.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-text {
    font-size: 0.875rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    padding: 0 4px;
}

.toggle-slider .slider-button {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #2196F3;
}

.toggle-switch input:checked + .toggle-slider .slider-button {
    transform: translateX(30px);
}

.seek-button {
    margin-left: auto;
}

button.enabled {
    cursor: pointer;
    opacity: 1;
}

button.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

/* Replace pseudo-element with actual element */
.slider-button {
    position: absolute;
    height: 22px;
    width: 22px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    left: 4px;
}

.toggle-switch input:checked + .toggle-slider .slider-button {
    transform: translateX(30px);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #0010cc;
}


.toggle-text {
    font-size: 0.9375rem;
}

.gradient-slider{
    display: flex;
    margin: 0 15px;
    align-items: center;
}

.toggle-sign{
    margin: 0 15px 0 0;
    border-radius: 35px;
}

.slider-container {
    display: flex;
    align-items: center;
}

.slider-label {
    margin: 0 10px;
}


/* Evidence Container */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header button {
    background-color: #008000;
    margin: 0 1.5rem 0 0;
}

/* File Display Area */
#file-display {
    padding: 1rem;
    flex: 0 0 auto; /* Allow the area to take only necessary height */
    overflow-y: auto; /* Add vertical scrolling if content is too tall */
    max-height: 30rem; /* Limit the height of the file display */    
}

/* Make sure the content within the file display wraps correctly */
#file-display p {
    word-wrap: break-word; /* Break long words */
    overflow-wrap: break-word; /* CSS3 property for wrapping */
    white-space: pre-wrap; /* Preserve whitespace, wrap as necessary */
    margin-left: auto;
    margin-right: auto;
    width: 50em;
}

.additive-calculation{
    display:inline-flex;
    padding: 0 1rem 0 1rem;
}

/* Evidence Container */
#evidence-container {
    padding: 0 1rem 0 1rem;
    flex: 1; /* Takes remaining height */
    overflow-y: auto; /* Allows scrolling if content is too tall */
    width: 95%;
    margin: auto;
}
.table-column-thread {
    width: 200px; /* Set the desired width for the Thread column */
}

.table-column-impact {
    width: 20px; /* Set the desired width for the Impact column */
}

.table-column-outcome {
    width: 10px; /* Set the desired width for the Outcome column */
}

.table-column-markers {
    width: 50px; /* Set the desired width for the Markers column */
}

.table-column-rationale {
    width: auto; /* Set the desired width for the Rationale column */
}

.table-column-source {
    width: 50px; /* Set the desired width for the Source column */
}

.table-column-event-time {
    width: auto; /* Set the desired width for the Event Time column */
}

.table-column-date-of-discovery {
    width: 100px; /* Set the desired width for the Date of Discovery column */
}

.th-evidence-header{    
    text-align: center;
}

td{
    text-align: left;
    padding: 0.5rem;
}

.marker-cell {
    max-height: 100px; /* Set the maximum height for marker cells */
    overflow-y: auto;  /* Enable vertical scrolling */
}

/* Results Container */
#results-container {
    padding: 0 1rem 0 1rem;    
    overflow-y: auto; /* Allows scrolling if content is too tall */
    width: 95%;
    margin: auto;
}

.results-toolbar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: auto;
    margin-bottom: 1.5rem; /* Added margin-bottom */
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.global-score {
    font-size: 1rem;
    margin-top: 1rem;
}

.no-result {
    font-size: 1rem;
    color:#2196F3;
}


/* Additional Styles */
#placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

/* Timeline Container */
#timeline-section {
    padding: 0 1rem 0 1rem;    
    display: none;
}


.timeline {
    position: relative;
    width: 100%;
    height: 50px; /* Adjust height as needed */
    display: flex;
    align-items: center;
}

.timeline-line {
    position: absolute;
    top: 25%; /* Center the line vertically */
    left: 0;
    right: 0;
    height: 2px; /* Thickness of the line */
    background-color: #ccc; /* Color of the line */
    z-index: 1; /* Ensure it appears below the events */
}

.timeline-events {
    display: flex;
    justify-content: space-around; /* Evenly distribute events */
    position: relative;
    z-index: 2; /* Ensure events appear above the line */
}

.timeline-event {
    position: relative;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
}

th {
    background-color: var(--title-background);
    text-align: left;
}

tr:hover {
    color: #0f1044c0;
    background-color: #ddd;
}


/* Right Panel Styles */
.right-panel {
    font-family: 'Courier New', Courier, monospace;
}

.panel-content {
    background-color: #252526;
    padding: 10px;
    border-radius: 5px;
    overflow-y: auto;
    color: cornflowerblue;
    min-height: 92%;
}

#console-log div {
    margin-bottom: 5px;
    /*white-space: pre-wrap;  Preserve whitespace and line breaks */
}

/* Panel Title Styles */
.panel-title {
    background: var(--title-background);
    height: 3rem;
    width: 100%;
    border-top-left-radius: 0.9375rem;
    border-top-right-radius: 0.9375rem;
    display: flex;
    align-items: center;
    margin-bottom: 0;
    position: absolute;
    top: 0;
}

/* Panel Title Text Styles */
.panel-title h3 {
    padding-left: 1rem;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

/* Content Below Title */
.panel-content {
    padding: 2rem;
    padding-top: 3rem;
    margin-top: 3rem;
}

/* Additional Styles */
#upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #bbb;
    padding: 20px;
}

#file-display {
    padding: 2rem 5rem;    
}

#placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

/* Button styles */
button {
    background-color: var(--button-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    opacity: 0.9;
}

.event-placeholder {
    padding: 5px;
    border: 1px solid #000; /* Border for placeholders */
    background-color: #fff; /* Background for placeholders */
    z-index: 3; /* Ensure placeholders appear above the line */
}

/* Styling for the file upload container */
.file-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4rem;
    min-height: 10%;
    max-height: 30%;
}

/* Custom style for the 'Choose Files' button */
.custom-upload-button {
    background-color: white;
    color: var(--button-color);
    border: 2px solid var(--button-color);
    padding: 0.5rem 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;    
    text-align: center;
    width: 90%;
}

.custom-upload-button:hover {
    background-color: var(--button-color);
    color: white;
}

/* Styling for the file list */
#file-list {
    margin-top: 15px;
    width: 95%;
    max-width: 100%;
    display: ruby;
}

/* Styling for each file item */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ensures the remove button is on the right */
    padding: 0.1rem;
    margin: 0 1.5rem 1rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
    background-color: var(--panel-background);
    position: relative;
    font-size: small;
}

.file-item:hover {
    background-color: #f0f0f0;
}

/* File icon styling */
.file-icon {
    margin-right: 10px;
    font-size: 1.5rem;
    color: #666;
}

/* Styling for the remove button (X) */
.remove-file {
    font-size: 1.25rem;
    color: #ff0000;
    cursor: pointer;
    margin-left: auto;
    display: none; /* Initially hidden */
}

/* Show the remove button only when the user hovers over the file item */
.file-item:hover .remove-file {
    display: inline-block;
}

/* Button hover effect */
button:hover, .file-item:hover {
    opacity: 0.85;
}
