/* Copyright (c) 2025 Varrick Koh
This work is licensed under the Creative Commons 
Attribution-NonCommercial-NoDerivatives 4.0 International License.
To view a copy of this license, visit
https://creativecommons.org/licenses/by-nc-nd/4.0/ */

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.login-container h2 {
    text-align: center;
}

.login-container label {
    display: block;
    margin: 10px 0 5px;
}

.login-container input[type="text"], .login-container input[type="password"] {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.login-container button {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
}

/* Submit button */
button[type="submit"], button[type="button"] {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button[type="submit"]:hover, button[type="button"]:hover {
    background-color: #45a049;
}

.github-comment-container {
    margin-top: 5px;
}

.app-header {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0 0 10px 0;
    line-height: 1.2;
    display: inline-block; 
}

.header-subtext {
    font-size: 18px; 
    font-weight: bold;
    color: inherit;
    display: inline-block; 
    vertical-align: baseline;
}

.special {
    animation: colorChange 5s infinite;
}

@keyframes colorChange {
    0% { color: #ff0000; }   /* Red */
    25% { color: #007500; }  /* Green */
    50% { color: #0000ff; }  /* Blue */
    75% { color: #ff00ff; }  /* Magenta */
    100% { color: #ff0000; } /* Back to Red */
}

.header-subtext a {
    color: inherit; 
    text-decoration: none; 
}

.header-subtext a:hover {
    text-decoration: underline; 
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}

.container {
    display: flex;
    height: 100vh;
    border-left: 6px solid black;
}

.sidebar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 20%; 
    min-width: 150px;
    max-width: 50%; 
    background-color: #f4f4f4;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transition: none; 
}

.resizer {
    width: 5px;
    background-color:black;
    cursor: ew-resize;
    position: absolute;
    top: 0;
    left: 20%; 
    height: 100vh;
    z-index: 10;
}

.resizer:hover {
    background-color: #007bff;
}

.user-details-container {
    padding: 15px;
    background-color: #ffffff;
    border: 2px solid #ccc;
    border-radius: 8px;
    display: none; 
    width: 100%; 
    box-sizing: border-box;
}

.user-details-container.visible {
    display: block; 
}

.user-details {
    display: none; 
    width: 100%;
}

.user-details.visible {
    display: block;
}

.user-details img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 20px;
}

.user-details ul {
    list-style-type: none;
    padding: 0;
}

.user-details li {
    margin: 5px 0;
}

.user-details li span {
    font-weight: bold;
}

.user-details h2 {
    margin-top: 5px;
    margin-bottom: 5px;
}

.api-quota-container {
    margin-top: 20px;
    padding: 15px;
    background-color: #ffffff;
    border: 2px solid #ccc;
    border-radius: 8px;
    display: none; 
    width: 100%;
    box-sizing: border-box;
}

.api-quota-container.visible {
    display: block; 
}

.api-quota-container h2 {
    padding-top:0px;
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 18px;
}

.api-quota-container ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.api-quota-container li {
    margin-bottom: 5px;
    font-size: 16px;
}

form {
    display: flex;
    flex-direction: column;
    width: 100%; 
    box-sizing: border-box; 
}

form label,
form input,
form button {
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.form-row label {
    flex: 0 0 150px;
    text-align: left;
}

.form-row input {
    flex: 1; 
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%; 
    box-sizing: border-box;
}

.form-row input:hover {
    border-color: #007bff;
}

.form-row input:focus {
    border-color: #0056b3;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.sidebar input {
    width: 100%; 
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: 5px;
    border: 1px solid #ccc;
    display: block;
}

.sidebar button {
    width: 100%; 
    padding: 10px;
    background-color: #00b953d0;
    color: black;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    box-sizing: border-box;
}

.sidebar button:hover {
    background-color: #f12158a2;
}

.main-content {
    flex: 1;
    display: flex;
    overflow: auto;
}

.main-container {
    margin-left: calc(20%);
    width: calc(80%); 
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.main-container.scrollable {
    overflow: auto; 
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    grid-auto-rows: 400px; 
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
}

.grid-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.grid-item h3 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.overview-table thead tr:first-child th {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    padding: 10px;
    background-color: #f4f4f4;
}

.overview-table thead tr:not(:first-child) th {
    font-weight: bold;
    background-color: inherit;
}

.overview-table table {
    width: 100%;
    border-collapse: collapse;
    flex-grow: 1;
}

.overview-table thead {
    background-color: #f4f4f4;
    position: sticky;
    top: 0;
    z-index: 2;
}

.overview-table th, td {
    text-align: left;
    word-wrap: break-word;
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.overview-table th {
    font-weight: bold;
}

.overview-table tbody {
    display: block;
    max-height: 280px;
    overflow-y: auto;
    width: 100%;
}

.overview-table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.loading-indicator {
    text-align: center;
    font-size: 14px;
    color: #555;
    margin: 2px 0;
}

.tabs {
    top: 0;
    left: 15%; 
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-start;
}

.tab-button {
    flex: 1;
    padding: 15px; 
    font-size: 18px; 
    cursor: pointer;
    background-color: #f1f1f1;
    border: none;
    border-bottom: 2px solid transparent;
    transition: background-color 0.3s ease;
}

.tab-buttons:last-child {
    border-right: none; 
} 


.tab-button.active {
    background-color: #ffffff;
    border-bottom: 4px solid #007bff;
    font-weight: bold;
}

.tab-button:not(.active):hover {
    background-color: #e0e0e0;
}

.tab-content {
    display: flex;
    flex-direction: column;
}

.tab-pane {
    display: none;
    overflow-y: auto; 
}

.tab-pane.active {
    display: block;
}

.analysis-container {
    display: flex;
    flex-direction: row;
    height: 90%;
    box-sizing: border-box;
    overflow: hidden;
}

.analysis-sidebar {
    width: 10%;
    border-right: 1px solid #ccc;
    padding: 10px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.analysis-sidebar .sub-tab-button {
    padding: 10px;
    cursor: pointer;
    margin-bottom: 5px;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    overflow: hidden;
}

.analysis-sidebar .sub-tab-button.active {
    background-color: #ffffff;
    font-weight: bold;
    border-left: 4px solid #007bff;
}

.analysis-sidebar .sub-tab-button:hover {
    background-color: #e0e0e0; 
    border-color: #aaa; 
}

.analysis-sidebar .sub-tab-button.active {
    background-color: #ffffff;
    font-weight: bold;
    border-left: 4px solid #007bff;
    border-color: #007bff; 
}

.analysis-content {
    width: 90%;
    padding: 0px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sub-tab-pane {
    display: none;
}

.sub-tab-pane.active {
    display: block;
}

#toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f4f4f4;
    color: black;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    font-size: 18px;
    text-align: center;
    z-index: 1000;
    transition: bottom 0.75s ease, opacity 0.75s ease;
    opacity: 0;
}

#toast.show {
    bottom: 20px;
    opacity: 1;
}

#toast.hide {
    opacity: 0;
    bottom: -100px;
}

.toast a {
    color: #007bff;
    text-decoration: none;
}

.toast a:hover {
    text-decoration: underline;
}

#toastOkButton {
    background-color: #00b953d0;
    color: black;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#toastOkButton:hover {
    background-color: #f12158a2;
}

.toast.hidden {
    display: none;
}

.sub-tab-selector {
    display: flex;
    margin-bottom: 10px;
}

.sub-tab-inner-button {
    flex: 1;
    padding: 15px;
    cursor: pointer;
    background-color: #e9e9e9;
    border: none;
    border-bottom: 2px solid transparent;
    text-align: center;
    font-size: 16px;
    border-right: 3px solid #ddd; 
    box-sizing: border-box; 
    transition: background-color 0.2s ease;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.sub-tab-inner-button:last-child {
    border-right: none; 
}

.sub-tab-inner-button.active {
    background-color: #ffffff;
    border-bottom: 4px solid #007bff;
    font-weight: bold;
}

.sub-tab-inner-button:hover {
    background-color: #dcdcdc; 
}

.sub-tab-inner-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 90vh;
    margin:0;
}

.sub-tab-inner-pane {
    display: none;
    height:90%;
    margin:0;
    padding:5px;
    flex-direction: row; 
    box-sizing: border-box;
}

.sub-tab-inner-pane.active {
    display: block;
    height: 90%;
    margin:0;
    padding:5px;
}

.plot-container {
    width: 100%; 
    height: 100%; 
    box-sizing: border-box; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    padding: 5px; 
    margin: 0; 
    background-color: #f9f9f9; 
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden; 
}

.github-events-textarea {
    flex-grow: 1;
    width: 100%; 
    height: 80dvh; 
    box-sizing: border-box; 
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    margin: 0;
    background-color: #f9f9f9;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow: auto; 
    resize: none; 
}

#raw-response {
    display: flex;
    flex-direction: column; 
    flex-grow: 1; 
    height: 100%; 
    box-sizing: border-box;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin:0;
    padding:0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    z-index: 1000;
    text-align: center;
    box-sizing: border-box;
    pointer-events: auto;
}

.overlay.hidden {
    display: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 5px 0 rgba(0, 123, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 15px 8px rgba(0, 123, 255, 0.7);
    }
    100% {
        box-shadow: 0 0 10px 4px rgba(0, 123, 255, 0.3);
    }
}

.pulsing {
    animation: pulse 1.5s infinite;
}

.hidden {
    display: none !important;
}

.timezone-controls {
    margin-top: 5px; 
    margin-left: 5px; 
    margin-right: 5px; 
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column; 
    align-items: center; 
    gap: 10px; 
    width: calc(100% - 10px); 
    box-sizing: border-box;
    position: relative; 
    bottom:0;
}

input[type="range"] {
    width: 100%; 
    max-width: 70rem; 
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    margin: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
    background-color: #b9c6cb;
    border-radius: 0.5rem;
    height: 0.5rem;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -5px;
    background-color: #d35f5f;
    border-radius: 50%;
    height: 1rem;
    width: 1rem;
}

input[type="range"]:focus::-webkit-slider-thumb {
    outline: 3px solid #d35f5f;
    outline-offset: 0.125rem;
}

.user-activity {
    display: flex;
    height: 100%;
    position: relative;
    overflow: hidden; 
}

.user-activity-left {
    width: 20%;
    min-width: 150px;
    max-width: 300px;
    background-color: #f4f4f4;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(-100%); 
    height: 100%;
    z-index: 10;
    transition: transform 0.3s ease; 
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    border-right: 1px solid #ccc;
    border-top: 1px solid #ccc;
}

.user-activity-left.visible {
    transform: translateX(0); 
}

.user-activity-right {
    flex: 1;
    background-color: #ffffff;
    width: 100%;
}

.user-activity-left-notch {
    width: 10px;
    height: 50px;
    background-color: #007bff;
    border-radius: 0 5px 5px 0; 
    position: absolute;
    top: 50%;
    left: 10px; 
    transform: translateX(-100%) translateY(-50%); 
    cursor: pointer;
    z-index: 11;
    transition: transform 0.3s ease, background-color 0.3s ease; /
}

.user-activity-left-notch:hover {
    background-color: #0056b3; 
}

.user-activity-left.visible + .user-activity-left-notch {
    transform: translateX(calc(var(--sidebar-width, 20%) - 10px)) translateY(-50%);
}

.user-activity-left h3, .user-activity-right h3 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
}

.user-activity-left form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-activity-left label {
    font-weight: bold;
}

.user-activity-left input {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.user-activity-left input:hover{
    border-color: #007bff;
}

.user-activity-left input:focus{
    border-color: #0056b3;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.user-activity-left button {
    background-color: #00b953d0;
    color: black;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    padding: 10px;
    font-weight: bold;
    width: 80%;
}

.user-activity-left button:hover {
    background-color: #f12158a2;
}

.user-activity-left button:disabled {
    background-color: #c0c0c0;
    color: #6c757d; 
    cursor: not-allowed; 
    opacity: 0.5; 
}

.user-activity-left form {
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 10px; 
    width: 100%; 
    margin-top:20px;
}

.user-activity-left form label {
    width: 80%; 
    text-align: left;
    margin-bottom: 5px;
    font-weight: bold;
}

.user-activity-left form input {
    width: 80%; 
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#user-commits-activity {
    display: none; 
}

#user-commits-activity.active {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%; 
    box-sizing: border-box;
    overflow: hidden;
}

.user-commits-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%; 
    box-sizing: border-box;
}

#commits-table-container {
    width: 100%;
    overflow:auto;
    display: flex; 
    flex-direction: column; 
    overflow-x: auto;
    margin-bottom: 5px; 
}

.dt-container {
    padding:5px;
}

#user-commits-timeline-plot {
    width: 100%;
    height: 100%;  
    overflow-y: auto;  
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

#filter-container {
    gap: 5px;
    margin-top: 10px; 
    padding: 5px;
    border-radius: 5px;
}

#filter-username:disabled {
    background-color: #c0c0c0; 
    color: #6c757d; 
    cursor: not-allowed;
    opacity: 0.5; 
}

