/* Search Modal Styles */
.royal-search-modal-content {
  background: var(--royal-bg-white);
  border-radius: var(--royal-radius-xl);
  box-shadow: var(--royal-shadow-lg);
  border: 1px solid var(--royal-border-light);
}

.royal-search-modal-content .royal-modal-title {
  text-align: center;
  font-size: var(--royal-font-xl);
  margin-bottom: 2rem;
  color: var(--royal-primary);
  font-weight: 600;
}

/* Search Input Group */
.royal-search-input-group {
  position: relative;
  margin-bottom: 2.5rem;
}

.royal-search-input-group input {
  width: 100%;
  padding: 1.2rem 5rem 1.2rem 2rem;
  border: 2px solid var(--royal-border-light);
  border-radius: var(--royal-radius-xl);
  font-size: var(--royal-font-md);
  background: var(--royal-bg-white);
  box-shadow: var(--royal-shadow-sm);
  transition: all 0.3s ease;
}

.royal-search-input-group input:focus {
  border-color: var(--royal-primary-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

.royal-search-submit {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--royal-primary-blue);
  color: white;
  border: none;
  border-radius: var(--royal-radius-lg);
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--royal-shadow);
}

.royal-search-submit:hover {
  background: var(--royal-primary-dark);
  transform: translateY(-50%) scale(1.05);
  box-shadow: var(--royal-shadow-md);
}

/* Search Type Selection */
.royal-search-type-select {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.royal-search-type-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.8rem 1.2rem;
  border-radius: var(--royal-radius-lg);
  background: var(--royal-bg-light);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.royal-search-type-option:hover {
  background: var(--royal-blue-50);
  transform: translateY(-2px);
}

.royal-radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--royal-border-light);
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.royal-search-type-option input:checked+.royal-radio-custom {
  border-color: var(--royal-primary-blue);
  background: var(--royal-primary-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.royal-search-type-option input:checked+.royal-radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.royal-search-type-text {
  font-weight: 500;
  color: var(--royal-text-dark);
  transition: color 0.3s ease;
}

.royal-search-type-option input:checked~.royal-search-type-text {
  color: var(--royal-primary);
  font-weight: 600;
}

/* Hot Keywords */
.royal-search-hot-keywords {
  background: var(--royal-bg-light);
  padding: 1.5rem;
  border-radius: var(--royal-radius-lg);
  border-left: 4px solid var(--royal-primary);
}

.royal-search-hot-keywords h4 {
  margin-bottom: 1rem;
  color: var(--royal-text-dark);
  font-size: var(--royal-font-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.royal-search-hot-keywords h4::before {
  content: '🔥';
  font-size: var(--royal-font-md);
}

.royal-hot-keywords-list {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.royal-hot-keywords-list a {
  padding: 0.6rem 1.2rem;
  background: var(--royal-bg-white);
  border-radius: var(--royal-radius);
  color: var(--royal-text-light);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--royal-border-light);
  font-size: var(--royal-font-sm);
}

.royal-hot-keywords-list a:hover {
  background: var(--royal-primary-blue);
  color: white;
  border-color: var(--royal-primary-blue);
  transform: translateY(-2px);
  box-shadow: var(--royal-shadow-sm);
}

/* Search Page Styles */
.royal-search-page {
  padding: 3rem 0;
  background: var(--royal-bg-light);
  min-height: 80vh;
}

.royal-search-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 6rem 0;
}

.royal-search-title {
  font-size: var(--royal-font-xxl);
  margin-bottom: 2rem;
  color: var(--royal-primary);
  font-weight: 700;
}

.royal-search-input-large {
  display: flex;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  box-shadow: var(--royal-shadow-md);
  border-radius: var(--royal-radius-xl);
  overflow: hidden;
  background: var(--royal-bg-white);
}

.royal-search-input-large input {
  flex: 1;
  padding: 1.3rem 2rem;
  border: none;
  font-size: var(--royal-font-md);
  background: var(--royal-bg-white);
}

.royal-search-input-large input:focus {
  outline: none;
  background: var(--royal-blue-50);
}

.royal-search-input-large button {
  border-radius: 0;
  padding: 0 2.5rem;
  background: var(--royal-primary-blue);
  border: none;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: var(--royal-font-md);
}

/* Search Filters */
.royal-search-filters {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.royal-filter-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.8rem 1.5rem;
  background: var(--royal-bg-white);
  border-radius: var(--royal-radius-lg);
  border: 2px solid var(--royal-border-light);
  transition: all 0.3s ease;
}

.royal-filter-option:hover {
  border-color: var(--royal-primary-blue);
  transform: translateY(-2px);
}

.royal-filter-option input:checked~span {
  color: var(--royal-primary);
  font-weight: 600;
}

.royal-filter-option input:checked {
  background: var(--royal-blue-50);
  border-color: var(--royal-primary-blue);
}

/* Search Results */
.royal-search-results {
  background: var(--royal-bg-white);
  border-radius: var(--royal-radius-xl);
  padding: 2.5rem;
  box-shadow: var(--royal-shadow);
  margin-top: 2rem;
}

.royal-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--royal-border-light);
}

.royal-results-header h2 {
  color: var(--royal-text-dark);
  font-size: var(--royal-font-lg);
  font-weight: 600;
}

.royal-results-count {
  color: var(--royal-text-light);
  font-size: var(--royal-font-md);
}

.royal-filter-tag {
  background: var(--royal-primary-blue);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: var(--royal-radius);
  margin-left: 1rem;
  font-weight: 600;
}

/* Result Items */
.royal-result-item {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  border: 1px solid var(--royal-border-light);
  border-radius: var(--royal-radius-lg);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  background: var(--royal-bg-white);
  position: relative;
  overflow: hidden;
  animation: searchSlideIn 0.4s ease-out;
}

.royal-result-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--royal-primary-blue);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.royal-result-item:hover {
  border-color: var(--royal-primary-blue);
  box-shadow: var(--royal-shadow-lg);
  transform: translateY(-3px);
}

