/* Modaalin perusasetukset */
#profile-modal {
    position: fixed;
    top: 0;
    left: -100%; /* Initially hidden off the left */
    width: 90%; /* Modal width */
    height: 100%;
    background-color: #333;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    overflow-x: hidden;
    transition: 0.3s; /* Smooth open/close animation */
    z-index: 100000; /* Ensure modal is on top */
    color: #f5f5f5;
    font-family: "Irish Grover", system-ui;

    --login-btn-color: #3784A0;
    --login-btn-hover-color: #296277;
    --login-btn-click-color: #225061;

    --skateparks-btn-color: #478a4d;
    --skateparks-btn-hover-color: #3e7443;
    --skateparks-btn-click-color: #2e5732;

    --signup-btn-color: #268738;
    --signup-btn-hover-color: #1e6b2e;
    --signup-btn-click-color: #14511e;

    --formulario-btn-color: #8d4444;
    --formulario-btn-hover-color: #723737;
    --formulario-btn-click-color: #522828;
}

#profile-modal button{
    font-family: "Irish Grover", system-ui;
}

.light-mode #profile-modal {
    background-color: #dddddd;
    color: black;
}

.light-mode #profile-modal .modal-content {
    background-color: #dddddd;
}


#profile-modal .modal-content {
    background-color: #333;
    margin: 5%; 
}

/* Sulkunapin tyylit */
#ig {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    margin-top: 15px;
    margin-left: 15px;
}
#ig img {
    filter: grayscale(40%); /* Fully grayscale */
}

/* BACK BUTTON */
/* Log-out Button styles */
#profile-modal .back-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 20%;
    max-width: 80px;
    height: 40px;
    background-color: #314636;
    color: black;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
    box-sizing: border-box;
    vertical-align: middle;
    border-radius: 0 20px 20px 0; /* Half of the height */
}
.light-mode #profile-modal .back-btn {
    background-color: #628b6c;
}
#profile-modal .back-btn img{
    margin-top: 7px;
    margin-right: 7px;
}

#profile-modal .back-btn:hover {
    background-color: rgb(34, 44, 37) ;
    color: rgb(0, 0, 0);
}
.light-mode #profile-modal .back-btn:hover {
    background-color: #46644d ;
}
/* END BACK BUTTON */

/* Log-out Button styles */
#profile-modal #logout-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 20%;
    max-width: 80px;
    height: 40px;
    background-color: rgba(170, 74, 56, 0.6);
    color: black;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
    box-sizing: border-box;
    vertical-align: middle;
    border-radius: 0 20px 20px 0; /* Half of the height */
}
#profile-modal #logout-btn img{
    margin-top: 7px;
    margin-right: 7px;
}

#profile-modal #logout-btn:hover {
    background-color: rgba(170, 74, 56, 1) ;
    color: rgb(0, 0, 0);
}
/* END Log-out Button styles */

/* Profile container */
#profile {
    text-align: center; /* Center the content */
    margin: 50px 0px 50px 0px;
}

/* Profile image styling */
#profile #profile-img-div img {
    width: 120px;
    height: 120px;
    border-radius: 50%; /* Make the image circular */
    border: 3px solid #037048; /* Add a border for better visibility */
    margin-bottom: 0px; /* Space below the image */
}

/* Profile name styling */
#profile h2 {
    margin: 10px 0;
    font-size: 1rem;
    color: #f5f5f5;
}
.light-mode #profile h2 {
    color: black
}

#profile h3{
    margin-top: 4px;
    margin-bottom: 0px;
}

/* Profile details styling */
#profile p {
    margin: 8px 0;
    font-size: 1rem;
    color: #d1d1d1;
}
.light-mode #profile p {
    color: rgb(0, 0, 0);
}
/* UNLOGGED  */
.skateboard-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.to-login-window-btn-class{
    position: relative;
    width: 260px; /* 300 */
    height: 60px; /* 70 */
    border-radius: 30px; /* 35 */
    background-color: var(--login-btn-color);
    border: none;
    color: white; /* White text */
    font-size: 0.9rem; /* 1rem */
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
    border: 1px solid var(--login-btn-click-color);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.3), inset 0px 0px 5px rgba(255, 255, 255, 0.2);
}
button#skateparks-btn{
    background-color: var(--skateparks-btn-color);
    border: 1px solid var(--login-btn-click-color);
}
/* Truck holes: Left side */
.to-login-window-btn-class .truck-holes-left {
    position: absolute;
    top: 23px; /* 28 */
    left: 37px; /* 42 */
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 6px; /* 7 */
}

.to-login-window-btn-class .truck-holes-left div {
    width: 4px;
    height: 4px;
    background-color: rgb(37, 37, 37);
    border-radius: 50%;
}

/* Truck holes: Right side */
.to-login-window-btn-class .truck-holes-right {
    position: absolute;
    top: 23px; /* 28 */
    right: 37px; /* 42 */
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 6px; /* 7 */
}

.to-login-window-btn-class .truck-holes-right div {
    width: 4px;
    height: 4px;
    background-color: rgb(37, 37, 37);
    border-radius: 50%;
}

button#to-login-window-btn:hover {
    background-color: var(--login-btn-hover-color); /* Darker shade on hover */
}

button#to-login-window-btn:active {
    background-color: var(--login-btn-click-color); /* Even darker on click */
}

button#skateparks-btn:hover {
    background-color: var(--skateparks-btn-hover-color); /* Darker shade on hover */
}