#user-commits-timezone-slider:disabled {
    background-color: #c0c0c0;
    color: #6c757d; 
    cursor: not-allowed; 
    opacity: 0.5; 
}

.disabled-label {
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}

.cytoscape_container {
    width: 100%;
    height: 90dvh;
    min-height: 500px; 
    border: 1px solid #ccc; 
}

#network-container {
    flex: 0 0 70%;
    height: 100%;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    display: flex; 
    flex-direction: column;     
}

#user-network-activity-textarea {
    flex: 0 0 25%; 
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    resize: none; 
    overflow-y: auto; 
    box-sizing: border-box;
    background-color: #f9f9f9;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 5px;
    margin-top: 5px;
}

#layout-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

#layout-controls label {
    width: 80%;
    text-align: left;
    font-weight: bold;
}

#layout-select {
    width: 80%;
    padding: 5px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #fff;
    cursor: pointer;
}

#layout-select::after {
    content: "▼";
    font-size: 12px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    pointer-events: none;
}

#layout-select:hover {
    border-color: #007bff;
}

#layout-select:focus {
    border-color: #0056b3;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

#layout-select:disabled {
    background-color: #c0c0c0;
    color: #6c757d; 
    cursor: not-allowed; 
    opacity: 0.5; 
    border-color: #ccc; 
    box-shadow: none; 
}

