/** Plugin Styles – Elementor-Aligned, Host-Friendly */

/* Reset layout issues */
#fmbd-widget * {
  box-sizing: border-box;
}

#fmbd-widget {
  font-family: 'cubano', sans-serif;
  font-size: 16px;
  color: inherit;
  padding: 0 !important;
  margin: 0 auto;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

/* 📐 Search wrapper with input and buttons */
#fmbd-widget .fmbd-search-wrapper {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1rem auto;
  max-width: 700px;
  position: relative;
  z-index: 3;
  padding-bottom: 0;
}

/* 📍 Simulate link beside or below input */
#fmbd-widget .fmbd-simulate-link {
  font-size: 14px;
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
  transition: opacity 0.3s ease;
  align-self: center;
  margin-left: 10px;
  white-space: nowrap;
}

#fmbd-widget .fmbd-simulate-link:hover {
  opacity: 0.75;
}

/* 🎯 Address Input Field */
#fmbd-widget input[type="text"] {
  all: unset;
  flex-grow: 1;
  min-width: 300px;
  max-width: 600px;
  width: 100%;
  padding: 12px 18px;
  border: 1px solid #ccc;
  border-radius: 14px;
  background-color: #fff;
  font-size: 16px;
  font-family: inherit;
  color: inherit;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease, border 0.3s ease;
}

#fmbd-widget input[type="text"]:focus {
  border-color: #34b48c;
  box-shadow: 0 0 0 2px rgba(52, 180, 140, 0.25);
}

#fmbd-widget input[type="text"]::placeholder {
  color: #888;
  font-style: italic;
}

/* 🔽 Autocomplete box aligned to input */
#fmbd-widget .autocomplete-items {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-width: 600px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

#fmbd-widget .autocomplete-items div {
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #eee;
}

#fmbd-widget .autocomplete-items div:last-child {
  border-bottom: none;
}

#fmbd-widget .autocomplete-items div:hover {
  background-color: #f1f1f1;
}

/* 🧠 Button area */
#fmbd-widget .fmbd-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

#fmbd-widget .fmbd-btn-search.plugin-style {
  all: unset !important;
  font-family: 'cubano', sans-serif !important;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background-color: #34b48c;
  padding: 5px 12px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  height: 32px;
  box-sizing: border-box;
}

#fmbd-widget .fmbd-btn-search.plugin-style:hover {
  background-color: #2fa67f;
  transform: scale(1.03);
}

#fmbd-widget .fmbd-btn-reset.plugin-style {
  all: unset;
  font-family: 'cubano', sans-serif !important;
  color: #6c757d;
  border: 1px dashed #6c757d;
  padding: 5px 12px;
  border-radius: 18px;
  font-size: 13px;
  background: none;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#fmbd-widget .fmbd-btn-reset.plugin-style:hover {
  color: #343a40;
  border-color: #343a40;
}

/* Responsive */
@media (max-width: 768px) {
  #fmbd-widget .fmbd-search-wrapper {
    flex-direction: column;
    gap: 8px;
    max-width: 95vw;
  }
  #fmbd-widget input[type="text"] {
    width: 100%;
    max-width: 95vw;
  }
  #fmbd-widget .autocomplete-items {
    width: 95vw !important;
    max-width: none !important;
  }
  #fmbd-widget .fmbd-btn-search.plugin-style,
  #fmbd-widget .fmbd-btn-reset.plugin-style {
    width: 100%;
  }
  #fmbd-widget .fmbd-simulate-link {
    text-align: center;
    margin-top: 0.5rem;
    margin-left: 0;
  }
}

#fmbd-simulate-box.active {
  display: block !important;
}

#fmbd-simulate-box .simulate-message {
  background: #fffbe5;
  border: 1px solid #e4c500;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  margin-bottom: 2rem;
}

#fmbd-simulate-box .simulate-message h4 {
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-weight: bold;
}

#fmbd-simulate-box .simulate-message ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0;
}

#fmbd-simulate-box .simulate-message li {
  margin-bottom: 0.4rem;
}

#fmbd-simulate-box .simulate-form-wrapper {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding: 2rem;
  border: 1px solid #e1e1e1;
}

#fmbd-simulate-box form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

#fmbd-simulate-box .row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

#fmbd-simulate-box .row > * {
  flex: 1 1 300px;
  min-width: 200px;
}

#fmbd-simulate-box label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

#fmbd-simulate-box input,
#fmbd-simulate-box select,
#fmbd-simulate-box textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 15px;
  box-sizing: border-box;
}

#fmbd-simulate-box .btn {
  padding: 8px 20px;
  font-size: 14px;
  border-radius: 20px;
  background-color: #34b48c;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#fmbd-simulate-box .btn:hover {
  background-color: #2fa67f;
}


