/* Search Modal Styles */
#searchModal .modal-dialog {
  max-width: 600px;
  margin: 0 auto;
}

#searchModal .modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

#searchModal .modal-header {
  border-bottom: 1px solid #e9e7e7;
  padding: 20px 30px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#searchModal .modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

#searchModal .btn-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  opacity: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.3s ease;
}

#searchModal .btn-close:hover {
  color: #333;
}

#searchModal .btn-close:focus {
  box-shadow: none;
  outline: none;
}

#searchModal .modal-body {
  padding: 30px;
  background: #fff;
}

/* Search Form Styles */
#searchModal .search {
  width: 100%;
}

#searchModal .search-container {
  width: 100%;
}

#searchModal .inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

#searchModal .has-suggestion {
  flex: 1;
  position: relative;
}

#searchModal #search-input {
  width: 100%;
  padding: 15px 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  color: #333;
  background: #f8f9fa;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

#searchModal #search-input:focus {
  outline: none;
  border-color: #ea7a2b;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(234, 122, 43, 0.1);
}

#searchModal #search-input::placeholder {
  color: #999;
  font-size: 16px;
}

#searchModal .inner button[type="submit"] {
  background: #ea7a2b;
  color: #fff;
  border: none;
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  height: 52px;
}

#searchModal .inner button[type="submit"]:hover {
  background: #d66a1f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 122, 43, 0.3);
}

#searchModal .inner button[type="submit"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(234, 122, 43, 0.2);
}

#searchModal .inner button[type="submit"] i {
  font-size: 18px;
}

#searchModal .inner button[type="submit"] .icon-search-loading {
  display: none;
}

#searchModal .inner button[type="submit"].loading .icon-search-not-loading {
  display: none;
}

#searchModal .inner button[type="submit"].loading .icon-search-loading {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Suggestion Box */
#searchModal .suggestion {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e9e7e7;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 2px;
}

#searchModal .suggestion-item {
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s ease;
}

#searchModal .suggestion-item:last-child {
  border-bottom: none;
}

#searchModal .suggestion-item:hover {
  background: #f8f9fa;
}

#searchModal .suggestion-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

#searchModal .suggestion-item-excerpt {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

/* Modal Backdrop */
#searchModal.modal.show .modal-backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* Remove padding-right from body when search modal is open */
body.modal-open {
  padding-right: 0 !important;
}

/* Remove padding-right from html when search modal is open */
html.modal-open {
  padding-right: 0 !important;
}

/* Remove padding-right from searchModal element itself */
#searchModal,
#searchModal.mm-page,
#searchModal.mm-slideout,
#searchModal.modal,
#searchModal.modal.show {
  padding-right: 0 !important;
}

/* Remove padding-right from modal content if any */
#searchModal .modal-content {
  padding-right: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
  #searchModal .modal-dialog {
    max-width: calc(100% - 30px);
    margin: 15px auto;
  }

  #searchModal .modal-content {
    border-radius: 16px;
  }

  #searchModal .modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid #e9e7e7;
  }

  #searchModal .modal-title {
    font-size: 18px;
    font-weight: 700;
  }

  #searchModal .btn-close {
    width: 28px;
    height: 28px;
    font-size: 20px;
  }

  #searchModal .modal-body {
    padding: 25px 20px;
  }

  #searchModal .inner {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  #searchModal .has-suggestion {
    width: 100%;
  }

  #searchModal #search-input {
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 10px;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
  }

  #searchModal #search-input::placeholder {
    font-size: 15px;
  }

  #searchModal .inner button[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    border-radius: 10px;
    height: 50px;
    min-width: auto;
    justify-content: center;
  }

  #searchModal .inner button[type="submit"] i {
    font-size: 18px;
  }

  #searchModal .suggestion {
    max-height: 250px;
    border-radius: 0 0 10px 10px;
  }

  #searchModal .suggestion-item {
    padding: 14px 18px;
  }

  #searchModal .suggestion-item-title {
    font-size: 14px;
  }

  #searchModal .suggestion-item-excerpt {
    font-size: 13px;
  }
}

