/* Search Button */
.search-button {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: #0085a1;
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 133, 161, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button:hover {
  background: #006d85;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 133, 161, 0.5);
}

.search-button i {
  pointer-events: none;
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.search-modal.active {
  display: flex;
}

.search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.search-container {
  position: relative;
  width: 90%;
  max-width: 700px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

/* Search Input */
.search-input-wrapper {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input-wrapper i {
  color: #6c757d;
  font-size: 20px;
}

#search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 18px;
  padding: 8px 0;
  color: #333;
}

#search-input::placeholder {
  color: #adb5bd;
}

.search-close {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s ease;
}

.search-close:hover {
  color: #333;
}

/* Search Results */
.search-results-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.search-no-results {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
  font-size: 16px;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-result-item {
  padding: 16px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.search-result-item:hover {
  border-color: #0085a1;
  box-shadow: 0 2px 8px rgba(0, 133, 161, 0.1);
}

.search-result-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
}

.search-result-title a {
  color: #0085a1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.search-result-title a:hover {
  color: #006d85;
  text-decoration: underline;
}

.search-result-meta {
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 8px;
}

.search-result-summary {
  margin: 0 0 12px 0;
  color: #495057;
  font-size: 14px;
  line-height: 1.6;
}

.search-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-result-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  font-size: 12px;
  color: #0085a1;
}

/* Responsive */
@media (max-width: 768px) {
  .search-button {
    bottom: 70px;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .search-container {
    width: 95%;
    max-height: 85vh;
  }
  
  .search-input-wrapper {
    padding: 15px;
  }
  
  #search-input {
    font-size: 16px;
  }
  
  .search-results-wrapper {
    padding: 15px;
  }
  
  .search-result-item {
    padding: 12px;
  }
  
  .search-result-title {
    font-size: 16px;
  }
}

/* Scrollbar styling */
.search-results-wrapper::-webkit-scrollbar {
  width: 8px;
}

.search-results-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.search-results-wrapper::-webkit-scrollbar-thumb {
  background: #0085a1;
  border-radius: 4px;
}

.search-results-wrapper::-webkit-scrollbar-thumb:hover {
  background: #006d85;
}

/* Hide on print */
@media print {
  .search-button,
  .search-modal {
    display: none !important;
  }
}