:root {
    font-size: 16px;
    font-family: Arial;

    --header-height: 45px; /* exactly 42px */
    --shadow-gray: #d9d9d9;
    
    --xs-breakpoint: 576px;
    --sm-breakpoint: 768px;
    --md-breakpoint: 992px;
    --lg-breakpoint: 1200px;
    --xl-breakpoint: 1400px;
    --xxl-breakpoint: 1400px;
}

p.mantine-Text-root p {
    /* markdown */
    margin: 0;
}

body.loading #loading_spinner_global {
    opacity: 1.0;
}

#loading_spinner_global {
    opacity: 0.0;
    margin: 0 auto;
    transition: opacity 0.5s;
}

#main {
    height: 100vh;
}

.help-link {
    font-size: 0.8rem;
    opacity: 0.8;
}
.help-link .iconify {
    font-size: 1.2em;
    margin-right: 0.5em;
    vertical-align: text-top;
}

.notification_provider {
    position: absolute;
    width: 400px;
    top: 10px;
    right: 10px;
    z-index: 10000;
}

.notification_provider div + div {
    margin-top: 5px;
}

.hidden {
    display: none;
}

.markdown-text {
    p {
        margin: 0;
    }
}

.td-valid-row {
    cursor: pointer;
    color: #206420;
}

.td-valid-row::after {
    content: "✔️";
    margin-left: 5px;
}

.td-invalid-row {
    cursor: pointer;
    color: #ae0404;
}

.td-invalid-row::after {
    content: "❌";
    margin-left: 5px;
}

.td-empty-value {
    font-style: italic;
    color: gray;
}

/* tooltip div */
.td-valid-row > div, .td-invalid-row > div {
    display: inline-block;
} 


#data_settings_match_table {
    font-size: 0.8rem;
}

#data_settings_match_table td a {
    cursor: pointer;
    text-decoration: none;
}


#data_settings_load_button,
#data_settings_prev_button {
    display: block;
}

#data_settings_load_button_shadow,
#data_settings_next_button_shadow {
    display: none;
}

body.loading #data_settings_load_button,
body.loading #data_settings_next_button {
    display: none;
}

body.loading #data_settings_load_button_shadow,
body.loading #data_settings_next_button_shadow {
    display: block;
}

/*#data_settings_step1_form .info-tooltip {
    display: inline-block;
}
*/

#data_settings_step2_left {
    display: flex;
    flex-direction: column;
}

#data_settings_step1_form .mantine-Select-root {
    max-width: 300px;
}

#data_settings_step2_thumbnail {
    flex-grow: 1;
}

#data_settings_step1_thumbnail img,
#data_settings_step2_thumbnail img {
    display: block;
    max-width: 90%;
    max-height: 250px;
    height: 100%;
    margin: auto;
}

#data_settings_step2_stats p {
    font-size: var(--mantine-font-size-xs);
}

#main_container {
    min-height: calc(100% - 44px);
    flex-wrap: nowrap;
}

#header {
    position: relative;
    background-color: #fdfdfd;
    box-shadow: 0 0 10px var(--shadow-gray);
    z-index: 10;
}

#data_settings_modal p {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}


.main_btn, .main_btn_secondary {
    font-family: "Rubik", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;

    /* copied from size=lg, color=black */ 
    background: black;
    color: var(--mantine-color-white);
    border: calc(0.0625rem * var(--mantine-scale)) solid transparent;

    border-radius: 0;
    text-transform: uppercase;
    transition: 0.1s background ease;
}

.main_btn[disabled] {
    background: #f0f0f0;
    color: gray;
}

.main_btn:hover, .main_btn_secondary:hover {
    background: #f0f0f0;
    color: black;
}

.main_btn_secondary {
    color: black;
    background: white;
    border-color: black;
}

.main_btn_secondary:hover {
    border-color: transparent;
}

#sidebar.disabled .unlock_btn {
    display: none;
}

.unlock_btn {
    display: none; /* hidden by default */
    color: white;
    background-color: black;
    box-shadow: 0 0 20px gray;
    font-style: none;
    font-family: "Rubik", sans-serif;
}

.unlock_btn p {
    margin: 0 !important;
}

.unlock_btn strong {
    background: linear-gradient(
        90deg,
        #ff6f61 0%,
        #ffcccb 15%,
        #ffd700 30%,
        #98fb98 45%,
        #87ceeb 60%,
        #ffffff 70%,
        #87ceeb 80%,
        #98fb98 85%,
        #ffd700 90%,
        #ffcccb 95%,
        #ff6f61 100%
    );
    background-size: 200% auto;
    animation: shineAnimation 4s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.2);
}

.unlock_btn.floating {
    position: absolute;
    top: 40%;
    right: calc(50% - 100px);
    z-index: 100;
}

@keyframes shineAnimation {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/*********************************¥************/

.mantine-Modal-title {
    font-size: var(--mantine-font-size-lg);
    font-family: "Rubik", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    text-transform: uppercase;
}

.color_picker {
    border: 1px solid #ccc;
}

#logo {
    width: 200px;
    height: 42px;
    background-image: url("/assets/img/logo-black-lg.png");
    background-color: black;
    background-size: 80%;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1; /* to be above sidebar shadow */
}

#upload_data_paper a {
    color: var(--mantine-color-blue-6);
}

#data_upload_container {
    background-image: url("/assets/img/logo-repeat-bg.png");
    background-repeat: repeat;
    background-size: 500px;
}

