/**
 * TDZ Services Manager - Quick Search & Spotlight Modal Styles
 * Brand Colors:
 * - Electric Cyan: #00B4D8 / #00F0FF
 * - Ocean Cerulean: #0077B6
 * - Deep Space Navy: #0F172A / #070B14
 * - Ice Cyan: #E0F7FA / #CAF0F8
 */

/* ==========================================================================
   1. SPOTLIGHT SEARCH MODAL (CMD+K / CTRL+K)
   ========================================================================== */
.tdz-search-modal-backdrop {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tdz-search-modal-backdrop.is-active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.tdz-search-modal-dialog {
  background: #FFFFFF;
  border: 1.5px solid rgba(0, 180, 216, 0.35);
  border-radius: 20px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto !important;
  box-shadow: 0 25px 60px -12px rgba(0, 180, 216, 0.25), 0 10px 30px rgba(15, 23, 42, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  transform: translateY(-20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  letter-spacing: normal !important;
}

.tdz-search-modal-backdrop.is-active .tdz-search-modal-dialog {
  transform: translateY(0) scale(1);
}

/* Modal Header & Input */
.tdz-search-modal-header {
  display: flex;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid #E2E8F0;
  gap: 12px;
  background: #FFFFFF;
}

.tdz-search-modal-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  position: relative;
}

.tdz-search-modal-icon {
  font-size: 1.25rem;
  color: #0077B6;
  flex-shrink: 0;
}

#tdz-spotlight-input {
  width: 100%;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  color: #0F172A !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  padding: 6px 0 !important;
  line-height: 1.4 !important;
}

#tdz-spotlight-input::placeholder {
  color: #94A3B8;
  font-weight: 400;
}

.tdz-search-modal-clear {
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.tdz-search-modal-clear:hover {
  color: #0077B6;
}

.tdz-search-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 180, 216, 0.2);
  border-top-color: #0077B6;
  border-radius: 50%;
  animation: tdzSpin 0.6s linear infinite;
}

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

.tdz-search-modal-close {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8125rem;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tdz-search-modal-close:hover {
  background: #E0F7FA;
  color: #0077B6;
  border-color: rgba(0, 180, 216, 0.4);
}

.tdz-esc-label {
  font-weight: 700;
  font-size: 0.6875rem;
}

/* Quick Suggestions */
.tdz-search-modal-suggestions {
  padding: 18px 24px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.tdz-search-suggest-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.tdz-search-suggest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tdz-suggest-tag {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #0F172A;
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  letter-spacing: normal !important;
}

.tdz-suggest-tag:hover {
  border-color: #00B4D8;
  background: #E0F7FA;
  color: #0077B6;
  transform: translateY(-1px);
}

/* Results Dropdown Container */
.tdz-search-modal-results {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  max-height: 55vh;
}

/* Modal Footer */
.tdz-search-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  font-size: 0.75rem;
  color: #64748B;
}

.tdz-search-footer-left {
  display: flex;
  gap: 14px;
  align-items: center;
}

.tdz-search-footer-left kbd {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.6875rem;
  color: #0F172A;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

/* ==========================================================================
   2. SEARCH RESULTS FORMATTING (SHARED ACROSS MODAL & INLINE FORMS)
   ========================================================================== */
.tdz-qs-group {
  margin-bottom: 16px;
}

.tdz-qs-group:last-child {
  margin-bottom: 0;
}

.tdz-qs-group-header {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  display: flex;
  align-items: center;
}

.tdz-qs-badge-count {
  margin-left: auto;
  background: #E2E8F0;
  color: #0F172A;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.6875rem;
}

.tdz-qs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tdz-qs-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid transparent;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: inherit;
}

.tdz-qs-item:hover,
.tdz-qs-item.is-selected {
  background: #F0FDFA;
  border-color: rgba(0, 180, 216, 0.35);
  transform: translateX(4px);
}

.tdz-qs-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 180, 216, 0.12);
  color: #0077B6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.tdz-qs-item-post .tdz-qs-item-icon {
  background: #F1F5F9;
  color: #64748B;
}

