/* Dashboard general styling*/
@keyframes gradientShift {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
}

section{
    display: flex;
    margin: 0 auto;
    flex-direction: column;
    margin-top: 15px;
    max-width: 1250px;
}

.container-profile-card-header{
    margin-top: 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    background: linear-gradient(130deg, var(--primary-color), var(--secondary-color), var(--background-color), var(--primary-color));
    background-size: 300%;
    background-position: 0% 50%;
    border-radius: 15px;
    padding: 8px;
}

.profile-card-header-left{
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 50%;
    margin-left: 25px;
    min-width: 250px;
}

.user-profile-logo{
    width: 65px;
    height: 65px;
}

.user-details{
    display: flex;
    flex-direction: column;
    padding: 15px;
    position: relative;
}

.user-actions-country{
    position: absolute;
    display: flex;
    flex-direction: row;
    align-items: center;
    top: 25%;
    left: 95%;
    transform: translate(-95%, -25%);
}

.profile-card-header-right{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: right;
    width: 50%;
    margin-right: 25px;
    min-width: 350px;
}

.profile-user-stat{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--accent-color);
    margin-right: 25px;
    font-weight: 600;
}

.profile-user-rank{
    padding: 12px;
    border-radius: 25px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color), goldenrod);
    background-size: 300% 300%;
    animation: gradientShift 5s ease infinite;
}

.btn-edit-account{
    width: 22px;
    height: 22px;
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-image: url("../images/icons/icon-edit-solid.svg");
    mask-image: url("../images/icons/icon-edit-solid.svg");
    mask-position: center;
    background-color: var(--font-color);
}

.icon-cancel{
    width: 100px;
    height: 100px;
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-image: url("../images/icons/icon-cancel-outline.svg");
    mask-image: url("../images/icons/icon-cancel-outline.svg");
    mask-position: center;
    background-color: var(--race-font-wrong-color);
}

.icon-confirm{
    width: 100px;
    height: 100px;
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-image: url("../images/icons/icon-confirm.svg");
    mask-image: url("../images/icons/icon-confirm.svg");
    mask-position: center;
    background-color: var(--accent-color);
}

.btn-edit-complete{
    width: 22px;
    height: 22px;
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-image: url("../images/icons/icon-check-solid.svg");
    mask-image: url("../images/icons/icon-check-solid.svg");
    mask-position: center;
    background-color: var(--font-color);
}

.dashboard-container-intro{
    position: relative;
    background-color: var(--primary-color);
    padding:40px;
    border-radius: 15px;

    box-shadow: 0 20px 35px rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 999;
    width:50%;
    max-width: 650px;
    min-width: 650px;
    display:flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}


.user-joined{
    word-wrap: break-word;
}

.insight-heading{
    color: var(--font-color);
}

.insight-value{
    color: var(--race-font-correct-color);
}

/* #statWPM, #statErrors, #statAccuracy{
    color: var(--race-font-correct-color);
} */


.dashboard-container-intro::after{
    background: var(--primary-color);
}

.container-username-action{
    margin-left: 15px;
}

.btn-edit-account, .btn-edit-complete{
    border: none;
    text-align: center;
    background: var(--font-color);
}

.btn-edit-complete{
    display:none;
}

.user-container{
    margin-top: 10px;
}

.user-title{
    text-align: left;
    color: var(--race-font-correct-color);
}

.user-description{
    margin-bottom: 0px;
    font-weight: 800;
}

.user-tiles{
    align-items: center;
    width: 250px;
}

.tile-stat{
    float: left;
    height: 54px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.keyboardLayoutContainer{
    display: flex;
    text-align: center;
    flex-direction: column;
    justify-content: center;
}

#keyboardName, #keyboardIcon{
    line-height: 1.2;
}

.updated-username{
    height: 8px;
    opacity: 1;
    visibility: visible;
    border: none;
    border-radius: 5px;
    width:90%;
    font-weight: 500;
    padding: 8px;
}

/* Section - 0 (Options Navigation Bar) */
.options-nav-bar button{
    background: none;
    border-radius: 0px;
    margin-right: 15px;
}

.options-nav-bar button:hover{
    border-bottom: solid 3px var(--accent-color);
}

.options-nav-bar{
    margin-top: 25px;
    padding-top: 8px;
    padding-bottom: 8px;
    display: flex;
    justify-content: left;
    position: sticky;
    z-index: 1;
    margin-bottom: 30px;
    border-bottom: solid 3px var(--secondary-color);
}

.nav-bar-option{
    color: var(--race-font-correct-color);
}

