/* ── Image Search: Camera Button ── */

.bc-navbar__image-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 4px;
  border: none;
  border-left: 1px solid var(--bc-grey-200, #e5e7eb);
  border-radius: 0 999px 999px 0;
  background: transparent;
  color: var(--bc-grey-400, #9ca3af);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}

.bc-navbar__image-search-btn:hover {
  color: var(--bc-accent, #f59e0b);
  background: var(--bc-cream, #fffbeb);
}

.bc-navbar__image-search-btn svg {
  pointer-events: none;
}

/* Mobile duplicate in navbar right */
.bc-navbar__image-search-btn--mobile {
  display: none;
}

/* ── Dropdown Popover ── */

.bc-image-search-drop {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 340px;
  background: #fff;
  border: 1px solid var(--bc-grey-200, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 1001;
  padding: 20px;
  box-sizing: border-box;
}

.bc-image-search-drop.is-open {
  display: block;
}

.bc-image-search-drop__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--bc-text, #111827);
  margin: 0 0 12px;
}

/* ── Drag & Drop Zone ── */

.bc-image-search-drop__zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
  border: 2px dashed var(--bc-grey-300, #d1d5db);
  border-radius: 10px;
  background: var(--bc-cream, #fffbeb);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  padding: 20px;
  text-align: center;
}

.bc-image-search-drop__zone:hover,
.bc-image-search-drop__zone.is-dragover {
  border-color: var(--bc-accent, #f59e0b);
  background: #fef3c7;
}

.bc-image-search-drop__zone-icon {
  color: var(--bc-grey-400, #9ca3af);
}

.bc-image-search-drop__zone-icon svg {
  width: 36px;
  height: 36px;
}

.bc-image-search-drop__zone-text {
  font-size: 13px;
  color: var(--bc-grey-500, #6b7280);
  line-height: 1.4;
}

.bc-image-search-drop__zone-text strong {
  color: var(--bc-accent, #f59e0b);
  cursor: pointer;
}

.bc-image-search-drop__zone-hint {
  font-size: 11px;
  color: var(--bc-grey-400, #9ca3af);
}

/* Provider select */
.bc-image-search-drop__provider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--bc-grey-500, #6b7280);
}

.bc-image-search-drop__provider select {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--bc-grey-200, #e5e7eb);
  border-radius: 6px;
  background: #fff;
  color: var(--bc-text, #111827);
}

/* ── Loading State ── */

.bc-image-search-drop__loading {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 20px;
  text-align: center;
}

.bc-image-search-drop__loading.is-active {
  display: flex;
}

.bc-image-search-drop__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bc-grey-200, #e5e7eb);
  border-top-color: var(--bc-accent, #f59e0b);
  border-radius: 50%;
  animation: bcImgSpinnerSpin 0.7s linear infinite;
}

@keyframes bcImgSpinnerSpin {
  to { transform: rotate(360deg); }
}

.bc-image-search-drop__loading-text {
  font-size: 13px;
  color: var(--bc-grey-500, #6b7280);
}

/* ── Error State ── */

.bc-image-search-drop__error {
  display: none;
  margin-top: 12px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 13px;
  color: #dc2626;
}

.bc-image-search-drop__error.is-active {
  display: block;
}

/* ── Login Prompt ── */

.bc-image-search-drop__login {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: var(--bc-grey-500, #6b7280);
}

.bc-image-search-drop__login a {
  color: var(--bc-accent, #f59e0b);
  font-weight: 600;
  text-decoration: none;
}

.bc-image-search-drop__login a:hover {
  text-decoration: underline;
}

/* ── Image Search Results Banner (catalog page) ── */

.bc-catalog__image-search-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 100%);
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 14px;
  color: var(--bc-text, #111827);
}

.bc-catalog__image-search-banner strong {
  font-weight: 600;
}

.bc-catalog__image-search-clear {
  font-size: 13px;
  color: var(--bc-accent, #f59e0b);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

.bc-catalog__image-search-clear:hover {
  text-decoration: underline;
}

/* ── Mobile ── */

@media (max-width: 768px) {
  .bc-navbar__image-search-btn--desktop {
    display: none;
  }

  .bc-navbar__image-search-btn--mobile {
    display: flex;
    width: 40px;
    height: 40px;
    border: none;
    border-left: none;
    border-radius: 8px;
    margin-left: 0;
  }

  .bc-image-search-drop {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin-top: 0;
    border-radius: 16px 16px 0 0;
    max-height: 80vh;
    overflow-y: auto;
  }
}