#fmbd-widget .modal-dialog {
  max-width: 750px;
  margin: 0.75rem auto;
  width: 95%;
}

#fmbd-widget .modal-content {
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 8px;
  padding: 1rem;
}

#fmbd-widget .modal-content.plugin-style {
  background-color: #fff5f5;
  border: 2px solid #dc3545;
  border-radius: 10px;
  padding: 1.5rem;
  color: #212529;
}

#fmbd-widget .modal-content.plugin-style .modal-header.bg-danger {
  background-color: #dc3545 !important;
  color: white !important;
  border-bottom: 1px solid #dc3545;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  font-weight: bold;
}

#fmbd-widget .simulate-message:hover {
  box-shadow: none;
  background-color: transparent;
  transition: none;
}

#fmbd-widget .alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
}

#fmbd-widget .alert-warning {
  background-color: #fff3cd;
  border-color: #ffeeba;
  color: #856404;
}

/* 🗓️ Fix for Full Year Calendar Toolbox */
#fmbd-download-toolbox {
  display: none;
  margin-top: 1rem;
  text-align: center;
  padding: 1rem;
  border: 1px solid #e1e1e1;
  border-radius: 14px;
  background-color: #fefefe;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}


#fmbd-download-toolbox.active {
  display: block;
}
#calendar-export {
  position: absolute;
  display: block;
  z-index: 2147483647 !important;
  top: 110px !important;
  left: 50% !important;
  transform: translateX(-50%);
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  max-width: 320px;
  min-width: 260px;
  opacity: 1;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 14px;
  color: #212529;
}


#calendar-export h5 {
  font-weight: bold;
  text-align: center;
  margin-bottom: 1rem;
}

#calendar-export .form-check {
  margin-bottom: 0.5rem;
}

#calendar-export .btn {
  all: unset !important;
  font-family: 'cubano', sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 5px 12px !important;
  background-color: #34b48c !important;
  color: white !important;
  border-radius: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
  transition: background-color 0.2s ease, transform 0.2s ease !important;
  height: 32px !important;
  gap: 6px !important;
  margin: 6px auto !important;
  white-space: nowrap !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
}







#calendar-export .btn:hover {
  background-color: #2fa67f;
  transform: scale(1.03);
}


#calendar-export .btn-outline-danger {
  display: inline-block;
  padding: 6px 18px;
  font-size: 14px;
  border-radius: 24px;
  border: 1px solid #dc3545;
  background-color: transparent;
  color: #dc3545;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

#calendar-export .btn-outline-danger:hover {
  background-color: #dc3545;
  color: #fff;
}
#manualSimBtnWrap {
  position: absolute;
  top: -24px;
  right: 250px; /* 👈 Move it left inside the wrapper */
  z-index: 5;
}



#manualSimBtn {
  display: inline-block;
  margin-right: 5px; /* 👈 adjust for slight left pull */
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  color: #007bff;
}
@media (max-width: 576px) {
  #manualSimBtnWrap {
    position: static !important;
    text-align: left;
    margin-bottom: 8px;
    margin-top: -8px;
  }

  #manualSimBtn {
    font-size: 13px;
    display: inline-block;
    margin: 0 auto;
  }
}
/* 🔧 Error Modal Button Fix */
#fmbd-widget .modal-content.plugin-style .btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'cubano', sans-serif;
  font-size: 13px;
  padding: 5px 12px;
  height: 32px;
  border-radius: 16px;
  background-color: #dc3545;
  color: white;
  cursor: pointer;
  margin-top: 1rem;
  transition: background-color 0.2s ease;
}

#fmbd-widget .modal-content.plugin-style .btn:hover {
  background-color: #bb2d3b;
}

/* 📱 Responsive Error Modal */
@media (max-width: 576px) {
  #fmbd-widget .modal-dialog {
    width: 95% !important;
    margin: 1rem auto;
  }

  #fmbd-widget .modal-content.plugin-style {
    padding: 1rem !important;
    font-size: 14px;
  }

  #fmbd-widget .modal-content.plugin-style .btn {
    width: 100%;
    font-size: 14px;
    padding: 10px 12px;
    height: auto;
    border-radius: 20px;
  }
}
/* ✅ Hard override for Enter Address Manually inside error modal */
#fmbd-error-modal #modalManualSimBtn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'cubano', sans-serif;
  font-size: 13px;
  padding: 5px 12px;
  height: 32px;
  border-radius: 16px;
  background-color: #34b48c;
  color: white;
  cursor: pointer;
  margin-top: 1rem;
  transition: background-color 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

#fmbd-error-modal #modalManualSimBtn:hover {
  background-color: #2fa67f;
}


/* Ensure consistent spacing */
#fmbd-error-modal .modal-body p + div {
  margin-top: 0.2rem;
}


