/* This is the CSS for the 2020 version
*/
:root {
    --sticky-top-left-height: 100px; /* default fallback */
}

body {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    padding: 5px;
}

h1 {
    padding: 5px;
}

/* https://getcssscan.com/css-buttons-examples button-21 */
button, .button, input[type=button], input[type=submit] {
    align-items: center;
    appearance: none;
    background-color: #3EB2FD;
    background-image: linear-gradient(1deg, #4F58FD, #149BF3 99%);
    /*background-size: calc(100% + 20px) calc(100% + 20px);*/
    border-radius: 100px;
    border-width: 0;
    box-shadow: none;
    box-sizing: border-box;
    color: #FFFFFF;
    cursor: pointer;
    display: inline-flex;
    font-family: CircularStd, sans-serif;
    font-size: 1rem;
    height: auto;
    justify-content: center;
    line-height: 1.5;
    margin: 5px;
    padding: 6px 20px;
    position: relative;
    text-align: center;
    text-decoration: none;
    transition: background-color .2s, background-position .2s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    vertical-align: middle;
}

    /*white-space: nowrap;*/ /* This stopped tooltips wrapping :-( */

button:disabled,
button[disabled],
.button[disabled] {
    /*border: 1px solid #999999;*/
    background-color: #cccccc;
    background-image: linear-gradient(1deg, #666666, #888888 99%);
    color: #FFFFFF;
}

.button:active,
.button:focus {
    outline: none;
}

.button:hover {
    background-position: -20px -20px;
}

.button:focus:not(:active) {
    box-shadow: rgba(40, 170, 255, 0.25) 0 0 0 .125em;
}

#logo {
    float: right;
    padding: 0;
    margin: 0 0 10px 10px;
}

table, th, td {
    padding: 5px;
    vertical-align: middle;
}

#swimlaneHeadersTable {
    padding-bottom: 0;
}

/* Contains Create new item, add green link etc. */
/* Use class so that the div #collaboratorDiv wins. Doesn't work :-( */
.buttonTableColor {
    background-color: #fcefa1;
}

.buttonTable {

}

#collaboratorDiv {
    margin-top: 6px;
    background-color: #5eb85e;
}

#colorLegendWithSelector {
    background-color: #f8c6be;
}

.colorLegendButton {
    color: black;
}

.description-pane {
    padding: 5px;
    overflow-y: auto;
    min-height: 100px;
    max-height: 100px;
    background-color: #e6f3fe;
    white-space: pre;
}

.i2BMap {
    /*position: absolute; Wrong. Dunno why. */
    background-color: lightblue;
    /*border-style: ridge;*/
    /*position: absolute;*/
    width: 100%;
    height: 100%;
    /*overflow: scroll; Still couldn't make headers wider than window, so they started sharing 100%*/
}

.mySvg {
    /*position: absolute;*/
    background-color: yellow;
    width: 100%;
    height: 100%;
}

.ItemView {
    position: absolute;
    text-align: center;
    border: 1px solid #d3d3d3;
    padding: 5px;
    /*cursor: move;*/
    border-radius: 25px;
    font-family: Arial, serif;
    box-shadow: 5px 5px 3px grey;
    /*transition: left 0.3s ease, top 0.3s ease; *//* Worked, but prevented me dragging the item around. */

    /* nothing works! */
    /*opacity: 1;*/
    /*-webkit-transition: opacity 500ms ease-out;*/
    /*-moz-transition: opacity 500ms ease-out;*/
    /*-o-transition: opacity 500ms ease-out;*/
    /*transition: opacity 500ms ease-in-out;*/
    /*transition: opacity 1s;*/
    /*transition-property: opacity;*/
    /*transition: all 1050ms ease-in-out;*/
}

.SlideItemView {
    transition: left 0.3s ease, top 0.3s ease;
}

.fadeIn {
    animation: opac-in 1s;
    animation-fill-mode: forwards;
}

@keyframes opac-in {
    from {
        opacity: 0
    }
    to {
        opacity: 1
    }
}

/* 28.12.20 I couldn't get fade out working if fade in was working.
   Might this help? https://stackoverflow.com/questions/55346125/make-a-background-fade-in-every-time-onclick
 */
/*.w3-animate-opacity-out {*/
/*    animation: opac-out 2s;*/
/*    animation-fill-mode: forwards;*/
/*}*/

/*@keyframes opac-out {*/
/*    from {*/
/*        opacity: 1*/
/*    }*/
/*    to {*/
/*        opacity: 0*/
/*    }*/
/*}*/

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    /*width: 240px; no effect! */
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;

    /* Position the tooltip */
    position: absolute;
    z-index: 3;
    top: -5px;
    left: 105%;
    /*width: 400px; /* no effect*/
    width: auto;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
}