.royal-result-item:hover::before {
  opacity: 1;
}

.royal-result-type {
  flex-shrink: 0;
}

/* Type Badges */
.royal-type-list {
  background: var(--royal-green-500);
}

.royal-type-product {
  background: var(--royal-gradient-primary);
}

.royal-type-news {
  background: var(--royal-purple-500);
}

.royal-type-article {
  background: var(--royal-gray-500);
}

.royal-type-list,
.royal-type-product,
.royal-type-news,
.royal-type-article {
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: var(--royal-radius);
  font-weight: 600;
}

.royal-result-content {
  flex: 1;
}

.royal-result-title {
  margin-bottom: 0.8rem;
}

.royal-result-title a {
  color: var(--royal-text-dark);
  text-decoration: none;
  font-size: var(--royal-font-md);
  font-weight: 600;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.royal-result-title a:hover {
  color: var(--royal-primary);
}

.royal-result-excerpt {
  color: var(--royal-text-light);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.royal-result-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--royal-text-light);
  font-size: var(--royal-font-sm);
  align-items: center;
  flex-wrap: wrap;
}

.royal-result-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.royal-result-meta i {
  opacity: 0.7;
}

.royal-result-category {
  background: var(--royal-blue-50);
  color: var(--royal-blue-600);
  padding: 0.3rem 0.8rem;
  border-radius: var(--royal-radius);
  font-weight: 500;
}

.royal-result-price {
  color: var(--royal-red-500);
  font-weight: 700;
  font-size: var(--royal-font-md);
}

/* No Results State */
.royal-no-results,
.royal-search-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--royal-text-light);
}

.royal-no-results i,
.royal-search-empty i {
  font-size: var(--royal-font-xxl);
  color: var(--royal-border-light);
  margin-bottom: 2rem;
  opacity: 0.5;
}

.royal-no-results h3,
.royal-search-empty h3 {
  color: var(--royal-text-dark);
  margin-bottom: 1rem;
  font-size: var(--royal-font-lg);
}

.royal-search-suggestions {
  max-width: 500px;
  margin: 3rem auto 0;
  text-align: left;
  background: var(--royal-bg-light);
  padding: 2rem;
  border-radius: var(--royal-radius-lg);
  border-left: 4px solid var(--royal-primary);
}

.royal-search-suggestions h4 {
  margin-bottom: 1rem;
  color: var(--royal-text-dark);
  font-size: var(--royal-font-md);
}

.royal-search-suggestions ul {
  list-style: none;
  padding: 0;
}

.royal-search-suggestions li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--royal-border-light);
  position: relative;
  padding-left: 1.5rem;
}

.royal-search-suggestions li::before {
  content: '💡';
  position: absolute;
  left: 0;
}

.royal-search-suggestions li:last-child {
  border-bottom: none;
}

/* Loading State */
.royal-search-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.royal-search-loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--royal-border-light);
  border-top: 3px solid var(--royal-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animations */
@keyframes searchSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  100% {
    transform: rotate(360deg);
  }
}