/* style.css */

body {
  font-family: 'Arial', sans-serif;
  background-color: #ffffff;
  color: #333;
  margin: 0;
  padding: 20px;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  color: #4A90E2;
}

.umbrella-form-container {
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

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

.umbrella-form {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
  max-height: 1000px;
  opacity: 1;
  overflow: hidden;
}

.umbrella-form.hide {
  max-height: 0;
  opacity: 0;
  padding: 0 20px;
}

.logo-container {
  font-size: 3vw;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin: 10px 0 10px 0;
}


.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 10px 0;
  /* This gives 10px top margin and 20px bottom margin */
}

.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

input[type="time"],
input[type="text"] {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  box-sizing: border-box;
  height: 40px;
  /* Ensure consistent height */
}

input[type="time"] {
  width: 30%;
  min-width: 85px;
}

input[type="text"] {
  width: 55%;
  flex-grow: 1;
}

.toggle-button,
.remove-button,
.add-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.remove-button {
  width: 32px;
  height: 32px;
}

.add-button-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.add-button {
  color: #4A90E2;
  font-weight: bold;
}

.icon-small {
  width: 16px;
  height: 16px;
  margin-right: 5px;
}

.check-button {
  align-items: center;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: transparent 0 0 0 3px, rgba(18, 18, 18, .1) 0 6px 20px;
  box-sizing: border-box;
  color: #121212;
  cursor: pointer;
  display: flex;
  width: 100px;
  height: 100px;
  font-size: 5vw;
  justify-content: center;
  margin: 0;
  outline: none;
  padding: 0;
  position: relative;
  /* Added for absolute positioning of the icon */
  text-decoration: none;
  transition: box-shadow .2s, -webkit-box-shadow .2s;
  border: 2px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.check-button i:first-of-type {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);  
  font-size: 48px;
}

.check-button i:last-of-type {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 16px;
}

.check-button:hover {
  box-shadow: #121212 0 0 0 3px, transparent 0 0 0 0;
}

.result-icon {
  text-align: center;
  margin-top: 20px;
}

.result-icon img {
  display: inline-block;
  width: 100px;
  height: 100px;
}

.form-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-day-button {
  color: rgb(0, 0, 0);
  background-color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.toggle-day-button:hover {
  background-color: #357ABD;
}

.saved-locations {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.location-button-wrapper {
  display: flex;
  align-items: center;
}

.location-button {
  background-color: #4A90E2;
  color: white;
  border: none;
  border-radius: 20px 0 0 20px;
  padding: 5px 10px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.location-button:hover {
  background-color: #357ABD;
}

.remove-location-button {
  background-color: #E74C3C;
  color: white;
  border: none;
  border-radius: 0 20px 20px 0;
  padding: 5px 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.remove-location-button:hover {
  background-color: #C0392B;
}

.invalid-location {
  animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
  background-color: #ffebee;
  border-color: #ef5350 !important;
}

@keyframes shake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-2px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(2px, 0, 0);
  }
}

@media (max-width: 600px) {
  .umbrella-form-container {
    padding: 0 10px;
  }

  .form-row {
    flex-wrap: nowrap;
  }

  input[type="time"],
  input[type="text"] {
    font-size: 0.9rem;
    padding: 8px;
  }

  input[type="time"] {
    width: 30%;
    min-width: 75px;
  }

  input[type="text"] {
    width: 50%;
  }

  .remove-button {
    width: 28px;
    height: 28px;
  }

  .icon-small {
    width: 14px;
    height: 14px;
    margin-right: 3px;
  }
}