/**
 * Museum Search Overlay Styles
 * Search overlay that matches menu width and replaces header content
 */

/* ===== Search Icon ===== */
.museum-search-icon {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: all 0.3s ease;
  color: #000;
}

.museum-search-icon.hidden {
  display: none !important;
}

.museum-search-icon:hover {
  opacity: 0.7;
  transform: scale(1.05);
}

.museum-search-icon:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
  border-radius: 4px;
}

.museum-search-icon svg {
  display: block;
  width: 21px;
  height: 21px;
}

/* ===== Search Container (replaces menu) ===== */
.museum-search-container {
  display: flex;
  flex-direction: column;
  position: relative;
  /* Width is set dynamically by JavaScript */
}

.museum-search-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.museum-search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent !important;
  border: none !important;
  padding: 12px 0;
  box-shadow: none !important;
}

.museum-search-input-icon {
  width: 21px;
  height: 21px;
  color: #000000;
  flex-shrink: 0;
}

.museum-search-container .museum-search-input-wrapper .museum-search-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  color: #000 !important;
  background: transparent !important;
  letter-spacing: 0.5px !important;
  box-shadow: none !important;
  font-family: inherit;
}

.museum-search-container
  .museum-search-input-wrapper
  .museum-search-input::placeholder {
  color: #999 !important;
  text-transform: uppercase !important;
  font-size: 14px !important;
}

/* Close Button */
.museum-search-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #000;
  flex-shrink: 0;
}

.museum-search-close svg {
  width: 24px;
  height: 24px;
}

/* ===== Search Results ===== */
.museum-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 9999;
}

.museum-search-results-inner {
  padding: 0;
}

.museum-search-results-inner.has-content {
  border-top: 2px solid #000000;
}

/* Loading State */
.museum-search-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.museum-search-loading::after {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* No Results */
.museum-search-no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.museum-search-no-results p {
  font-size: 18px;
  margin: 0;
}

/* ===== Product List ===== */
.museum-product-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Product Item */
.museum-product-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #ffffff;

  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.museum-product-item:hover {
  background: #f9f9f9;
}

/* Product Image */
.museum-product-image {
  width: 86px;
  height: 92px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0;
  background: #f5f5f5;
  opacity: 1;
}

.museum-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

/* Product Info */
.museum-product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
  padding: 11px 0px;
}

.museum-product-title {
  font-family: ct_font_swizzy, sans-serif;
  font-size: 16px;
  font-weight: 500;
  font-style: normal;
  color: #000;
  margin: 0;
  line-height: 110%;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.museum-product-price {
  font-family: ct_font_swizzy, sans-serif;
  font-size: 16px;
  font-weight: 500;
  font-style: normal;
  line-height: 110%;
  letter-spacing: 0;
  color: #000;
  margin: 0;
}

.museum-product-price ins {
  text-decoration: none;
  color: #ff0000;
  margin-right: 8px;
}

.museum-product-price del {
  color: #000000;
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  position: relative;
  display: inline-block;
}

.museum-product-price del::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  background: #000;
  transform: rotate(-8deg);
  transform-origin: center;
}

/* ===== Responsive Design ===== */
@media screen and (max-width: 768px) {
  /* Mobile: Search container fills full viewport */
  .museum-search-container {
    background: #ffffff;
    padding: 0px 16px;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .museum-search-header {
    gap: 12px;
  }

  .museum-search-input-wrapper {
    padding: 8px 14px;
  }

  .museum-search-container .museum-search-input-wrapper .museum-search-input {
    font-family: ct_font_swizzy, sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    font-style: normal !important;
    line-height: 110% !important;
    letter-spacing: 0 !important;
    text-align: left !important;
  }

  /* Mobile: Results fill remaining space */
  .museum-search-results {
    position: static;
    flex: 1;
    overflow-y: auto;
    margin-top: 16px;
  }

  .museum-search-results-inner.has-content {
    border-top: 0;
  }

  .museum-product-item {
    padding: 12px;
    gap: 12px;
  }

  .museum-product-image {
    width: 59px;
    height: 64px;
    opacity: 1;
  }

  .museum-product-title {
    font-size: 14px;
  }

  .museum-product-price {
    font-family: ct_font_swizzy, sans-serif;
    font-size: 14px;
    font-weight: 500;
    font-style: normal;
    line-height: 110%;
    letter-spacing: 0;
  }
}

@media screen and (max-width: 480px) {
  .museum-search-close {
    width: 32px;
    height: 32px;
  }

  .museum-search-close svg {
    width: 18px;
    height: 18px;
  }
}

/* ===== Accessibility ===== */

/* Screen reader only text */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