.popupTable {
    position: absolute;
    visibility: hidden;
    margin: 0;
    border-radius: 5px;
    padding: 0;
    border: 0px solid gray;
    border-collapse: collapse;
}

.popupRow {
    border: 1px solid gray;
    border-collapse: collapse;
    border-radius: 5px;
}

/* If I decide on blinking the background, this might help: http://jsfiddle.net/mr_alien/UCbW8/5/ */
/*.blink-text {*/
/*    color: #000;*/
/*    animation: blinkingText 1s infinite;*/
/*}*/

/*@keyframes blink {*/
/*    50% { border-color: #ff0000; }*/
/*}*/
/*.blink-text{ !*or other element you want*!*/
/*    animation: blink .5s step-end infinite alternate;*/
/*    border-width: 5px;*/
/*    border-color: red;*/
/*}*/

/*https://codepen.io/bramus/pen/rNWByYz*/
.blink-text {
    --angle: 0deg;
    /*width: 50vmin;*/
    /*height: 50vmin;*/
    border: 5px solid;
    border-image: conic-gradient(from var(--angle), red, yellow, lime, aqua, blue, magenta, red) 1;
    /* I wanted the above line to work with a margin which has rounded corners, but it can't, so
    I side-stepped the problem: */
    border-radius: 0px;
    animation: 2s rotate linear infinite;
}

@keyframes rotate {
    to {
        --angle: 360deg;
    }
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}


/* validator recommended this: */
img {
    border: 0;
}

.alignRight {
    align: right
}

/*@keyframes blinkingText {*/
/*    0% {*/
/*        color: #10c018;*/
/*        !*font-weight: bold;*!*/
/*    }*/
/*    25% {*/
/*        color: #1056c0;*/
/*    }*/
/*    50% {*/
/*        color: #ef0a1a;*/
/*        !*font-weight: bold;*!*/
/*    }*/
/*    75% {*/
/*        !*font-weight: normal;*!*/
/*        color: #254878;*/
/*    }*/
/*    100% {*/
/*        color: #04a1d5;*/
/*    }*/
/*}*/

/* Style The Dropdown Button from https://www.w3schools.com/css/css_dropdowns.asp */
.dropbtn {
    background-color: #4CAF50;
    color: white;
    /*padding: 5px 7px;*/
    /*font-size: 16px;*/
    /*border: none;*/
    cursor: pointer;
}

/* The container <div> - needed to position the dropdown content */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: lightblue;
    min-width: 160px;
    padding: 5px;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    z-index: 10;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {
    background-color: #f1f1f1
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn {
    background-color: #3e8e41;
}

/* The Modal (background)  from https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_modal */
/* TODO put it in its own CSS file? */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 20; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%; /* Nah! Just testing */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0, 0, 0); /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: lightblue;
    margin: 15% auto;
    border: 1px solid #888;
    width: 40%;
}

.editItemModalTableDiv {
    padding: 20px;
}

.modal-topline {
    font-size: 22px;
    background-color: lightgrey;
    padding: 20px 10px 2px 5px;
}

.inputField {
    width: 100%;
    max-width: 100%;
}

.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#sizeTester #Test .ttt {
    position: absolute;
    /*visibility: hidden;*/
    height: auto;
    width: auto;
    white-space: nowrap;
    background-color: #10c018;
}

/* From https://stackoverflow.com/questions/48266239/how-to-display-a-specific-shortcut-key-in-html */
abbr {
    text-decoration: underline;
}