#map_container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-x: hidden;

    /*background-image: url("/assets/img/background.png");*/
    /*
    background-image: url("/assets/img/logo-repeat-bg.svg"), url("/assets/img/background.png");
    background-position: 0, 50%;
    background-repeat: repeat, repeat;
    background-size: 500px, 16px 16px;
    */

    /*background-image: url("/assets/img/background.png");*/
    background-image: url("/assets/img/logo-repeat-bg.png");
    background-repeat: repeat;
    background-size: 500px;
}
#map_graph {
    height: calc(100% - var(--header-height));
    aspect-ratio: 4/3;
    max-height: calc(100vh - var(--header-height));
    margin: auto;
}

#map_container #upload_data_container {
    display: none;
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    text-align: center;
}

#map_container #upload_data_container > div {
    max-width: 400px;
}

#map_container #upload_data_input {
    max-width: 300px;
    margin: auto;
}

#map_container #upload_data_hook {
    font-size: 1.2rem;
    font-family: "Rubik";
    padding: 25px;
    text-align: center;
    background: #f8b1b3;
    border-radius: 5px;
    cursor: pointer;
}

#map_container #upload_data_hook.animated_gradient_bg, .animated_gradient_bg {
    color: white !important;
    background: linear-gradient(-45deg, #ee7752ba, #e73c7eba, #23a6d5ba, #23d5abba);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    transition: 0.4s transform cubic-bezier(1,0,0,1), 
                0.2s border-radius cubic-bezier(1,0,0,1);
}

.animated_gradient_bg div {
    /* override mantine */
    color: white !important;
}

#map_container #upload_data_hook:hover {
    transform: scale(1.1);
}

#map_container #upload_data_hook * {
    color: white;
}

#map_container #try_it_hook p {
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: gray;
    font-size: var(--mantine-font-size-xs);
}

#map_container #try_it_hook .file_icon {
    font-size: var(--mantine-font-size-xs);
    max-width: 100px;
    text-decoration: none;
    cursor: pointer;
    color: gray;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#map_container #try_it_hook .file_icon img {
    margin: auto;
    width: 50px;
    display: block;
    cursor: pointer;
    transform: scale(1);
}

#map_container #try_it_hook .file_icon:hover {
    transform: scale(1.2) rotate(0deg);
}




#map {
    position: absolute;
}

#map_tooltip {
    position: absolute;
    display: none;
    padding: 5px;
    background-color: #2e2e2e;
    color: white;
    font-size: 10px;
    border-radius: 5px;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}




.animated_opacity {
    opacity: 1.0;
    transition: opacity 0.2s;
}

.animated_opacity.hidden {
    display: block;
    opacity: 0.0;
}


#data_modal {
    max-width: 1000px;
}

#data_table_wrapper {
    position: relative;
}

#data_table_overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    background: rgba(255, 255, 255, 0.5);
}

#data_table, #match_table {
    width: 100%;
    height: 300px;
}

#plotly_map1, #plotly_map2, #plotly_map3 {
    width: 100%;
    max-width: 500px;
    height: 100%;
    min-height: 300px;
}

.loading_hidden { 
    display: block;
}

.loading_visible {
    display: none;
}

body.loading .loading_hidden {
    display: none;
}

body.loading .loading_visible {
    display: block;
}

.mantine-LoadingOverlay-root.loading_hidden {
    display: flex;
}

body.loading .mantine-LoadingOverlay-root.loading_visible {
    display: flex;
}

#save_button_check_icon {
    display: inline-block;
    transition: opacity 0.3s ease;
    color: white;
}

#save_button_check_icon.hide {
    display: none;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}




#feedback_card {
    width: 500px;
    position: absolute;
    bottom: 0;
    left: calc(50% - 250px);
    /* left: calc(50%);  - 200px + 300px); */
    z-index: 1000;
}

#feedback_card #map_rating {
    margin-left: auto;
    margin-right: auto;
}


#modify_data_grid.disabled {
    /* same as sidebar */
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

#modify_data_grid {
    /* NOTE; it seems i need to set rowHeight on agGrid as well */
    /*--ag-grid-size: 3px;
    --ag-font-size: 12px;
    --ag-row-height: 20px;
    --ag-header-height: 20px;
    --ag-header-font-size: calc(var(--ag-font-size) + 1px);*/
    
}

#modify_data_grid .pac-target-input {
    height: 25px;
}

/* Dropdown styles to match Mantine */
.dmc-dropdown .Select-control {
    width: 100%;
    font-family: var(--mantine-font-family);
    font-size: var(--mantine-font-size-sm);
    line-height: var(--mantine-line-height);
    color: var(--mantine-color-black);
    background-color: var(--mantine-color-white);
    border: 1px solid var(--mantine-color-gray-4);
    border-radius: var(--mantine-radius-sm);
    /*padding: 8px 12px;*/
    cursor: pointer;
    outline: none;
    transition: border-color 100ms ease;

    /*overflow: hidden;*/
}

.dmc-dropdown .Select-input {
    height: 10px;
    input {
        padding: 0;
    }
}

.dmc-dropdown .Select-control:focus,
.dmc-dropdown .Select-control--is-focused {
    border-color: var(--mantine-color-blue-4);
}

.dmc-dropdown .Select-menu-outer {
    margin-top: 0.5em;
    font-family: var(--mantine-font-family);
    font-size: var(--mantine-font-size-sm);
    border: 1px solid var(--mantine-color-gray-4);
    border-radius: var(--mantine-radius-sm);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dmc-dropdown .Select-option {
    padding: 8px 12px;
    cursor: pointer;
}

.dmc-dropdown .Select-option:hover {
    background-color: var(--mantine-color-gray-0);
}

.dmc-dropdown .Select-option.is-focused {
    background-color: var(--mantine-color-blue-0);
}

.dmc-dropdown .Select-option.is-selected {
    background-color: var(--mantine-color-blue-1);
    color: var(--mantine-color-blue-9);
}