/**
 * Smart AI Filter Styles
 */

/* Container */
.dd-smart-ai-filter-container {
  margin-bottom: 20px;
}

/* Wrapper */
.dd-smart-ai-filter-wrapper {
  width: 100%;
}

/* Header with icon and title */
.dd-smart-ai-filter-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.dd-smart-ai-filter-icon-wrapper {
  width: 32px;
  height: 32px;
  background-color: #EFF2F1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
  border-radius: 4px;
}

.dd-smart-ai-filter-icon {
  width: 26px;
  height: 26px;
  display: block;
}

.dd-smart-ai-filter-title {
  margin: 0;
  padding: 0;
  color: #000;
  font: 500 1em / 1.25 "Barlow", sans-serif;
}

.dd-smart-ai-filter-border {
  width: 100%;
  height: 1px;
  background-color: #B56217;
  margin-bottom: 10px;
}

.dd-smart-ai-filter-question {
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: #000000;
  line-height: 1.5;
  margin-bottom: 10px;
}

.dd-smart-ai-filter-no-filters-message {
  background-color: #F5ECE2;
  color: #B56217;
  padding: 2px 6px;
  border-radius: 5px;
  text-align: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
}

.dd-smart-ai-filter-limit-message {
  background-color: #FEE;
  color: #C33;
  padding: 2px 6px;
  border-radius: 5px;
  text-align: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
}

.dd-smart-ai-filter-message {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
}

.dd-smart-ai-filter-message > div {
  padding: 2px 6px;
  border-radius: 5px;
  text-align: center;
}

.dd-smart-ai-filter-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: transparent !important;
}

.dd-smart-ai-filter-input-group {
  position: relative;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dd-smart-ai-filter-input {
  width: 100%;
  padding: 10px 16px !important;
  border: 1px solid #627E73 !important;
  border-radius: 20px !important;
  font-size: 14px;
  line-height: 1.5;
  color: #000000 !important;
  resize: none !important;
  height: 80px !important;
  font-family: inherit;

  &::placeholder {
    color: #999999 !important;
  }
}

/* Button Styling */
.dd-smart-ai-filter-button,
.button.dd-smart-ai-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #617E73;
  color: #fff;
  border: 1px solid #617E73;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-end;
  width: auto;
  min-width: 140px;
}

@media (max-width: 768px) {
  .dd-smart-ai-filter-button,
  .button.dd-smart-ai-filter-button {
    min-width: 100%;
  }
}

.dd-smart-ai-filter-button:hover,
.button.dd-smart-ai-filter-button:hover {
  background-color: #4f6860;
  border-color: #4f6860;
}

.dd-smart-ai-filter-button:disabled,
.button.dd-smart-ai-filter-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dd-smart-ai-filter-search-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.dd-smart-ai-filter-loading {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 50px;
  background: rgba(255, 255, 255, 0.95);
  z-index: 10;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  backdrop-filter: blur(2px);
}

.dd-smart-ai-filter-loading.show,
.dd-smart-ai-filter-loading[style*="display: block"] {
  display: flex !important;
}

.dd-smart-ai-filter-spinner {
  display: block;
  width: 24px;
  height: 24px;
  border: 3px solid #e0e0e0;
  border-top: 3px solid #617E73;
  border-radius: 50%;
  animation: dd-smart-ai-filter-spin 1s linear infinite;
  flex-shrink: 0;
}

@keyframes dd-smart-ai-filter-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.dd-smart-ai-filter-loading-text {
  color: #333;
  font-size: 14px;
  font-weight: 600;
  margin-left: 10px;
}

/* Info icon with tooltip for admin table headers */
.dd-admin-table-header-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dd-admin-table-header-info-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #2271b1;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  line-height: 16px;
  text-align: center;
  cursor: help;
  vertical-align: middle;
  flex-shrink: 0;
}

.dd-admin-table-header-info-icon:hover {
  background-color: #135e96;
}

.dd-admin-table-header-info-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background-color: #1d2327;
  color: #fff;
  text-align: left;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  width: 250px;
  z-index: 10000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.dd-admin-table-header-info-icon:hover .dd-admin-table-header-info-tooltip {
  visibility: visible;
  opacity: 1;
}

.dd-admin-table-header-info-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1d2327;
}