button#skateparks-btn:active {
    background-color: var(--skateparks-btn-click-color); /* Even darker on click */
}

.to-signup-window-btn-small{
    width: 120px;
    height: 40px;
    border-radius: 20px;
    background-color: var(--formulario-btn-color);
    color: white;
    border: 1px solid var(--formulario-btn-click-color);
    transition: 0.3s;
    font-size: 1rem;
    cursor: pointer;
}
.to-signup-window-btn-small:hover{
    background-color: var(--formulario-btn-hover-color);
}
.to-signup-window-btn-small:active{
    background-color: var(--formulario-btn-click-color);
}

#show-login.to-signup-window-btn-small{
    background-color: var(--formulario-btn-color);
}
#show-login.to-signup-window-btn-small:hover{
    background-color: var(--formulario-btn-hover-color);
}
#show-login.to-signup-window-btn-small:active{
    background-color: var(--formulario-btn-click-color);
}


/* END UNLOGGED  */

/* SIGNUP USERNAME */
/* Style for input fields */
input[type="text"], 
input[type="password"] {
    width: 180px;
    height: 40px;
    border-radius: 22px;
    background-color: var(--signup-btn-color);
    border: 1px solid #d1d1d1; /* Border to match color */
    font-size: 1rem;
    align-content: center;
    margin-bottom: 10px; /* Space between input fields */
    text-align: center;
    font-family: "Irish Grover", system-ui;
}

input[type="text"]:focus, 
input[type="password"]:focus {
    border-color: var(--signup-btn-click-color); /* Darker shade on focus */
}

input.login-input[type="text"], 
input.login-input[type="password"] {
    background-color: var(--login-btn-color);
}

input.login-input[type="text"]:focus, 
input.login-input[type="password"]:focus {
    border-color: var(--login-btn-click-color); /* Darker shade on focus */
}

/* Style for button */
button#signup-submit {
    width: 250px;
    height: 60px;
    border-radius: 30px;
    background-color: var(--signup-btn-color); /* Main color */
    border: 1px solid white;
    color: white; /* White text */
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

button#signup-submit:hover {
    background-color: var(--signup-btn-hover-color); /* Darker shade on hover */
}

button#signup-submit:active {
    background-color: var(--signup-btn-click-color); /* Even darker on click */
}
button#signup-submit .truck-holes-left {
    top: 24px;
    left: 36px;
    grid-gap: 5px;
}
button#signup-submit .truck-holes-right {
    top: 24px;
    right: 36px;
    grid-gap: 5px;
}

button#login-submit {
    width: 250px;
    height: 60px;
    border-radius: 30px;
    background-color: var(--login-btn-color); /* Main color */
    color: rgb(255, 255, 255); /* White text */
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
    border: 1px solid white;
}

button#login-submit:hover {
    background-color: var(--login-btn-hover-color); /* Darker shade on hover */
}

button#login-submit:active {
    background-color: var(--login-btn-click-color); /* Even darker on click */
}

button#login-submit .truck-holes-left {
    top: 24px;
    left: 36px;
    grid-gap: 5px;
}
button#login-submit .truck-holes-right {
    top: 24px;
    right: 36px;
    grid-gap: 5px;
}


/* END SIGNUP USERNAME */


/* Skater points styling */
#skaterPoints h3 {
    font-size: 1rem;
    color: #f5f5f5;
    margin: 15px 0;
}
.light-mode #skaterPoints h3 {
    color: black;
}

.info-item {
    display: flex;
    align-items: center; /* Center content vertically */
    justify-content: center;
    margin: 10px 0;
}

/* Icon styles */

.pin-marker {
    --marker-size: 1.4rem; /* Variable to resize markers */
    position: relative;
    width: var(--marker-size);
    height: var(--marker-size);
    background-color: green; /* Change to blue for the spot marker */
    border-radius: var(--marker-size) var(--marker-size) 0; /* Creates the "pin" shape */
    transform: rotate(45deg); /* Points the pin downwards */
    border: 0.5px solid #FFFFFF;
    overflow: hidden;
    margin-right: 8px;
    margin-bottom: 5px;
}

/* Inner circle to mimic the pin's center */
.pin-marker-inner {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.4rem;
    height: 0.4rem;
    background-color: white;
    border-radius: 50%; /* Creates a circle */
    transform: translate(-50%, -50%);
}

/* Spot icon */
.spot-icon {
    background-color: #3968ED; /* const blueColor = '#3968ED' */
}

/* Skatepark icon */
.park-icon {
    background-color: #00910D; /* const greenColor = '#00910D' */
}
#profile-modal .close-btn {
    display: none;
}

/* Sulkunapin tyylit */
#profile-modal.open .close-btn {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 30%;
    height: 50px;
    background-color: #037048;
    color: black;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
    box-sizing: border-box;
    vertical-align: middle;
    border-radius: 0 25px 25px 0; /* Half of the height */
}
.light-mode #profile-modal .close-btn {
    background-color: #58a155;
}

/* Sulkunapin tyylit */
#profile-modal.open .close-btn:hover {
    background-color: #033b26 ; /* #034d31  */
    color: rgb(0, 0, 0);
}
.light-mode #profile-modal.open .close-btn:hover {
    background-color: #417440;
}

/* Modaalin näkyvä tila */
#profile-modal.open {
    left: 0; /* Menee vasemmasta laidasta esille */
}
