/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Maps styles */
@import url("https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.css");
@import url("/assets/maps-d4e377ae.css");

/* Dialog (modal) styles */
@import url("/assets/dialog-3b442e59.css");

/* Global Application Styles */
body {
  margin: 0 auto;
  line-height: 1.8em;
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background-color: #fde684ff; /* Brand Yellow */
  word-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong {
  font-family: "Arial Black", "Arial", sans-serif;
}

a {
  color: #5212ffff; /* Brand Dark Purple */
  border-bottom: 2px solid #5212ffff; /* Brand Dark Purple */
  text-decoration: none;
  transition: all 0.2s ease;
}

fieldset {
  /* Reset useragent styles */
  border: none;
  margin: 0;
  padding: 0;
}

ol,
ul {
  margin-top: 0;
  margin-bottom: 0;
}

/* Global Navigation */
nav.global {
  padding: 12px;
  position: sticky;
  top: 0px;
  background-color: #fde684ff; /* Brand Yellow */
  z-index: 1001;
  border-bottom: 1px solid rgb(255, 217, 49);
}

nav a {
  color: black;
  border-color: black;
}

/************ Main Search Page *************/

#search {
  position: relative;
  height: 70vh;
  overflow-x: hidden;
  border-bottom: 1px solid #cdcdcd;
}

#search form {
  position: absolute;
  z-index: 1;
  bottom: 12px;
  left: 12px;
  right: 12px;
}

#search .search-query {
  width: 100%;
  color: black;
}

#search .map-results {
  position: absolute;

  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
}

#search .search-query input {
  width: 200px;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 12px;
  transition: width 0.3s ease;
}

#search .search-query input:focus {
  width: 100%;
  outline: 2px solid #5212ffff;
  outline-offset: 2px;
}

#search .category-option {
  position: relative;
}

#search .category-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 64px;
  font-weight: bold;
  font-size: 0.8rem;
}

#search .category-label:hover {
  /* box-shadow: 0 2px 12px rgba(82, 18, 255, 0.5); */
  border-color: #5212ffff;
}

#search .category-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 2px;
}

#search .category-label span {
  font-weight: bold;
  text-align: center;
  line-height: 1.2;
}

/* Selected state */
#search input[type="radio"]:checked + .category-label {
  border-color: #5212ffff;
  background-color: #5212ffff;
  color: white;
}

#search input[type="radio"]:checked + .category-label .category-icon {
  filter: brightness(0) invert(1);
}

#search #search-here {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  transition: all 0.2s ease;
}

/************** Helpers *************/
.hide {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.flex {
  display: flex;
  gap: 12px;
}

.flex.reverse {
  flex-direction: row-reverse;
}

.flex.insulated {
  gap: 48px;
}

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

.wrap {
  flex-wrap: wrap;
}

.insulated {
  padding: 48px;
}

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

.flex.compact {
  gap: 6px;
}

.constrain {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.glass {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  border: 0.5px solid #a2a2a2;
  border-radius: 12px;
  box-shadow: 0px -4px 12px rgba(0, 0, 0, 0.1);
}

.paper {
  /* border-top-right-radius: 48px; */
  border-top: 1px solid rgba(0, 0, 0, 0);
  /* box-shadow: 0px -12px 24px rgba(0, 0, 0, 0.1); */
}

.page {
  background-color: white;
}

dialog .page {
  background-color: transparent;
}

.rounded {
  border-radius: 12px;
}

.round {
  border-radius: 50%;
}

.col-6 {
  width: 50%;
  flex: 0 0 50%;
}

.primary,
button.primary,
input[type="submit"].primary,
input[type="button"].primary {
  font-size: 1rem;
  font-weight: bold;
  background-color: #5212ffff; /* Brand Dark Purple */
  border-radius: 12px;
  color: white;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  display: inline-block;

  /* limit width */
  max-width: 200px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  vertical-align: text-bottom;
}

.secondary,
button.secondary,
input[type="submit"].secondary,
input[type="button"].secondary {
  font-size: 1rem;
  font-weight: bold;
  color: #5212ffff; /* Brand Dark Purple */
  background-color: rgba(255, 255, 255, 0.7);
  border: 0.5px solid #a2a2a2;
  border-radius: 12px;
  padding: 12px 24px;
  cursor: pointer;
  display: inline-block;

  /* limit width */
  max-width: 200px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  vertical-align: text-bottom;
}

ol.table li,
ul.table li {
  padding: 12px;
  border-bottom: 1px solid #efefef;
}

ul.table {
  list-style-type: none;
  padding-left: 0;
}

/************** App Specific Styles *************/

button {
  cursor: pointer;
  border: none;
}

.tag,
a.tag {
  display: inline-block;
  background-color: #efefef;
  color: black;
  border-bottom: 0;
  padding: 0px 8px;
  font-size: 0.8rem;
  line-height: 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bold;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  max-width: 50vw;
  vertical-align: text-bottom;
}

a.tag:hover {
  background-color: #cdcdcd;
}

/************ Footer *************/
#footer {
  background-color: rgba(255, 255, 255, 0.9);
  border: 0.5px solid #a2a2a2;
}

@media (max-width: 600px) {
  .insulated {
    padding: 24px;
  }

  .col-6 {
    width: 100%;
    flex: 0 0 100%;
  }

  .flex {
    flex-wrap: wrap;
    gap: 6px;
  }

  .flex.compact {
    gap: 6px;
  }

  .flex.nowrap {
    display: flex;
    box-sizing: border-box;
    width: calc(100vw + 24px);
    margin-left: -24px;
    padding-left: 24px;
    padding-right: 24px;
    flex-wrap: nowrap;
    overflow-x: scroll;
  }
}

#search form {
  padding: 0px;
}

/* Dark Mode, only supported for the map */
@media (prefers-color-scheme: dark) {
  #search .glass {
    /* Dark Glass */
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
    border: 0.5px solid #494949;

    color: white;
  }

  #search .secondary,
  #search button.secondary,
  #search input[type="submit"].secondary,
  #search input[type="button"].secondary {
    color: white;
  }
  #search input[type="radio"] + .category-label .category-icon {
    filter: brightness(0) invert(1);
  }
}
