/* Complete override for left-top positioning */
@media screen and (min-width: 1048px) {
  #selectaddress.modal.show {
    display: block !important;
  }

  #selectaddress.modal .modal-dialog {
    position: fixed !important;
    top: 20px !important;
    left: 90px !important;
    margin: 0 !important;
    max-width: 400px !important;
    width: 400px !important;
    transform: none !important;
  }

  /* Ensure backdrop still works */
  #selectaddress.modal::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
}

/* #selectaddressbody {
    padding: 0px 20px 20px 20px;
}

.modal-header {
    border-bottom: none;
} */

 .autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
}

.suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f0f0f0;
  outline: none;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.suggestion-active {
  background: #f0f7ff;
  border-left: 3px solid #007bff;
  padding-left: 9px;
}

.suggestion-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 10px;
  flex-shrink: 0;
}

.suggestion-img-placeholder {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #ccc;
  background: #f5f5f5;
  border-radius: 6px;
  margin-right: 10px;
  flex-shrink: 0;
}

.suggestion-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.suggestion-text {
  font-weight: 500;
  color: #333;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-meta {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-title {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  background: #f9f9f9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 1;
}

.address-selection-wrapper-home {
  padding: 0.5rem;
}

.address-card-h {
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.address-card-h:hover {
  border-color: var(--primary-color);
  background-color: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.address-card-h.selected {
  color: #fff;
  border: 2px solid var(--primary-color);
  background-color: var(--secondary-color);
}

.address-name {
  font-weight: 600;
  color: #212529;
}

.address-text-h {
  color: #495057;
  line-height: 1.5;
  font-size: 9px;
}

.form-check-input {
  margin-top: 0.3rem;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.modal-md {
  max-width: 550px;
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-footer {
  border-top: 1px solid #dee2e6;
}

.title {
  font-weight: 500;
  color: #343a40;
  font-size: 1.25rem;
}

.badge {
  font-size: 0.7rem;
  padding: 0.35em 0.65em;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
}

#search {
  border-right: 2px solid #336699 !important;
}

.form-group input.form-control {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-group input.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

#screensize {
  /* display: none !important; */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  background-color: #000;
  color: #fff;
  padding: 6px 10px;
  font-size: 24px !important;
  font-family: Arial, sans-serif;
  border-bottom-right-radius: 6px;
  opacity: 0.8;
}

/* Enhanced CSS */
.btn-search {
  position: relative;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 5px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.btn-search:hover {
  background: #007bff;
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.btn-search:hover .w-icon-search {
  color: white;
}

.btn-search:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.btn-search:focus {
  outline: 3px solid rgba(0, 123, 255, 0.3);
  outline-offset: 2px;
}

/* .header-search {
            display: none !important;
        } */

/* Tooltip */
.btn-search__tooltip {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.btn-search:hover .btn-search__tooltip {
  opacity: 1;
  visibility: visible;
}

@media screen and (min-width: 501px) {
  #searchBtnTop {
    display: none !important;
  }
}

@media screen and (max-width: 500px) {
  .hidesearch {
    display: none !important;
  }

  .header-left {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  #logo {
    margin-right: auto;
  }

  .w-icon-search {
    font-size: 20px;
    color: #666;
    transition: color 0.3s ease;
  }

  #searchBtnTop {
    margin-left: auto;
  }
}

.mcall {
  position: absolute;
  top: 20px;
  right: 60px;
}
