/* -----------------------------------
   OZ CUSTOM SEARCH — FULL STYLES
   (Includes header expansion fixes)
----------------------------------- */

/* Base */
.oz-search { box-sizing: border-box; font-family: inherit; color: #e8e8e8; }
.oz-search * { box-sizing: inherit; }

/* Dark theme inputs */
.oz-search__form { display: flex; align-items: center; gap: 8px; width: 100%; }
.oz-search__input {
  flex: 1 1 auto;
  width: 100%;
  padding: 10px 12px;
  border-radius: 2px !important;
  border: 1px solid #2b2f36;
  background: #13161b;
  color: #e8e8e8;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.oz-search__input::placeholder { color: #8a8f98; }
.oz-search__input:focus { border-color: #3176CE; box-shadow: 0 0 0 3px rgba(49,118,206,0.2); }

.oz-search__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 44px;
  border-radius: 8px;
  border: 1px solid #2b2f36;
  background: #1a1f26;
  color: #c9d4e8;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.oz-search__submit:hover { background: #202734; color: #ffffff; border-color: #3176CE; }

/* Accessibility helper */
.screen-reader-text { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }


/* -----------------------------------
   HEADER ICON SEARCH (expanding)
----------------------------------- */

/* Outer wrapper; allow expansion */
.oz-header-search,
.oz-search .oz-header-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  width: auto;
  flex: 0 0 auto;
  min-width: 0;
}

/* allow full grow when parent requests it */
.oz-search-active .oz-header-search,
.oz-header-search.oz-header-search-active,
.oz-search.oz-search-active .oz-header-search {
  flex: 1 1 auto; /* wrapper can expand */
  min-width: 0;
}

/* The trigger (icon) */
.oz-search-trigger,
.oz-search .oz-search-trigger,
.oz-header-search .oz-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  border-radius: 50%;
  background: #1a1f26;
  color: #c9d4e8;
  border: 1px solid #2b2f36;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .25s ease;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
.oz-search-trigger:hover { background:#202734; color:#fff; border-color:#3176CE; }

/* Header search form (collapsed by default) */
.oz-header-search-form,
.oz-search .oz-header-search-form {
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width .35s ease, opacity .35s ease, padding .25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Input inside header form */
.oz-header-search-form input[type="text"],
.oz-search .oz-header-search-form input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border-radius: 2px !important;
  border:1px solid #2b2f36;
  background:#13161b;
  color:#e8e8e8;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  min-width: 0;
  font-size:14px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.oz-header-search-form input[type="text"]::placeholder { color:#8a8f98; }
.oz-header-search-form input[type="text"]:focus { border-color:#3176CE; box-shadow:0 0 0 3px rgba(49,118,206,.25); }

/* Default small expanded size (desktop) */
.oz-header-search.oz-header-search-active .oz-header-search-form,
.oz-search.oz-search-active .oz-header-search-form,
.oz-search-active .oz-header-search-form {
  max-width: 260px;    /* reasonable default when active */
  opacity: 1;
}

/* Mobile smaller default */
@media (max-width: 520px) {
  .oz-header-search.oz-header-search-active .oz-header-search-form,
  .oz-search.oz-search-active .oz-header-search-form {
    max-width: 180px;
  }
}

/* Global active state — force full expansion and hide icon */
.oz-search-active .oz-search-trigger,
.oz-header-search.oz-header-search-active .oz-search-trigger {
  opacity: 0;
  pointer-events: none;
  max-width: 0;
}

/* when plugin wants the input to take the freed space, force flex growth */
.oz-search-active .oz-header-search-form,
.oz-header-search.oz-header-search-active .oz-header-search-form,
.oz-search.oz-search-active .oz-header-search-form {
  flex: 1 1 auto;        /* NEW — fills leftover space */
  max-width: 100% !important;
  width: 100%;
  padding: 8px 12px;
}

/* ensure the input itself stretches */
.oz-search-active .oz-header-search-form input[type="text"],
.oz-header-search.oz-header-search-active .oz-header-search-form input[type="text"] {
  width: 100%;
  min-width: 0;
}

/* optional close icon on the right inside the header form */
.oz-header-search .oz-search-close,
.oz-search .oz-search-close {
  display: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.oz-search-active .oz-search-close {
  display: inline-flex;
}

/* fallback: if your JS toggles .oz-header-search-active instead of .oz-search-active */
.oz-header-search.oz-header-search-active .oz-search-trigger { opacity: 0; pointer-events: none; }
.oz-header-search.oz-header-search-active .oz-header-search-form { max-width: 100% !important; flex: 1 1 auto; width: 100%; }


/* -----------------------------------
   Full-width bar for Elementor (page embed)
----------------------------------- */
.oz-search--full { width: 100%; box-sizing: border-box; }
.oz-search--full .oz-search__form { gap: 10px; }
.oz-search--full .oz-search__input { height: 48px; font-size: 16px; }
.oz-search--full .oz-search__submit { height: 48px; width: 52px; }

/* Brand accents */
.oz-search .oz-search__icon-svg { color: #c9d4e8; }
.oz-search--full .oz-search__submit svg path { fill: currentColor; }

/* -----------------------------------
   BEAT MARKETPLACE SEARCH RESULTS
   Fully custom design - no WooCommerce styling
----------------------------------- */

/* Reset WooCommerce styles for search results */
.beat-search-results {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
  background: #0B0B0B;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.beat-search-results * {
  box-sizing: border-box;
}

/* Title */
.beat-search-results__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin: 0 0 48px;
  color: #D8D8D8;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Results Grid */
.beat-search-results__grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Beat Card - Horizontal on desktop, vertical on mobile */
.beat-search-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px;
  background: #121212;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
}

.beat-search-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(49, 118, 206, 0.3);
}

.beat-search-card:active {
  transform: translateY(0);
}

/* Cover Art Wrapper */
.beat-search-card__cover-wrapper {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.beat-search-card:hover .beat-search-card__cover-wrapper {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.beat-search-card__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Play Button Overlay */
.beat-search-card__play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.beat-search-card:hover .beat-search-card__play-overlay {
  opacity: 1;
}

.beat-search-card__play-icon {
  width: 48px;
  height: 48px;
  color: #3176CE;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

/* Card Info */
.beat-search-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Title */
.beat-search-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #3176CE;
  margin: 0;
  letter-spacing: 0.05em;
  line-height: 1.3;
  text-transform: uppercase;
}

/* Metadata */
.beat-search-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.9rem;
  color: #D8D8D8;
}

.beat-search-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.beat-search-card__meta-label {
  font-weight: 500;
  opacity: 0.7;
}

.beat-search-card__meta-value {
  font-weight: 600;
  color: #D8D8D8;
}

/* Tags */
.beat-search-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.beat-search-card__tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  color: #D8D8D8;
  background: transparent;
  border: 1px solid rgba(216, 216, 216, 0.2);
  border-radius: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Producer */
.beat-search-card__producer {
  font-size: 0.85rem;
  color: #D8D8D8;
  opacity: 0.8;
  margin-top: 4px;
}

.beat-search-card__producer-name {
  font-weight: 600;
  color: #D8D8D8;
}

/* Empty State */
.beat-search-results__empty {
  padding: 48px 24px;
  text-align: center;
  background: #121212;
  border: 1px solid rgba(216, 216, 216, 0.1);
  border-radius: 16px;
  color: #D8D8D8;
  font-size: 1.1rem;
}

.beat-search-results__empty strong {
  color: #3176CE;
}

/* Pagination */
.beat-search-results__pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

.beat-search-results__pagination .page-numbers {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.beat-search-results__pagination .page-numbers li {
  margin: 0;
}

.beat-search-results__pagination .page-numbers a,
.beat-search-results__pagination .page-numbers span {
  display: inline-block;
  padding: 10px 16px;
  color: #D8D8D8;
  background: #121212;
  border: 1px solid rgba(216, 216, 216, 0.1);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.beat-search-results__pagination .page-numbers a:hover {
  background: #1a1a1a;
  border-color: #3176CE;
  color: #3176CE;
}

.beat-search-results__pagination .page-numbers .current {
  background: #3176CE;
  border-color: #3176CE;
  color: #ffffff;
}

/* Mobile: Stack cards vertically */
@media (max-width: 768px) {
  .beat-search-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .beat-search-card__cover-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-width: 100%;
  }

  .beat-search-card__info {
    width: 100%;
  }

  .beat-search-card__meta {
    flex-direction: column;
    gap: 8px;
  }

  .beat-search-results {
    padding: 24px 16px;
  }

  .beat-search-results__title {
    margin-bottom: 32px;
    font-size: 1.5rem;
  }
}

/* Prevent WooCommerce styles from affecting our cards */
.beat-search-results .woocommerce,
.beat-search-results .woocommerce * {
  all: unset;
  box-sizing: border-box;
}

.beat-search-results .woocommerce {
  display: contents;
}

/* Additional WooCommerce overrides */
.beat-search-results .price,
.beat-search-results .woocommerce-Price-amount,
.beat-search-results .add_to_cart_button,
.beat-search-results .button,
.beat-search-results .product_type_simple,
.beat-search-results .star-rating,
.beat-search-results .woocommerce-product-rating,
.beat-search-results .product-categories,
.beat-search-results .posted_in,
.beat-search-results .product_meta {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* -----------------------------------
   Utility tweaks: ensure no overflow and smoothness
----------------------------------- */
.oz-header-search, .oz-header-search * { box-sizing: border-box; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
.oz-header-search-form, .oz-header-search-form * { min-width: 0; }

/* -----------------------------------
   Small-screen adjustments
----------------------------------- */
@media (max-width: 520px) {
  .oz-search--full .oz-search__input { font-size: 15px; }
  .oz-header-search { gap: 6px; }
  .oz-header-search.oz-header-search-active .oz-header-search-form { padding: 6px 10px; }
}

/* -----------------------------------
   End of OZ Custom Search CSS
----------------------------------- */
/* -----------------------------------
   OVERRIDE: Full-width Search Submit
   Make it blue (#3176CE) with white icon/text
   Remove pink overlays
----------------------------------- */

.oz-search--full .oz-search__submit {
  background: #3176CE !important;
  border-color: #3176CE !important;
  color: #ffffff !important;
  box-shadow: none !important;
  width: auto !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, opacity .2s ease, border-color .2s ease;
}

/* Hover */
.oz-search--full .oz-search__submit:hover {
  background: #2A63AE !important;   /* slightly brighter blue */
  border-color: #2A63AE !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* Focus (remove pink glow) */
.oz-search--full .oz-search__submit:focus {
  background: #2A63AE !important;
  border-color: #2A63AE !important;
  color: #ffffff !important;
  box-shadow: none !important;
  outline: none !important;
}

/* SVG or icon inside button should be white */
.oz-search--full .oz-search__submit svg path {
  fill: #ffffff !important;
}

/* If you replaced SVG with text "SEARCH" */
.oz-search--full .oz-search__submit span {
  color: #ffffff !important;
}
