body {
    font-family: "Arial", sans-serif; /* Apply a custom font */
    background-color: #f8f9fa;
    color: #212529;
    margin: 0px; /* To avoid navbar from having a gap on the left */
}

main {
    margin-left: 20px;
    margin-right: 20px;
}

/* Apply header 1 font */
h1 {
    font-size: 300%;
    text-align: center;
    margin-top: 0;
}

/* Nav bar formatting */
.topnav {
    list-style-type: none;
    background-color: #003366;
    color: white;
    font-size: 120%;
    padding: 0px;
    margin-left: 0px;
    overflow: hidden;
    width: 100%;
}
.topnav a {
    float: left;
    text-decoration: none;
    padding: 15px;
    display: block;
    text-align: center;
}
.topnav a:hover {
    background-color: #00264c;
}
.topnav a:visited {
    color: white;
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: #f8f9fa;
}

.header-logo {
    max-height:110px;
}

.left-logo {
    width: 100%;
}

.right-logo {
    width: 17%;
}

.header-title {
    flex-grow: 1;
    text-align: center;
    font-size: 300%;
    margin: 0;
}

/* DataTable overall styling */
#clockTable {
    margin: 20px auto;
    border-collapse: collapse;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%
} 

/* Table header */
#clockTable thead {
    background-color: #003366;
    color: white;
}

/* Header cell styling */
#clockTable th {
    border: 1px solid #dee2e6;
    text-align: left;
}

/* Body cell styling */
#clockTable td {
    border: 1px solid #dee2e6;
}

/* Hover effect */
#clockTable tbody tr:hover {
    background-color: #e9ecef;
    cursor: pointer;
}

/* Target the DataTables wrapper to create space around the controls */
#clockTable_wrapper {
    margin: 30px 80px; /* Add margin to create space */
}

/* Hyperlinks */
a {
    color: blue;
}
/* Override the purple color for visited links */
a:visited {
    color: blue;
}

/* Tooltip container */
.tooltip-container {
    position: relative;
    display: inline-block;
    text-decoration: underline;
    text-decoration-style: dotted;
    cursor: help;
}

/* Tooltip text */
.tooltip-container .tooltip-text {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1000;
    bottom: 125%; /* Position above the element */
    left: 50%;
    transform: translateX(-50%); /* Appears in middle of screen instead of off end */
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
}

/* Show tooltip instantly on hover */
.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1; /* makes it appear faster than default tooltip, which takes 2 seconds of hovering */
}

/* indvTable styling */
#indvTable {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: auto;
}
#indvTable td, #indvTable th {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
}
#indvTable th {
    width: 20%;
}

/* CpG charts styling to make charts sit side-by-side on desktop and stack vertically on phones */
.charts-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin: 40px auto;
    max-width: 1000px;
}

.chart-container {
    flex: 1 1 300px;
    max-width: 350px;
}


/* Run Clocks container */
.container {
    max-width: 85%;
    margin: 40px auto;
    padding: 0 20px;
}

/* Styling for clock upload form */
.clock-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: white;
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.select2-container--default .select2-selection--multiple {
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    padding-left: 6px !important;
    align-items: center !important;
}
.clock-form label {
    display: block;
    font-weight: bold;
    font-size: 1.3rem;
    margin-top: 20px;
}
.clock-form label:first-of-type {
    margin-top: 0;
}
.clock-form select, .clock-form input[type="file"], .clock-form button {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 20px;
}
.clock-form select {
    height: 200px;
}
.clock-form button {
    background-color: #003366;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
}
.clock-form button:hover {
    background-color: #00264c;
}


/* Styling for clock results table */
.results-table {
    margin: 40px auto;
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.results-table h2 {
    text-align: center;
    margin-top: 0;
}

#resultsTable {
    margin: 15px auto;
    border-collapse: collapse;
}

#resultsTable td, #resultsTable th {
    border: 1px solid #ddd;
    padding: 8px 15px;
    text-align: left;
}
#resultsTable th {
    background-color: #f2f2f2;
    font-weight: bold;
}

a.active {
    color: white;
    font-weight: bold;
}


/* Progress spinner */
.clock-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 40px auto;
    transform: translateX(-6.5%)
}
.clock-face {
    position: relative;
    width: 80px;
    height: 80px;
    border: 5px solid #003366;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.tick {
    position: absolute;
    width: 2px;
    height: 6px;
    background-color: black;
    top: 0;
    left: 49%;
    transform: rotate(calc(30deg * var(--i) - 90deg + 2deg)) translateX(-50%);
    transform-origin: center 40px;
}
.minute-hand {
    position: absolute;
    width: 2px;
    height: 35%;
    background-color: #003366;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: bottom center;
    animation: spin 1s linear infinite;
}
.hour-hand {
    position: absolute;
    width: 2px;
    height: 25%;
    background-color: #003366;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: bottom center;
    animation: spin 12s linear infinite; /* hour hand moves slower */
}
.clock-centre {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: black;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}
@keyframes spin {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}


/* Pagination, Search box, and Info text - not used
.dataTables_wrapper {
    font-size: 0.9rem;
} */
 

/* Pagination buttons - not used
.dataTables_paginate .paginate_button {
    background-color: #007bff;
    color: white; not used
    border: none;
    margin: 2px;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
} */

/* Active pagination button - not used
.dataTables_paginate .paginate_button.current {
    background-color: #0056b3;
} */

/* Search box - not used
.dataTables_filter input {
    margin-left: 5px;
    padding: 5px;
    border: 1px solid #007bff;
    border-radius: 3px;
} */

/* Loading indicator - not used
.dataTables_processing {
    background-color: #007bff;
    color: white;
    padding: 10px;
    border-radius: 3px;
} */