.selected{
    color: var(--accent-color);
    border-bottom: solid 3px var(--accent-color);
}

/* Section - 1 (Performance) */
.performance-overview{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.tile-user-stats{
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-radius: 8px;
    align-items: center;
    width: 29%;
    background: linear-gradient(60deg, var(--secondary-color), var(--background-color), var(--primary-color));
    background-size: 300%;
    background-position: 0% 50%;
    font-weight: 800;
}

.tile-user-stats-left{
    margin-left: 15px;
}

.tile-user-stats-right{
    margin-right: 15px;
}

.container-chart-last-100-races{
    width:100%;
    height: 250px;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    border-radius: 8px;
    margin-top: 30px;
}

/* Container for Heatmap and Streak info */
.container-chart-typing-activity{
    display: flex;
    width: 100%;
    margin-bottom: 35px;
    justify-content: space-between;
}

.container-streak{
    width: 30%;
    background: linear-gradient(60deg, var(--secondary-color), var(--background-color), var(--primary-color));
    background-size: 300%;
    background-position: 0% 50%;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
}

.container-streak-left{
    width: 100%;
    display: flex;
    flex-direction: column;
}

.streak-text{
    line-height: 0;
    color: var(--accent-color);
}

#streakExpiryValue{
    color: var(--race-font-warning-color);
    font-weight: 600;
}

.streak-img{
    width: 50px;
    height: 50px;
}

.heatmap-container{
    display: flex;           /* one row of weeks */
    flex-direction: row;
    gap: 2px;                /* spacing between weeks */
    width: 62.5%;
    box-sizing: border-box;
    justify-content: left;
    margin-left: 40px;
    align-items: center;
}

.week-col {
  display: grid;
  grid-template-rows: repeat(7, 1fr); /* 7 days vertically */
  flex: 1 1 0;                         /* shrink to fit container */
  gap: 2px;
}

.day-box {
  width: 100%;         /* fills grid cell */
  aspect-ratio: 1 / 1; /* keeps square */
  border-radius: 0.3em;
  background-color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7em;
  position: relative;
}

.day-box:hover {
  outline: 0.1em solid var(--race-font-warning-color);
}

.heatmap-month{
    position: absolute;
    top: 125%;
    left:50%;
    transform: translate(-50%, 0);
    color: var(--race-font-correct-color);
    font-weight: 600;
}

.heatmap-day{
    position: absolute;
    top: 50%;
    left: -100%;
    transform: translate(-50%, -50%);
    color: var(--race-font-correct-color);
    font-weight: 600;
}


/* Section - Customise */
.customise-section{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
}

.customise-theme, .customise-race-color, .customise-keyboard-layout, .customise-flag, .customise-race-settings{
    /* background: linear-gradient(130deg, var(--primary-color), var(--background-color), var(--secondary-color), var(--primary-color));
    background-size: 300%;
    background-position: 0% 50%; */
    background: var(--primary-color);
    border-radius: 8px;
    padding: 15px;
}

.customise-race-color, .customise-keyboard-layout{
    width: 47.5%;
}

.customise-keyboard-layout, .customise-flag{
    margin-top: 15px;
}


.info-tiles{
    display: flex;
    flex-direction: column;
}

.advanced-themes-button, .themes-button{
    width: 30px;
    height: 30px;
    position: absolute;
    right: 0;
    transform: translate(0%, -49%);
}

.btn-reset-colors{
    width: 100%;
    height: 35px;
    border: none;
    margin: 0 auto;
    display: block;
    font-weight: 600;
}

.container-mt-custom-themes{
    display: flex; 
    flex-direction: row; 
    justify-content: space-between;
}

.theme-mt, .theme-custom{
    width: 49%;
}

.main-container-mt-themes{
    width: 95%;
    margin: 0 auto;
}

.import-export-container{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 5px;
}

.import-export-theme {
    width: 49.5%;
    background: var(--secondary-color);
    border-style: none;
    height: 35px;
    font-weight: 600;
}

.customise-race-color{
    margin-top: 15px;
}

.btn-color-selector{
    border-radius: 100%;
    padding: 18px;
    margin-right: 8px;
}

.info-tile-customise h2{
    position: relative;
    background-color: var(--primary-color);
    margin-bottom: 10px;
    margin-top: 10px;
    padding: 8px;
}

.colour-info{
    margin-bottom: 8px;
}

.container-customise-race-color-keyboard-layout{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.customise-flag{
    width: 100%;
}

#selectedCountry{
    position: absolute;
    font-size: x-large;
    top: 50%;
    transform: translate(0, -50%);
}