.tdz-qs-item-page .tdz-qs-item-icon {
  background: rgba(0, 119, 182, 0.1);
  color: #0077B6;
}

.tdz-qs-item-info {
  flex: 1;
  min-width: 0;
}

.tdz-qs-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.tdz-qs-item-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.tdz-qs-item:hover .tdz-qs-item-title,
.tdz-qs-item.is-selected .tdz-qs-item-title {
  color: #0077B6;
}

.tdz-qs-item-platform {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #0077B6;
  background: #E0F7FA;
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.tdz-qs-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: #64748B;
}

.tdz-qs-item-price {
  font-weight: 800;
  color: #0077B6;
  font-size: 0.875rem;
}

.tdz-qs-item-arrow {
  color: #94A3B8;
  font-size: 0.875rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease;
}

.tdz-qs-item:hover .tdz-qs-item-arrow,
.tdz-qs-item.is-selected .tdz-qs-item-arrow {
  opacity: 1;
  transform: translateX(0);
  color: #00B4D8;
}

/* Category Pills in Quick Search */
.tdz-qs-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 6px;
}

.tdz-qs-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0F172A;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.tdz-qs-cat-pill:hover {
  background: #E0F7FA;
  border-color: #00B4D8;
  color: #0077B6;
  transform: translateY(-1px);
}

.tdz-qs-cat-count {
  font-size: 0.6875rem;
  background: #E2E8F0;
  padding: 1px 6px;
  border-radius: 9999px;
  color: #475569;
}

/* Footer View All Link */
.tdz-qs-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #E2E8F0;
  text-align: center;
}

.tdz-qs-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0077B6;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none !important;
  padding: 8px 18px;
  border-radius: 9999px;
  background: rgba(0, 180, 216, 0.08);
  transition: all 0.2s ease;
}

.tdz-qs-view-all:hover {
  background: linear-gradient(135deg, #00F0FF 0%, #00B4D8 100%);
  color: #070B14;
  box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

/* Empty State */
.tdz-qs-empty {
  text-align: center;
  padding: 36px 20px;
  color: #64748B;
}

.tdz-qs-empty i {
  font-size: 2rem;
  color: #00B4D8;
  margin-bottom: 12px;
}

.tdz-qs-empty p {
  margin: 0;
  font-size: 0.9375rem;
}

/* ==========================================================================
   3. INLINE SEARCH DROPDOWN (FOR ANY SEARCH INPUT ON SITE)
   ========================================================================== */
/* Suppress dropdown inside search portal refinement capsule */
#tdz-search-refine-form .quick-search-results,
.tdz-search-form-wrap .quick-search-results,
.tdz-search-hero .quick-search-results,
.no-quick-search .quick-search-results {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.quick-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1.5px solid rgba(0, 180, 216, 0.35);
  border-radius: 16px;
  box-shadow: 0 15px 40px -10px rgba(15, 23, 42, 0.15), 0 8px 20px rgba(0, 180, 216, 0.12);
  z-index: 99999;
  padding: 14px 16px;
  max-height: 480px;
  overflow-y: auto;
  text-align: left;
}

.quicksearch_searching_text {
  text-align: center;
  padding: 16px;
  color: #64748B;
  font-size: 0.875rem;
}

/* Header Trigger Button */
.tdz-header-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  color: #475569;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.tdz-header-search-btn:hover {
  background: #FFFFFF;
  border-color: #00B4D8;
  color: #0077B6;
  box-shadow: 0 0 15px rgba(0, 180, 216, 0.2);
}

.tdz-search-kbd {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
  font-size: 0.6875rem;
  padding: 1px 5px;
  color: #64748B;
  font-weight: 700;
}

/* Mobile Search Box */
.tdz-mobile-search-box {
  margin-bottom: 20px;
  padding: 0 4px;
}

.tdz-mobile-search-box form {
  position: relative;
  display: flex;
  align-items: center;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 9999px;
  padding: 8px 16px;
  transition: border-color 0.2s ease;
}

.tdz-mobile-search-box form:focus-within {
  border-color: #00B4D8;
  background: #FFFFFF;
  box-shadow: 0 0 12px rgba(0, 180, 216, 0.2);
}

.tdz-mobile-search-box i {
  color: #0077B6;
  font-size: 0.9375rem;
  margin-right: 10px;
}

.tdz-mobile-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9375rem;
  color: #0F172A;
  font-family: inherit;
}

