/**
 * widgets-forms.css - Suchfeld und Inputs (V2-Vorlage index_v17)
 */
.base-search-form-autosuggest-wrapper {
  width: 100%;
}

.base-search-container {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.base-search-wrapper {
  position: relative;
  background: var(--color-white);
  border-radius: 50px;
  border: 1px solid var(--color-gray-20);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-medium);
  overflow: hidden;
  min-height: 64px;
}

.base-search-wrapper:focus-within {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px var(--color-search-focus-ring);
}

.base-search-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.base-search-icon-svg,
.base-search-icon-img {
  color: var(--color-orange);
  width: 24px;
  height: 24px;
}

.base-search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 6px 8px 6px 20px;
}

.base-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-secondary);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-anthracite);
  padding: 10px 8px;
  background: transparent;
}

.base-search-input::placeholder {
  color: var(--color-gray-50);
}

.base-search-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  margin-top: 12px;
  color: var(--color-orange);
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  background: var(--color-white);
  border-radius: 12px;
}

.base-search-loading-visible {
  display: flex;
}

.base-search-container.base-search-container-loading .base-search-loading {
  display: flex;
}

.base-search-icon-wrapper-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.base-loading-dots {
  display: flex;
  gap: 4px;
}

.base-loading-dot {
  width: 8px;
  height: 8px;
  background: var(--color-orange);
  border-radius: 50%;
  animation: loadingDot 1.4s infinite ease-in-out both;
}

.base-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.base-loading-dot:nth-child(2) { animation-delay: -0.16s; }

.base-search-autosuggest-dropdown,
.search-autosuggest-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-20);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
}

.base-search-autosuggest-item,
.search-autosuggest-item {
  display: block;
  width: 100%;
  padding: 12px 20px;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-secondary);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-anthracite);
  transition: background-color 0.15s ease;
}

.base-search-autosuggest-item:hover,
.search-autosuggest-item:hover {
  background: var(--color-gray-10);
}

.base-search-autosuggest-item:first-child,
.search-autosuggest-item:first-child {
  border-radius: 11px 11px 0 0;
}

.base-search-autosuggest-item:last-child,
.search-autosuggest-item:last-child {
  border-radius: 0 0 11px 11px;
}

.base-search-loading-placeholder {
  display: inline-block;
  margin-left: 8px;
}

@media (max-width: 768px) {
  .base-search-wrapper:focus-within {
    transform: none;
  }
}

/**
 * Standard-Formular-Widgets (User-Login, User-Registration, Vendor-Forms)
 * Klassen werden in templates/app/theme1/user-*/ verwendet; Definitionen liegen zentral in Base-CSS (011-ui-css-widgets-architecture Regel 005).
 */
.base-form-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.base-form-field-group {
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.base-form-label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-anthracite);
}

.base-form-required {
  color: var(--color-darkred);
  font-weight: 700;
}

.base-form-input,
.base-form-select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  font-family: var(--font-secondary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-gray-20);
  border-radius: 8px;
  transition: border-color var(--transition-fast);
}

.base-form-input:focus,
.base-form-select:focus {
  outline: 0;
  border-color: var(--color-accent);
}

.base-form-input-error {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  font-family: var(--font-secondary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: rgba(157, 0, 81, 0.04);
  border: 1px solid var(--color-darkred);
  border-radius: 8px;
}

.base-form-input-error:focus {
  outline: 0;
  border-color: var(--color-darkred);
}

.base-form-error {
  margin-top: 8px;
  font-family: var(--font-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-darkred);
}

.base-form-submit-container {
  margin-top: 24px;
  margin-bottom: 8px;
}

@media (max-width: 575px) {
  .base-form-field-group {
    margin-bottom: 16px;
  }
}