.rank-info, .last-race-info, .streak-info{
    position: relative;
    width:25%;
    font-weight: 700;
    display:flex;
    flex-direction: column;
    align-items: center;
}

.performance-container{
    width: 70%;
    display: flex;
    flex-direction: column;
}

.verify-info{
    width: 47%;
    background: linear-gradient(60deg, var(--secondary-color), var(--background-color), var(--primary-color));
    background-size: 300%;
    background-position: 0% 50%;
    border-radius: 8px;
    padding: 15px;
}

.container-verify-account{
    width: 100%;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.container-tile-heading{
    border-bottom: 1px solid var(--race-font-correct-color);
}

.container-verify-account button{
    width: 60%;
    display: block;
    margin: 0 auto;
    margin-top: 5px;
}

.container-verify-account img, .rank-info img{
    position: relative;
    width:15%;
}

.rewards{
    width: 47%;
    background: linear-gradient(60deg, var(--secondary-color), var(--background-color), var(--primary-color));
    background-size: 300%;
    background-position: 0% 50%;
    border-radius: 8px;
    padding: 15px;
}

.container-rewards{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
}

.container-earning-status{
    margin-top: 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.earning-status{
    color: var(--font-color);
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color), var(--secondary-color));
    background-size: 300% 300%;
    animation: gradientShift 5s ease infinite;
    display: inline-block;
    padding: 8px;
    border-radius: 8px;
    font-weight: 600;
}

.container-races-progress{
    width: 100%;   
}

.container-rank-timeline{
    background: linear-gradient(130deg, var(--primary-color), var(--background-color), var(--secondary-color), var(--primary-color)); 
    background-size: 300%;
    background-position: 0% 50%;
    border-radius: 8px;
    padding: 15px;;
}

.rank-timeline{
    width: 90%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 15px;
    margin: 0 auto;
}

.container-rank{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.container-rank h3{
    margin-block-start: 8px;
    margin-block-end: 5px;
}

.container-rank-progress{
    background: linear-gradient(130deg, var(--primary-color), var(--background-color), var(--secondary-color), var(--primary-color)); 
    background-size: 300%;
    background-position: 0% 50%;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.container-rank-progress-overall-rank-progress-items{
    width: 65%;
}

.container-rank-improvement-insights{
    width: 25%;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    margin-top: 35px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color), goldenrod);
    background-size: 300% 300%;
    animation: gradientShift 5s ease infinite;
    color: var(--font-color);
    padding: 12px;
    border-radius: 8px;
}

#rankImprovementInsightHeading{
    font-weight:600;
}

#rankImprovementInsightDescription{
    font-size: 14px;
}

.rank-progress-overall{
    width: 100%;
}

.rank-progress{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    flex-wrap: wrap;
}

