@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

:root {
    --background: hsl(210, 100%, 12%);
    --foreground: hsl(41, 58%, 81%);
    --accent1: hsl(203, 41%, 39%);
    --accent2: hsl(199, 31%, 55%);
    --accent3: hsl(211, 100%, 50%);
    --accent4: hsl(211, 80%, 30%);
    --accent5: hsl(211, 60%, 24%);
    --danger: hsl(0, 100%, 36%);

    /* font-sizes */
    --fs-xl: 4vh;
    --fs-l: 3vh;
    --fs-m: 2.6vh;
    --fs-s: 2vh;
    --fs-xs: 1.8vh;
    --fs-xxs: 1.6vh;
    --fs-xxxs: 1.4vh;
    --fs-xxxxs: 1.2vh;

    /* spacing */
    --sp-xxl: 3.2rem;
    --sp-xl: 2.8rem;
    --sp-l: 2.2rem;
    --sp-m: 1.8rem;
    --sp-s: 1.2rem;
    --sp-xs: .8rem;
    --sp-xxs: .4rem;
    --sp-xxxs: .2rem;
}

* {
    padding: 0;
    margin: 0;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--accent2);
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background-color: var(--background);
}

body {
    background-color: var(--background);
    color: var(--foreground);

    font-family: "Rubik", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

main {
    min-height: 90vh;
    /* after 90 scrollbar is shown */
}

main h1 {
    font-size: var(--fs-xl);
    padding: var(--sp-l);
    text-align: center;
}

main h2 {
    font-size: var(--fs-l);
    padding: var(--sp-m);
    text-align: center;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-space-bn {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

.no-drag {
    -webkit-user-drag: none;
}

.no-select {
    user-select: none;
}

.hidden {
    display: none !important;
}

.spacerXS {
    height: 2.5vh;
}

.spacerS {
    height: 5vh;
}

.spacerM {
    height: 7vh;
}

.spacerL {
    height: 10vh;
}

.danger {
    background-color: var(--danger) !important;
}

.danger-text {
    color: var(--danger) !important;
}

/* smaller number inputs */
form .smallField {
    min-width: auto !important;
    width: 3.5rem !important;
}

form .shortField {
    min-height: auto !important;
    height: 1.7vh !important;
}

/* checkbox styles */
.checkbox-container ul {
    list-style: none;
    text-align: left;
    margin: var(--sp-xs);
}

.checkbox-container ul li {
    margin: var(--sp-xxs) 0;
    padding: var(--sp-xxxs) var(--sp-xxs);
    font-weight: 100;
    font-size: var(--fs-s);
}

.checkbox-container ul li label {
    padding: var(--sp-s) var(--sp-xs);
    cursor: pointer;
}

.checked {
    animation: fade-in 0.5s ease;
    background-color: var(--accent1);
    border-radius: 30px;
}

.checkbox-container input[type=checkbox] {
    min-width: auto;
    width: 16px;
    height: 16px;
    cursor: inherit;
}

/* AUTH PAGE */
main#auth {
    min-height: 50vh;
    /* this is temporary */

    text-align: center;
    padding: var(--sp-xl);
}

main#auth .container {
    animation: fade-blur-in 1.3s ease;
}

main#auth a {
    color: var(--accent1);
}

main#auth p {
    font-size: var(--fs-s);
}

.myForm {
    font-size: var(--fs-m);
    text-align: center;
}

.myForm input {
    margin-top: var(--sp-xs);
    margin-bottom: var(--sp-s);
}

.myForm #type-select {
    justify-content: center;
    align-items: center;
}

.myForm input {
    width: 300px;
    height: 36px;
    border-radius: 8px;
    border: 0;
    outline: none;
    padding: var(--sp-xxs) var(--sp-xs);
    font-size: var(--fs-s);
    background-color: var(--accent2);
    color: var(--foreground);
}

