/* DbFilm CSE Responsive: styles for the existing sidebar CSE box + chips.
   The plugin never replaces the CSE box itself; it only styles its
   wrapper and the chip row it adds underneath it. */

/* Desktop / Windows: sidebar is narrow, so chips stay compact. */
.dbfilm-cse-widget .gsc-control-cse {
  width: 100% !important;
}

.dbfilm-cse-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.dbfilm-cse-chips-label {
  flex-basis: 100%;
  font-size: 13px;
  font-weight: 600;
}

.dbfilm-cse-chip {
  appearance: none;
  border: 1px solid #ccc;
  border-radius: 999px;
  background: #fff;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}

.dbfilm-cse-chip:hover,
.dbfilm-cse-chip:focus-visible {
  border-color: #333;
  outline: none;
}

/* Tablet: 768px - 1024px. Sidebar may be wider or stacked; chips get
   roomier tap targets but stay in a wrapping row. */
@media (max-width: 1024px) {
  .dbfilm-cse-chip {
    padding: 10px 14px;
    font-size: 15px;
    min-height: 44px;
  }
}

/* Mobile: up to 767px. The sidebar stacks below the article, so the
   CSE box and chips become full-width with large tap targets. */
@media (max-width: 767px) {
  .dbfilm-cse-widget {
    width: 100%;
  }

  .dbfilm-cse-widget .gsc-control-cse,
  .dbfilm-cse-widget .gsc-search-box,
  .dbfilm-cse-widget table.gsc-search-box {
    width: 100% !important;
    max-width: 100% !important;
  }

  .dbfilm-cse-widget .gsc-input-box input.gsc-input {
    font-size: 16px !important; /* avoids iOS auto-zoom on focus */
  }

  .dbfilm-cse-chips {
    gap: 10px;
  }

  .dbfilm-cse-chip {
    flex: 1 1 calc(50% - 5px);
    padding: 12px 10px;
    font-size: 16px;
    min-height: 48px;
    text-align: center;
  }
}