@media (max-width: 1024px) {
  .tdz-search-kbd {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .tdz-header-search-btn .tdz-search-btn-label {
    display: none !important;
  }
  .tdz-header-search-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    font-size: 1rem !important;
  }
}

@media (max-width: 640px) {
  /* Fullscreen App-Like Spotlight Sheet on Mobile */
  .tdz-search-modal-backdrop {
    padding: 0 !important;
    align-items: stretch !important;
    background: rgba(15, 23, 42, 0.88) !important;
  }

  .tdz-search-modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .tdz-search-modal-header {
    padding: 12px 14px !important;
    gap: 8px !important;
    border-bottom: 1px solid #E2E8F0 !important;
    flex-shrink: 0 !important;
    background: #FFFFFF !important;
  }

  .tdz-search-modal-input-wrap {
    gap: 10px !important;
  }

  .tdz-search-modal-icon {
    font-size: 1.1rem !important;
  }

  #tdz-spotlight-input {
    font-size: 16px !important; /* Critical: Prevent iOS Safari auto-zoom */
    padding: 8px 0 !important;
  }

  .tdz-search-modal-clear {
    width: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.15rem !important;
  }

  .tdz-search-modal-close {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    background: #F1F5F9 !important;
    border: 1px solid #E2E8F0 !important;
  }

  .tdz-esc-label {
    display: none !important;
  }

  /* Horizontal swipeable suggestion tags */
  .tdz-search-modal-suggestions {
    padding: 10px 14px !important;
    flex-shrink: 0 !important;
    background: #F8FAFC !important;
    border-bottom: 1px solid #E2E8F0 !important;
  }

  .tdz-search-suggest-label {
    font-size: 0.6875rem !important;
    margin-bottom: 8px !important;
  }

  .tdz-search-suggest-tags {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px !important;
    gap: 8px !important;
    scrollbar-width: none !important;
  }

  .tdz-search-suggest-tags::-webkit-scrollbar {
    display: none !important;
  }

  .tdz-suggest-tag {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  /* Scrollable Results Area */
  .tdz-search-modal-results {
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 12px 14px 24px !important;
  }

  .tdz-qs-group-header {
    font-size: 0.75rem !important;
    margin-bottom: 8px !important;
  }

  .tdz-qs-item {
    padding: 12px 10px !important;
    gap: 10px !important;
    min-height: 52px !important;
  }

  .tdz-qs-item-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 0.9375rem !important;
    border-radius: 10px !important;
  }

  .tdz-qs-item-title {
    font-size: 0.875rem !important;
    line-height: 1.35 !important;
  }

  .tdz-qs-item-platform {
    font-size: 0.625rem !important;
    padding: 1px 6px !important;
  }

  .tdz-qs-item-meta {
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 4px !important;
  }

  .tdz-qs-item-price {
    font-size: 0.8125rem !important;
  }

  .tdz-qs-item-duration,
  .tdz-qs-item-unit {
    font-size: 0.6875rem !important;
  }

  .tdz-qs-item-arrow {
    opacity: 0.6 !important;
    transform: none !important;
    font-size: 0.75rem !important;
  }

  /* Category pills */
  .tdz-qs-cat-pills {
    gap: 6px !important;
  }

  .tdz-qs-cat-pill {
    padding: 5px 10px !important;
    font-size: 0.75rem !important;
  }

  /* View All Button */
  .tdz-qs-view-all {
    width: 100% !important;
    justify-content: center !important;
    padding: 10px 16px !important;
    font-size: 0.8125rem !important;
  }

  /* Mobile Footer */
  .tdz-search-modal-footer {
    padding: 12px 14px !important;
    flex-shrink: 0 !important;
    background: #F8FAFC !important;
    border-top: 1px solid #E2E8F0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .tdz-search-footer-left {
    display: none !important; /* Hide keyboard arrows & ESC shortcut on touch devices */
  }

  .tdz-search-footer-right {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
}