.myForm #custom-label {
    display: block;
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* hide/show password btn */
.showHidePassBtn {
    width: 36px;
    padding: var(--sp-xxs);
    font-size: var(--fs-s);
    border-radius: 8px;
    border: 0;
    background-color: var(--accent1);
    color: var(--foreground);
    transform: translateX(20px);
    transition: .15s ease;
}

.showHidePassBtn:active {
    scale: .8;
}

.myForm .password {
    transform: translateX(20px);
}

/* Custom radio button */
.checkmark {
    position: absolute;
    top: 3px;
    left: 3px;
    height: 22px;
    width: 22px;
    background-color: #eee;
    border-radius: 50%;
}

.checkmark:hover {
    background-color: var(--foreground);
}

.container input:checked~.checkmark {
    background-color: var(--accent2);
}

/* Indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the indicator when checked */
.container input:checked~.checkmark:after {
    display: block;
}

/* Style the indicator */
.container .checkmark:after {
    top: 7px;
    left: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* submit  btn */
form #submitBtn {
    display: inline-block;
    position: relative;
    outline: none;
    cursor: pointer;
    border: none;
    border-radius: 500px;

    font-size: var(--fs-s);
    font-weight: 700;

    letter-spacing: 0.05rem;
    overflow: hidden;
    background: var(--foreground);
    color: white;

    margin: 20px 0;
    padding: var(--sp-xs) var(--sp-l);

    transition: .3s ease;
}

form #submitBtn span {
    position: relative;
    z-index: 10;
    transition: color 0.4s;
    color: var(--foreground);
}

form #submitBtn:hover span {
    color: var(--accent1);
}

form #submitBtn::before,
form #submitBtn::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

form #submitBtn::before {
    content: "";
    background: var(--accent1);
    width: 120%;
    left: -10%;
    transform: skew(30deg);
    transition: transform 0.4s cubic-bezier(0.3, 1, 0.8, 1);
}

form #submitBtn:hover::before {
    transform: translate3d(100%, 0, 0);
}

form #submitBtn:active {
    scale: .9;
}

.error-container {
    color: var(--accent2);
    text-align: center;
    margin: var(--sp-s);
    padding: var(--sp-xs);
    border-radius: 40px;
    font-weight: bold;
    font-size: var(--fs-m);
    background-color: var(--foreground);
    animation: fade-blur-in 1s ease;
    position: relative;
}

.error-container i {
    position: absolute;
    top: 13px;
    right: 16px;
    transition: .3s ease;
}

.error-container i:hover {
    scale: 1.1;
    color: red;
}

#error {
    color: red;
}

/* test comment */

/* PROMPT WINDOW STYLES */
.promptWindow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateY(-50%) translateX(-50%);
    font-size: var(--fs-m);
    background-color: var(--accent2);
    padding: var(--sp-m);
    border-radius: 8px;
    animation: fade-in .5s ease;
    /* backdrop-filter: blur(10px); */
}

.promptWindow #question {
    font-weight: bold;
}

.promptWindow button {
    border: 1px solid var(--accent2);
    border-radius: 8px;
    padding: var(--sp-xs) var(--sp-m);
    margin: var(--sp-s) var(--sp-xxs);
    background-color: var(--background);
    color: var(--foreground);
    font-size: var(--fs-xs);
    transition: .3s ease;
}

.promptWindow button:hover {
    border-color: var(--background);
    background-color: var(--accent2);
}

/* loader */
.loader-container {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
}

/* HTML: <div class="loader"></div> */
.loader {
    width: 100px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 8px solid var(--foreground);
    animation:
        l20-1 0.8s infinite linear alternate,
        l20-2 1.6s infinite linear;
}

@keyframes l20-1 {
    0% {
        clip-path: polygon(50% 50%, 0 0, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%)
    }

    12.5% {
        clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%)
    }

    25% {
        clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 100%, 100% 100%, 100% 100%)
    }

    50% {
        clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 100%, 50% 100%, 0% 100%)
    }

    62.5% {
        clip-path: polygon(50% 50%, 100% 0, 100% 0%, 100% 0%, 100% 100%, 50% 100%, 0% 100%)
    }

    75% {
        clip-path: polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 50% 100%, 0% 100%)
    }

    100% {
        clip-path: polygon(50% 50%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 0% 100%)
    }
}

