
/* Visually styles the wrapper like a single input field */
.inner_search_wrapper {
  position: relative;
  display: block;
  border: 1px solid #ccc;
  border-radius: 30px;
  background: #fff;
  padding: 0; /* pad the input; button is overlayed */
  max-width: 100%;
}
/* Focus highlight when input is active */
.inner_search_wrapper:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
/* Input gets right padding to make room for the button */
.inner_search_wrapper input {
  width: 100%;
  border: 0;
  outline: none;
  padding: 0.65rem 1.5rem 0.65rem 0.75rem; /* right padding ≈ button width */
  font-size: 1rem;
  border-radius: 30px; /* match wrapper radius for seamless look */
  box-sizing: border-box;
}
/* Button sits inside the field on the right */
.inner_search_wrapper .search_action {
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  height: 2.6rem;
  padding: 0 1.8rem;
  border: 0;
  border-radius: 30px;
  background: #3b82f6;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  white-space: nowrap;
}
/* Optional: disabled style and hover */
.inner_search_wrapper .search_action:hover {
  background: #2563eb;
}
.inner_search_wrapper .search_action:disabled {
  background: #9aa6b2;
  cursor: not-allowed;
}

/* without input wrapper */
.search_action {
  transform: translateY(-50%);
  height: 2.6rem;
  padding: 0 1.8rem;
  border: 0;
  border-radius: 30px;
  background: var(--accent-600);
  color: var(--primary-50);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
/* Optional: disabled style and hover */
.search_action:hover {
  /* height: 2.8rem; */
  background: var(--secondary-50);
  color: var(--primary-900);
  border: 3px solid var(--primary-900);
  font-weight: 600;
}
.search_action:disabled {
  background: #9aa6b2;
  cursor: not-allowed;
}

/* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */
/* Ensure the native clear icon is visible and clickable */
.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: 
    linear-gradient(#fff, #fff) padding-box,
    radial-gradient(closest-side, transparent 7px, rgba(0,0,0,0.25) 8px) border-box;
  border: 1px solid rgba(0,0,0,0.15);
  cursor: pointer;
  opacity: .8;
  transition: transform .15s ease, opacity .15s ease, background-color .15s ease;
}

/* Provide a custom X glyph using a mask (nice crisp vector) */
.search-input::-webkit-search-cancel-button {
  background-color: #666;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path stroke="%23fff" stroke-linecap="round" stroke-width="2" d="M4 4l8 8M12 4L4 12"/></svg>') center / 10px 10px no-repeat, none;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path stroke="%23fff" stroke-linecap="round" stroke-width="2" d="M4 4l8 8M12 4L4 12"/></svg>') center / 10px 10px no-repeat, none;
  background: none; /* we’re using mask for the icon now */
  border: none;
}

/* Hover/active/disabled states */
.search-input::-webkit-search-cancel-button:hover {
  opacity: 1;
  transform: scale(1.05);
}
.search-input:disabled::-webkit-search-cancel-button {
  opacity: .3;
  cursor: not-allowed;
}


.search-input {
  width: 100%;
  padding: 12px 18px;
  border-radius: 30px;
  font-size: 16px;
  line-height: 1.4;   /* important */
  box-sizing: border-box; /* prevents clipping */
  overflow: visible; /* make sure nothing is cut */
}

.search-input::placeholder {
  color: #777;
  font-size: 16px;
  line-height: 1.4;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  padding: 30px 40px;
  align-items: center;
}

.search-content {
  display: grid;
  grid-template-columns: 2fr 6fr;
  gap: var(--space-2);
  padding: 30px 10px;
  align-items: flex-start;
}

/* input[type=text] {
    width: 100%;
    height: 46px;
    line-height: 46px;
    font-size: 1.1em;
    color: rgba(0, 0, 0, .5);
    border: 0;
    border-radius: 30px;
    padding: 10px 20px;
} */

/* ===== Search Card ===== */
.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(650px, 1fr));
  gap: var(--space-3);
  align-items: start;
}

.search-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding: 6px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.search-icon {
  margin-bottom: var(--space-1);
}

.search-poster {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.search-card h1, .search-card h2, .search-card h3, .search-card h4, .search-card h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0;
  text-align: left;
  line-height: 1.2;
  word-break: break-word;
}

.sTitle {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-top: 10px;
}
.sOverview {
  margin-top: 10px;
}
.sDetails {
  margin-left: 10px;
  min-width: 0;
}

.sDate {
  font-size: 13px;
  color: #6b7280;
}

.upcoming {
  width: 80px;
  margin: 0;
  padding: 2px 3px;
  font-size: .65rem;
  background-color: gold;
  color: rgb(80, 81, 96);
}

.sType {
  margin-left: 10px;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #032541;
  color: #90CEA1;
}
.sOverview p {
  margin: 0;
  color: #374151;
  font-size: 14px;
}
.sOverview p {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-card p {
  color: var(--gray-600);
  line-height: 1.6;
}

/* Dark mode nicety */
@media (prefers-color-scheme: dark) {
  .search-input {
    color: #2d2c2c;
    background: #b6b6b663;
    border: 1px solid #333;
  }
  .search-input::-webkit-search-cancel-button {
    background-color: #000000; /* color of the masked X */
    opacity: .9;
  }
}

/* ===== Responsive Design ===== */
/* Tablet Styles */
@media (max-width: 1024px) {
  .search-grid {
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  }
}

/* Tablet: give the grid more flexibility */
@media (max-width: 900px) {
  .search-content {
    grid-template-columns: 1fr;  /* stack sidebar + results */
    gap: var(--space-4);
  }

  .sResults {
    display: none;
  }
}

/* Mobile Styles */
/* Mobile-specific utilities */
@media (max-width: 768px) {
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  .search-input::placeholder {
    color: #777;
    font-size: 12px;
    line-height: 1.4;
  }

  .search-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}