#layout-select:disabled:hover {
    border-color: #ccc; 
}

#legend-container {
    margin-top: 5px;
    font-size: 12px;
    color: #333;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
}

.legend-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.legend-circle.red { background: #ff5733; }    
.legend-circle.green { background: #28a745; }  
.legend-circle.blue { background: #007bff; }   
.legend-circle.yellow { background: #ffd700; } 
.legend-circle.pink { background: #ff69b4; }   


.highlighted {
    transition: all 0.2s ease;
}

.faded {
    opacity: 0.2;
    transition: all 0.2s ease;
}

.cy-context-menus-cxt-menu {
    background-color: #2c3e50;
    border: 1px solid #34495e;
    border-radius: 6px;
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    min-width: 180px;
}

.cy-context-menus-cxt-menuitem {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: white;
    padding: 8px 12px;
    margin: 4px 6px;
    background-color: #34495e;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    border: none;
    text-align: left;
    transition: background-color 0.2s ease-in-out;
}

.cy-context-menus-cxt-menuitem ul {
    padding: 8px 12px;
    margin: 0;
    list-style: none;
    border-radius: 4px;
}

.cy-context-menus-cxt-menuitem li {
    font-size: 13px;
    margin: 2px 0;
}

.cy-context-menus-cxt-menuitem li span {
    font-weight: bold;
    color: #000000;  
}

.cy-context-menus-divider {
    height: 1px;
    background-color: #95a5a6;
    margin: 5px 0;
}

.cy-context-menus-cxt-menu::-webkit-scrollbar {
    width: 8px;
}

.cy-context-menus-cxt-menu::-webkit-scrollbar-track {
    background: #2c3e50;
}

.cy-context-menus-cxt-menu::-webkit-scrollbar-thumb {
    background: #1abc9c;
    border-radius: 4px;
}