@keyframes l20-2 {
    0% {
        transform: scaleY(1) rotate(0deg)
    }

    49.99% {
        transform: scaleY(1) rotate(135deg)
    }

    50% {
        transform: scaleY(-1) rotate(0deg)
    }

    100% {
        transform: scaleY(-1) rotate(-135deg)
    }
}

/* back button styles */
#backBtn {
    border: 1px solid var(--accent2);
    border-radius: 5px;
    background-color: var(--background);
    color: var(--foreground);
    padding: var(--sp-xxs) var(--sp-xs);
    margin: var(--sp-xs);
    font-size: var(--fs-xs);
    transition: .25s ease;
    position: relative;
}

#backBtn span {
    cursor: pointer;
    display: inline-block;
    position: relative;
    transition: 0.5s;
}

#backBtn span::before {
    content: "\00AB";
    position: absolute;
    opacity: 0;
    top: 0;
    left: -20px;
    transition: 0.3s;
}

#backBtn:hover {
    border-color: var(--accent2);
    background-color: var(--accent1);
    color: var(--background);
}

#backBtn:hover span {
    padding-left: 18px;
    color: var(--background);
}

#backBtn:hover span::before {
    color: var(--background);
    opacity: 1;
    left: 0;
}

#backBtn:active {
    scale: .8;
}

/* HOME PAGE CSS */
main#home {
    padding: var(--sp-s) 0;
}

#home .page-cards {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

#home .page-cards .card {
    margin: var(--sp-s);
    position: relative;
    display: inline-block;
    border-radius: 8px;
    width: 100%;
    height: 40vh;
    cursor: pointer;

    transform-style: preserve-3d;
    /* Important for 3D transforms */

    perspective: 1000px;
    /* Sets the depth of the 3D effect */

    transition: transform 0.2s ease;
    /* Smooth transition back to normal */

    transition: scale .2s ease;
}

#home .page-cards .card:active {
    scale: .9;
}

#home .page-cards .card #card-title {
    position: absolute;
    /* Position the <h2> inside the card */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: var(--fs-l);
    z-index: 2;
    text-transform: uppercase;
}

#home .page-cards .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    border-radius: inherit;
}

#home .page-cards .card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

main#home .promo-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

main#home .promo-placeholder {
    margin: var(--sp-s) var(--sp-xs);
    height: 36vh;
    border: 3px dashed var(--accent4);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

main#home .promo-placeholder p {
    color: var(--accent4);
    font-size: var(--fs-m);
    text-align: center;
    padding: var(--sp-s);
}

/* checkbox search */
#visitCountrySearch {
    width: 20vw;
    position: sticky;
    top: 4px;
}

/* CUSTOM GENERAL SEARCH */
.search-container {
    position: relative;
    margin: var(--sp-s) auto;
}

.search-container input {
    width: 100%;
    font-size: var(--fs-s);
}

