/* Toggle switch styles */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 1em;
}
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #414143;
}
input:checked + .slider:before {
  transform: translateX(24px);
}
/* Hide logo on mobile only when results or options are shown */
@media (max-width: 768px) {
  #logo.hidden {
    display: none;
  }
}
body {
  font-family: 'proxima-nova-condensed', sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  /* Ensure the body takes up the full viewport height */
  width: 100vw;
  /* Full screen width */
  overflow: hidden;
  /* Prevent scrolling */
}

* {
  box-sizing: border-box;
}

#map {
  height: 100vh;
  /* Full screen height */
  width: 100vw;
  /* Full screen width */
  position: absolute;
  /* Ensure the map covers the entire screen */
  top: 0;
  left: 0;
}

#floating-box {
  position: absolute;
  top: 5%;
  left: 5%;

  width: 30%;
  /* Roughly one-third of the screen */
  background: rgba(255, 255, 255, 0.9);
  /* Semi-transparent white background */
  border-radius: 12px;
  /* Rounded corners */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  /* Subtle shadow for depth */
  padding: 1em 1em .5em 1em;
  display: flex;
  flex-direction: column;
  /* gap: 1em; */
  max-height: 90%;
  /* Prevent the box from exceeding the viewport height */
  overflow: hidden;
  /* Hide overflowing content */
}

#floating-box.long {
  bottom: 5%;
  /* Extend the box further down when in 'long' mode */
}

#results {
  flex: 1;
  /* Take up remaining space in the churches container */
  overflow-y: auto;
  /* Enable vertical scrolling */
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #f9f9f9;
  max-height: 100%;
  /* Ensure it doesn't exceed the churches container height */
}

#churches {
  overflow: hidden;  
}

#search-bar {
  display: flex;
  flex-wrap: wrap; /* Allow the button to wrap below the input field on smaller screens */
  gap: 0.5em;
}

#search-input {
  flex: 1; /* Make the input field take up available space */
  min-width: 50%; /* Prevent the input from overflowing */
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1.2em; /* Increase font size for better readability */
}

button {
  padding: 0.5em 1em;
  border: none;
  background: #414143;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2em; /* Increase font size for better readability */
}

button:hover {
  background: #000000;
}

.church-card {
  margin-bottom: 1em;
  padding: 1em;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: white;  
}

.church-card p {
  margin: 0.2em 0;
}

#map-type-buttons {
  position: absolute;
  bottom: 5%;
  left: 5%;
  display: flex;
  gap: 0.5em;
  z-index: 1000;
  /* Ensure the buttons appear above the map */
}

#map-type-buttons button {
  padding: 0.5em 1em;
  border: none;
  font-size: 14px;
}

.mode {
  display: none;
  /* Hide all modes by default */
}

.mode.active {
  display: flex;
  /* Use flex to allow child elements to adjust properly */
  flex-direction: column;
  /* Stack child elements vertically */
  flex: 1;
  /* Take up available space in the parent container */
}

#mode-buttons {
  margin: 0.5em 0 0 0;
  display: flex;
  gap: 0.5em;
  justify-content: space-between;
}

#mode-buttons button {
  border: none;
  font-size: 14px;
}

button.map-type-button {
  display: flex;
  gap: 0.5em;
  padding: 0.3em 0.6em;
  /* Reduce padding to make buttons narrower */
  border: none;
  background: #414143;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  margin: .2em;
  width: fit-content;
  min-width: 60px;
  /* Optional: Set a minimum width for consistency */
}

h2 {
  margin-top: 0; /* Remove upper margin */
  margin-bottom: 0; /* Remove lower margin */
}

.churches-header h3 {
  margin-top: .5em;
  margin-bottom: .125em;
  /* padding: 0; */
}

/* Church card header: title left, language right */
.church-card h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5em; margin: 0 0 0.5em 0;  
}
.church-title { 
  flex: 1 1 auto;
  /* font-weight: 700; */
}
.language {
  flex: 0 0 auto;
  text-align: right;
  /* font-weight: 600; */
}
.English { color: #00c1c2; } 
.Spanish { color: #ff2f3c; } 
.Multilingual { color: #ccdc3a; } 



/* Responsive styles for mobile */
@media (max-width: 768px) {
  #map {
    height: 50vh;
    /* Map takes up the top half of the screen */
  }

  #floating-box {
    position: fixed;
    top: 50%;
    left: 0;
    width: 100%;
    height: 50%;
    /* Floating box takes up the bottom half of the screen */
    border-radius: 12px 12px 0 0;
    /* Rounded corners at the top */
    overflow-y: auto;
    /* Allow scrolling within the floating box */
    padding: 1em;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2);
    /* Shadow at the top */
  }

  #results {
    max-height: calc(100% - 4em);
    padding: 0.5em;
    overflow-y: auto;
    /* Ensure results fit within the floating box */
  }

  #mode-buttons {
    display: flex;
    /* justify-content: space-around; */
    /* margin-top: 1em; */
  }
  

  .church-card {
    margin: 0.5em 0; /* Add vertical spacing between cards */
    width: 100%;
    padding: 1em;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: white;
  }

}

.icon-bar {
  display: flex;
  gap: 1em; /* Space between icons */
  justify-content: center; /* Center icons horizontally */
  align-items: center; /* Align icons vertically */

}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2em; /* Space between icon and label */
}

.icon-item img {
  width: 24px; /* Adjust icon size */
  height: 24px;
  
}

#mode-buttons a, #mode-buttons a:visited {
  font-size: 0.9em;
  color:#414143;
  text-decoration: none;
}

.icon-item .icon-label {
  font-size: 0.8em; /* Adjust label size */
    
}

.icon-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #414143;
  padding: 0.4em;
  border-radius: 4px;
}

.church-card .icon-bar {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center; /* Center icons horizontally */
  gap: 0.5em; /* Space between icons */
  flex-shrink: 0;
}

.church-card .icon-item img {
  width: 16px; /* Smaller icon size */
  height: 16px;

}

.church-card .icon-item .icon-label {
  font-size: 0.7em; /* Smaller label size */
  display: none;
}

/* Expand/collapse link styling */
.expand-list-link {
  display: inline;
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
  font-size: 1em;
  margin-left: 0.5em;
}

.expand-list-link:hover {
  color: #0056b3;
  text-decoration: none;
}

/* Expanded floating box for mobile */
@media (max-width: 768px) {
  #floating-box.expanded {
    top: 2.5%;
    /* left: 2.5%;
    width: 95vw; */
    height: 95vh;
    max-height: 95vh;
    z-index: 2000;
    overflow-y: auto;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
  }
}

div.gm-style {
  font-family: 'proxima-nova-condensed', sans-serif;
}
