/* ----------------------------------
   RESET
---------------------------------- */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
}

body {
    overflow-x: hidden;
    overflow-y: auto;
}

/* ----------------------------------
   APP + MAP
---------------------------------- */
#map {
    width: 100%;
    height: 100%;
}

/* ----------------------------------
   SIDEBAR
---------------------------------- */

/* ------------------------------
   Sidebar
------------------------------ */

#sidebar {
    position:absolute;
    top:0;
    left:0;
    width:380px;
    max-width:90%;
    height:100%;
    background:#fff;
    z-index:1001;
    overflow: hidden;
    /* box-shadow:4px 0 18px rgba(0,0,0,.2); */
    border-right: 1px solid var(--navy);
    transform:translateX(-100%);
    transition:transform .3s ease;
}
#sidebar.open {
    transform:translateX(0);
}
.sidebar-inner {
    height: 100%;
    overflow-y:auto;
}
.location-card p {
    font-family: 'Roboto Mono';
}
/* ----------------------------------
   CLOSE BUTTON
---------------------------------- */
#close-sidebar {
    position: relative;
    z-index: 10;
    width: 35px;
    height: 35px;
    border: 1px solid black;
    border-radius: 0;
    background: none;
    color: black;
    font-size: 20px;
    cursor: pointer;
    margin: 1em;
}



/* ----------------------------------
   HEADER
---------------------------------- */
.sidebar-header h1 {
    margin: 0 0 10px;
    font-size: 32px;
}
.sidebar-header p {
    color: #666;
    line-height: 1.5;
}

/* ----------------------------------
   SEARCH
---------------------------------- */
.search-box {
    width: 25%;
}

/* ----------------------------------
   FILTERS
---------------------------------- */
.filters {
    width: 100%;
}

/* ----------------------------------
   LOCATION CARD
---------------------------------- */
.location-card {
    padding: 2em;
    font-family: 'Roboto Mono';
}
.location-image {
    width: 100%;
    height: 230px;
    object-fit: cover;
}
.location-card h2 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 28px;
    text-transform: uppercase;
    line-height: 31px;
    font-family: 'Roboto Mono';
    font-weight: 900;
}
.location-place {
    color: #666;
}
.weirdness {
    font-size: 18px;
    margin: 15px 0;
}
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag {
    background: #eeeeee;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-family: 'century-gothic';
}
p.description {
    line-height: 1.6;
    color: #333;
    font-family: 'century-gothic';
}
.status {
    font-weight: bold;
}
.visited {
    color: green;
}
.wishlist {
    color: #b8860b;
}
.researching {
    color: #276ef1;
}
.button {
    display: inline-block;
    margin: 20px 0 60px;
    padding: 12px 20px;
    background: #111;
    color:white;
    text-decoration:none;
    border-radius: 8px;
}

/* ----------------------------------
   EMPTY STATE
---------------------------------- */
.empty-state {
    margin-top: 60px;
    text-align:center;
    color:#777;
}
#map-controls {
    position: relative;
    z-index:900;
    display: flex;
    align-items:center;
    gap:15px;
    background:white;
    border-block: 1px var(--navy) solid;
}
.brand h1 {
    font-size:20px;
    margin:0;
}
.search-box input {
    width: 100%;
    padding: 1rem;
    border-right:1px solid var(--dark);
    font-family: 'century-gothic';
    border-left: 0;
    border-top: 0;
    border-bottom: 0;
}
#filters {
    display: flex;
    flex-wrap: wrap;
    place-self: end;
}
.filter {
    padding: 0 1rem 0 .1rem;
    cursor: pointer;
    text-transform: uppercase;
    font-size: .8em;
    font-family: 'Roboto Mono';
    display: flex;
}
.filter input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none; 
  margin: 0 .75em 0 0;
  width: 15px;
  height: 15px;
  border: 2px solid var(--red);
  border-radius: 1px;
  background-color: #fff;
  display: inline-grid;
  place-content: center;
  transition: all 0.2s ease-in-out;
}
.filter input[type="checkbox"]::before {
  content: "X";
  width: 10px;
  height: 10px;
  background-color: #fff;
  
  /* Create a custom checkmark shape using clip-path */
  clip-path: polygon(
  20px 0%, 50% calc(50% - 20px), calc(100% - 20px) 0%, 
  100% 20px, calc(50% + 20px) 50%, 100% calc(100% - 20px), 
  calc(100% - 20px) 100%, 50% calc(50% + 20px), 20px 100%, 
  0% calc(100% - 20px), calc(50% - 20px) 50%, 0% 20px);
  
  /* Hide the checkmark by default */
  transform: scale(0);
  transition: transform 0.15s ease-in-out;
}

/* 4. State styling: Checked */
.filter input[type="checkbox"]:checked {
  background-color: #003f37;
  border-color: #ff5858;
}

/* Reveal the checkmark when checked */
.custom-checkbox input[type="checkbox"]:checked::before {
  transform: scale(1);
}
@media (min-width: 769px) {
    .app {
        position: relative;
        width: 100%;
        aspect-ratio: 3/1;
        /* height: 100vh; */
    }
}
/* ----------------------------------
   MOBILE
---------------------------------- */

@media (max-width:768px) {
    .app {
        position: relative;
        width: 100%;
        height: 70vh;
        border-top: 1px solid black;
        border-bottom: 1px solid black;
    }
    #map-controls{
        transform:none;
        width:auto;
        flex-direction:column;
        align-items:stretch;
        gap:10px;
        padding:12px;
        /* display: none; */
    }
    .brand {
        display:none;
    }
    .search-box{
        margin:0;
        width: 100%;
    }
    .search-box input{
        width:100%;
    }
    #filters{
        flex-wrap:wrap;
    }
    #sidebar {
        /* top:auto; */
        bottom:0;
        left:0;
        width:100%;
        height:auto;
        max-width:none;
        /* border-radius:18px 18px 0 0; */
        transform:translateY(100%);
        display: none;
    }
    #sidebar.open{
        transform:translateY(0);
        display: block;
    }
    .sidebar-inner {
        padding-bottom:calc(25px + env(safe-area-inset-bottom));
    }
    .weirdness {
        display: none;
    }
}