/***********************************************************************
*** CSS Reset***
************************************************************************/
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@800&family=Nunito+Sans:wght@300&display=swap');
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  font-family: 'Nunito Sans', sans-serif;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
  height: 100%;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
   scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:root {
    --Dark-Blue: hsl(209, 23%, 22%);
    --Very-Dark-Blue: hsl(207, 26%, 17%);
    --Very-Dark-Blue-2: hsl(200, 15%, 8%);
    --Dark-Gray: hsl(0, 0%, 52%);
    --Very-Light-Gray: hsl(0, 0%, 98%);
    --White:hsl(0, 0%, 100%);
}


/********************
*** Dark Mode*******
********************/
.dark-mode {
    background-color: var(--Very-Dark-Blue);
    color: var(--White);
    transition: background-color 0.5s ease-in-out;
}
.dark-mode header {
    color: var(--White);
    background-color: var(--Dark-Blue);
}

.dark-mode span{
    color: var(--White);
}

.dark-mode .form-control,
.dark-mode .form-select {
  background-color: var(--Very-Dark-Blue);
  color: var(--White);
  border-color: var(--Dark-Gray);
}

.dark-mode .input-group-text {
  background-color: var(--Very-Dark-Blue);
  color: var(--White);
  border-color: var(--Dark-Gray);
}

.dark-mode .form-control:focus {
  border-color: var(--White);
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.dark-mode .form-control::placeholder {
  color: var(--White);
}

.dark-mode .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.dark-mode .card  {
  background-color: var(--Dark-Blue);
  color: var(--White);
}

.dark-mode .crescent-image-container {
  filter: brightness(0) invert(1);
}

.dark-mode .back-arrow {
  filter: invert(100%);
}

.dark-mode .back-button {
  background-color: var(--Dark-Blue);
  border-color: var(--Dark-Gray);
  color: var(--White);
}

.dark-mode .back-button:hover {
  background-color: var(--Dark-Gray);
}
/****************************
********* Light Mode *******
***************************/
.light-mode {
    background-color: var(--Very-Light-Gray);
    color: var(--Very-Dark-Blue-2);
    transition: background-color 0.5s ease-in-out;
}

.light-mode header{
    background-color: var(--White);
    color: black;
}

/* crescent image container */
.crescent-image-container {
    width: auto;
    height: 2rem;
    margin-right: 0.5rem;
}

.light-mode .back-button {
  background-color: var(--White);
  border-color: var(--Dark-Gray);
  color: var(--Very-Dark-Blue-2);
}

.light-mode .back-button:hover {
  background-color: var(--Dark-Gray);
}

/************************
*** custom styling ******
*************************/
.custom-input {

    border: 1px solid var(--Dark-Gray);
    padding: 0.5rem;
}

.custom-select {

    border: 1px solid var(--Dark-Gray);
    padding: 0.5rem;
}

.custom-select-wrapper {
  position: relative;
  display: inline-block;
}

.custom-chevron {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  pointer-events: none;
}
/* Card  */
.card {
  width: 18rem;
  margin: 15px 15px;
  display: inline-block;
  vertical-align: top;
  /* border-radius: 1rem; */
  height: 350px;
  opacity: 1;
  transition: opacity 1.5s ease;
}
.card.hide {
  opacity: 0;
}
.card-img-top {
  border-radius: 0.5rem 0.5rem 0 0;
  width: 100%;
  height: auto;
}

.card:hover {
  transform: scale(1.15);
  transition: transform 0.5s ease;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

/* back button */
.back-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.8rem;
}

.back-arrow {
  width: 20px;
  height: 20px;
}

/*********************
******Country Page***
********************/

.border-country{
  /* margin: 0px 5px; */
  margin-right: 1rem;
  padding: 0.2rem 0.8rem;
  border: 1px solid currentcolor;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
  display: inline-block; /* Add display property for better responsiveness */
  min-width: 80px;
  max-width: 120px;
}

.border-country:hover{
  background-color: var(--Dark-Gray);
  color: var(--White);
}


.mode-text{
  font-size: 1.5rem;
}
/***************
**Miscellaneous**
****************/

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: white;
}

.spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.spinner:before {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-left-color: white;
  border-radius: 50%;
  animation: spinner 1s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

@keyframes slide-in {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in {
  opacity: 0;
  animation-name: slide-in;
  animation-duration: 0.5s;
  animation-fill-mode: forwards;
}

/* Mobile Responsiveness */


/* header */
@media (min-width: 350px) and (max-width: 380px) {
  .crescent-image-container {
    width: auto;
    height: 2rem;
    margin-right: 0rem;
  }
}

@media (max-width: 767.98px) {
  #filterInput.w-50 {
    width: 100% !important;
  }
}

@media (max-width: 767.98px) {
  .ms-sm-5 {
    margin-left: 3rem !important; /* equivalent to Bootstrap's ms-5 */
  }
}

@media (min-width: 768px) {
  .ms-sm-5 {
    margin-left: 0 !important;
  }
}

    /* debug */
  /* * {
    background: #000 !important;
    color: #0f0 !important;
    outline: solid #f00 1px !important;
  } */