/*<button class="button-70" role="button">Button 70</button>*/
/* From https://getcssscan.com/css-buttons-examples */
/* CSS */
.cool-button {
    background-image: linear-gradient(#0dccea, #0d70ea);
    border: 0;
    border-radius: 4px;
    box-shadow: rgba(0, 0, 0, .3) 0 5px 15px;
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    font-family: Montserrat, sans-serif;
    font-size: .9em;
    margin: 5px;
    padding: 10px 15px;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

/* From AI */
/* Base styling for input and select elements */
input, select {
    font-family: 'Roboto', sans-serif; /* Modern, clean font */
    font-size: 16px; /* Readable font size */
    color: #333; /* Text color */
    background-color: #f9f9f9; /* Light gray background */
    border: 1px solid #ccc; /* Subtle border */
    border-radius: 4px; /* Slightly rounded edges */
    padding: 5px 5px; /* Comfortable padding for click areas */
    outline: none; /* Remove default outline */
    transition: border 0.3s, box-shadow 0.3s; /* Smooth transitions */
    box-shadow: none;
    vertical-align: middle;
    /*width: 100%;                      !* Make inputs consistently 100% width *!*/
}

/* Hover state for better interactivity */
input:hover, select:hover {
    border-color: #888; /* Darker border on hover for emphasis */
    background-color: #f3f3f3; /* Slightly darker background */
}

/* Focus styling for accessibility */
input:focus, select:focus {
    border-color: #007BFF; /* Blue border on focus */
    box-shadow: 0 0 3px 1px rgba(0, 123, 255, 0.4); /* Soft blue focus shadow */
}

/* Disabled styling */
input:disabled, select:disabled {
    background-color: #e9ecef; /* Lightened background for disabled state */
    color: #6c757d; /* Muted text color */
    cursor: not-allowed; /* Not-allowed cursor */
}

/* Placeholder styling for inputs */
input::placeholder {
    color: #aaa; /* Subtle placeholder color */
    font-style: italic; /* Italicized style for distinction */
}

/* Select-specific additional styling */
select {
    background-image: url('data:image/svg+xml;base64,...'); /* Optional custom dropdown arrow */
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px; /* Extra padding for dropdown icon space */
}

/* For flexbox layout */
/*.row {*/
/*    display: flex;                  !* Enables flexbox layout *!*/
/*    gap: 10px;                      !* Adds space between elements (optional) *!*/
/*    margin: 10px;*/
/*}*/

/*.flex-element {*/
/*    flex: 1;                        !* Optional: Makes elements flexible and evenly spaced *!*/
/*    text-align: left;*/
/*    !*border: 1px solid #ccc;         !* Borders for visualization *!*!*/
/*    padding: 10px;                  !* Padding for better spacing *!*/
/*    !*margin: 10px;*!*/
/*    vertical-align: center;*/
/*}*/
.row .element {
    display: inline-block; /* Makes elements appear side by side */
    text-align: left;
    vertical-align: center;
    /*border: 1px solid #ccc;*/
    padding: 10px; /* Padding for spacing */
    width: 48%; /* Adjust width to fit the row */
    box-sizing: border-box; /* Ensures padding doesn't overlap width */
}

.description-popup {
    position: absolute;
    display: none; /* Initially hidden */
    padding: 10px;
    border-radius: 4px;
    background-color: lightblue;
    border: 1px solid #ccc;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    white-space: pre;
    opacity: 0;
    /*transition: opacity 0.5s ease, transform 0.5s ease; !* Smooth transitions *!*/
    transition: opacity 0.5s ease; /* Smooth transitions */
    z-index: 30;
}

/* Style tab links */
.tablink {
    background-color: #a5a5a5;
    color: #2e2e2e;
    float: left;
    /*border: red;*/
    border-radius: 0px 10px 0px 0px;
    border-width: 2px 2px 0px 2px;
    outline: none;
    cursor: pointer;
    background-image: none;
    margin: 0px;
    border-color: black;
    padding: 14px 16px;
    /*border: 3px;*/
}

/* The viewer being used. */
.tablink[disabled]
    /*, .buttonTableColor */
{
    background-color: #fcefa1;
    color: black;
    border-bottom: none;
}

.tablink:hover {
    background-color: #979168;
    color: black;
}

.flexTable {
    background-color: #fcefa1;
    width: 100%;
    padding: 0;
    display: flex;
    justify-content: flex-start;
}

.scroll-container {
    position: relative; /* Necessary for sticky to work */
    width: 100vw;
    overflow-x: auto; /* Enables scrolling */
    height: 100vh;
    overflow-y: auto; /* Enables scrolling */
}

.sticky-top-left {
    position: sticky; /* Behaves as sticky inside the scroll area */
    top: 0; /* Sticks to the top vertically */
    left: 0; /* Sticks to the left horizontally */
    background-color: lightcoral;
    color: black;
    z-index: 10; /* Appears above scrollable content */
    min-width: 150px; /* Ensures consistent width */
}

.sticky-top-only {
    position: sticky;
    top: var(--sticky-top-left-height); /* Sticks just below the topmost sticky-left region */
    /*background-color: lightgreen;*/
    color: black;
    z-index: 5;
    text-align: center;
    font-weight: bold;
    /*border-bottom: 1px solid #aaa;*/
    /*box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);*/
}

.image-button {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.image-button img {
    width: 32px;
    height: auto;
    transition: filter 0.3s ease; /* Smooth hover transition */
    margin: 0;
}

.image-button img:hover {
    background-color: lightblue;
}