.rank-progress-items{
    width:100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.rank-progress-item{
    width: 25%;
    margin: 5px;
}

.rank-style-progress {
    width:100%;
    position: relative;
    height: 25px;
    border-radius: 7px;     
    transition: ease .4s;
    background-color: var(--accent-color);
    border: none;
}

.line{
    width: 10%;
    height: 3px;
    background-color: var(--race-font-correct-color);
    transform: translate(0, -15px);
    margin-right: 5px;
}

.account-info{
    display:flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.last-race-insights, .rank-progression{
    display:flex;
    text-align: left;
    flex-direction: column;
    padding: 15px;
    border-radius: 12px;
}

.rank-progression{
    flex-direction: row;
    justify-content: center;
}

.info-rank-progression{
    display:flex;
    width:25%;
}

.info-rank-overall-progression{
    display:flex;
    width:90%;
    margin: 0 auto;
}

.last-race-info{
    width: 30%;
}

.last-race-info .insight{
    color: var(--font-color);
}

.last-race-info p{
    margin-top: 40px;
}

.insight{
    background-color: var(--background-color);
    border-bottom: 5px solid var(--secondary-color);
    margin-bottom: 10px;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
}

.rank{
    text-transform: capitalize;
}

.insight-indicator{
    display: inline-block;
}

/* Section - 2 (Rank progression) */
.info-rank-overall-progression .value-arc path{
    fill: var(--secondary-color) !important;
}

.rank-progression .value-arc path{
    fill: var(--accent-color) !important;
}

/* Payout */
.btn-payout{
    background: var(--primary-color);
    margin-top: 25px; 
    border-radius: 5px;
    border: none;
    height: 35px;
    width: 100%;
    text-align: center;
    display: none;
}

.btn-payment:hover{
    background-color:var(--accent-color);
    cursor: pointer;
}

/* Section - 4 (Rewards) */
.container-races-progress{
    margin: 0 auto;
    background-color: var(--secondary-color);
    border-radius: 7px;
}

.pb-total-races{
    position:absolute;
    top:50%;
    right:0;
    transform:translate(-0%,-50%);
    z-index:1;
}

.text-completed-races{
    position:absolute;
    left:1%;
    top:50%;
    margin-left: 5px;
    transform:translate(-1%,-50%);
}

/* Section - 5 (Race color customisation) */
.btn-color-save, .btn-theme-selector{
    border-radius: 5px;
    border: none;
    padding: 15px;
    text-align: center;
    margin:5px;
    font-weight:600;
}

.btn-color-selector:hover, .btn-color-save:hover, .btn-theme-selector{
    cursor: pointer;
}

.btn-color-save{
    display:none;
    transition: ease .4s;
    margin:0 auto;
    margin-top: 20px;
    width:100%;
    padding:10px;
}

.race-track-container{
    width:100%;
}

/* Section 6 - (Country flag selection) */
.btn-country-selector{
    padding: 15px;
    border-radius: 5px;
    border: none;
    text-align: center;
    margin-right: 5.5px;
    position: relative;
}

.btn-country-selector:hover{
    cursor: pointer;
}

.flag-container, .theme-container, .keyboard-container{
    display: flex;
    flex-wrap: wrap;
    overflow-y: auto;
    max-height: 150px;
}

.keyboard-layout-container{
    color: var(--race-font-correct-color);
    font-weight: 800;
}


.country-flag{
    margin-top: 5px;
    margin-left: 0 !important;
}

.flag-lookup{
    color: var(--font-color);
    height: 40px;
    width: 99%;
    display: block;
    margin-bottom: 10px;
}

.flag-lookup::placeholder {
    opacity: 1; 
}

/* Section - 7 (Keyboard Layout Selection) */
.btn-keyboard-selector{
    width: 175px;
    padding: 15px;
    border-radius: 5px;
    border: none;
    text-align: center;
    margin:5px;
    position: relative;
}

/* Section - 8 (Race Settings) */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--secondary-color);
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    background-color: var(--font-color);
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
  background-color: var(--accent-color);
}

input:hover + .slider {
    cursor: pointer;
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    -webkit-transform: translateX(100%);
    -ms-transform: translateX(100%);
    transform: translateX(100%);
}

select{
    text-align: center;
}

select:hover{
    cursor: pointer;
}

option {
    border: none;
    outline: none;
    scroll-behavior: smooth;
}

text {
    fill: var(--race-font-correct-color) !important;
}

#subHeadingLastRaceInsights{
    color: var(--font-color);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 100%;
}

.container-race-settings{
    display:flex;
    flex-direction: column;
    padding: 15px;
}

.race-setting{
    display:flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px;
    padding: 10px;
}

.setting-title-description{
    width: 80%;
}

.setting-toggle{
    width: 5%;
}

.container-race-settings p{
    margin-block-start: 0px;
    margin-block-end: 0px;
    padding:0;
    margin:0;
}

.container-race-settings h2{
    margin-block-start: 8px;
    margin-block-end: 8px;
    padding-bottom:5px;
    margin:0;
}

/* Section - 7 (Theme customisation) */
.btn-theme-selector{
    width: 175px;
    height: 60px;
}

.theme-collapse{
    cursor: pointer;
}
  
.theme-presets, .words-presets{
    height: 30px;
    width: 50px;
    border: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
}

.theme-presets{
    width: 100%;
    display: none;
}

.theme-presets::-ms-expand {
    display: none;
}

.themes-container{
    transition: height 0.2s ease-in-out;
    overflow: auto;
    height: 370px;
}

.advanced-themes-container{
    transition: height 0.2s ease-in-out;
    overflow: hidden;
    height: 370px;
}

.advanced-themes-container.collapsed, .themes-container.collapsed{
    height:0;
}






.theme-info span{
    color: var(--accent-color);
}

.advanced-themes-container input[type=color]{
    opacity: 1;
    border: none;
    background:none;
    float: right;
}

.advanced-themes-container input[type="color"]::-webkit-color-swatch-wrapper {
      padding: 0;
}

.advanced-themes-container input[type="color"]::-webkit-color-swatch {
    height: 15px;
    border-radius: 5px;
}




.import-modal{
    border-radius: 15px;
    text-align: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: var(--secondary-color);
    width: 50%;
    height: 50%;
    padding: 10px;
    opacity:0.9;
}

.modal-close{
    float:right;
}

.import-theme-error{
    color: var(--font-color);
}

/* Cleaned - 07/08/2023 */