.search-container ul {
    list-style: none;
    position: absolute;
    min-width: 50%;
    max-height: 300px;
    overflow-y: auto;
    background-color: hsla(0, 0%, 0%, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: var(--sp-xxs) 0;
}

.search-container ul li {
    padding: var(--sp-xs) var(--sp-s);
    cursor: pointer;
    color: var(--foreground);
    border-radius: 8px;
}

/* flatpickr css */
.nextMonthDay,
.prevMonthDay {
    color: #393939 !important;
}

.nextMonthDay.selected,
.prevMonthDay.selected {
    color: #fff !important;
}

.flatpickr-disabled {
    color: silver !important;
}

.addBtn {
    padding: var(--sp-xxs) var(--sp-xs);
    font-size: var(--fs-xs);
    color: var(--foreground);
    background-color: transparent;
    border: 1px solid var(--accent2);
    border-radius: 8px;
    transition: 0.3s ease;
}

.addBtn:hover {
    scale: 1.08;
}

.addBtn:active {
    scale: 0.9;
}

span#euro {
    /* for readability (euro sign) */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.checkbox-list {
    list-style-type: none;
}

.checked-checkboxes {
    list-style: none;
    display: flex;
    justify-content: start;
    flex-wrap: wrap;
}

.checked-checkboxes li {
    padding: var(--sp-xxxs) var(--sp-xs);
    margin: var(--sp-xxs) var(--sp-xxxs);
    background-color: var(--accent1);
    color: var(--foreground);
    border-radius: 30px;
    font-size: var(--fs-s);
    display: flex;
    justify-content: center;
    align-items: center;

    animation: fade-blur-in .5s ease;
}

.checked-checkboxes li #removePlace {
    color: var(--danger);
    margin-left: var(--sp-xxxs);
    font-size: var(--fs-l);
}

/* Custom search as list for city/place */
.dropdown-results {
    position: absolute;
    background-color: var(--background);
    padding: var(--sp-xs);
    margin: var(--sp-xxxs);
    border-radius: 8px;
    box-shadow: 0 0 4px var(--foreground);
    /* border: 1px solid var(--foreground); */
    animation: fade-in .3s;
    font-size: var(--fs-s);

    max-height: 40vh;
    width: 16vw;
    overflow-y: auto;
    /* Allow scrolling if the list is too long */

    z-index: 1;

    text-align: left;
}

.dropdown-results li.checkbox-li label {
    font-size: var(--fs-s);
}

.dropdown-results li.checkbox-li {
    transition: .3s ease;
    margin: var(--sp-xs);
    cursor: pointer;
    list-style: none;
}

.dropdown-results li.checkbox-li:hover {
    scale: 1.05;
}

.dropdown-results .place-region {
    background-color: var(--accent4);
    border-radius: 8px;
    padding: var(--sp-xxxs) var(--sp-s);
    font-weight: bold;
}

/* custom accordion */
.accordion,
.accordion-static {
    background-color: var(--accent4);
    width: 100%;
    border-radius: 30px;
}

.accordion #title,
.accordion-static #title {
    font-size: var(--fs-m);
    font-weight: 600;
    color: var(--background);
    background-color: var(--foreground);
    cursor: pointer;
    border-radius: 50px;
    padding: var(--sp-xxs) var(--sp-xs);
    margin: var(--sp-s) 0;
    box-shadow: 0 0 6px rgba(0, 0, 0, .5);
}

.accordion .content {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    padding: var(--sp-xs);
}

.accordion-static .content {
    height: auto;
    overflow: visible;
    padding: var(--sp-xs);
}

/* end of accordion */

/* custom carousel */
.carousel-container {
    position: relative;
    max-width: 700px;
    margin: 10px auto;
    overflow: hidden;
}

.carousel {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.carousel-item {
    min-width: calc(100% / 3);
    /* 3 images per slide */
    padding: 5px;
    box-sizing: border-box;
}

.carousel-item img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

/* Buttons */
.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 22px;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    z-index: 5;
}

.prev {
    left: 5px;
}

.next {
    right: 5px;
}

/* Fullscreen */
.fullscreen-modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    text-align: center;
}

.fullscreen-modal img {
    max-width: 90%;
    max-height: 80%;
    margin-top: 5%;
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 35px;
    color: white;
    cursor: pointer;
}

.fullscreen-prev,
.fullscreen-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 22px;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    z-index: 5;
}

.fullscreen-prev {
    left: 20px;
}

.fullscreen-next {
    right: 20px;
}

/* CONTACT PAGE */
main#contact {
    font-size: var(--fs-m);
}

main#contact .contact-info {
    gap: var(--sp-s);
    padding-top: var(--sp-l);
}

main#contact .contact-info p a {
    color: var(--accent3);
}