/**
 * Search Modal Styles - Dark Mode Premium
 * Unique Plástica Avançada - Dr. André Oliveira
 * Design sofisticado com cores da marca
 */

/* ALINHA NAVBAR AO TOPO - SEM ESPAÇO - FORÇA BRUTA */
html,
html body,
html body.body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.body div.navbar-no-shadow,
div.navbar-no-shadow,
.navbar-no-shadow {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  background-color: transparent !important;
}

body.body div.navbar-no-shadow > div,
.navbar-no-shadow > div {
  margin: 0 !important;
  padding: 0 !important;
}

body.body div.page-wrapper,
div.page-wrapper,
.page-wrapper {
  margin: 0 !important;
  padding: 0 !important;
}

body.body div.code-embed-3,
div.code-embed-3,
.code-embed-3 {
  margin: 0 !important;
  padding: 0 !important;
}

/* ========================================
   BOTÃO DE BUSCA - DESIGN PREMIUM WHITE
   ======================================== */

.search-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.search-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbc08d 0%, #b29158 100%);
  transform: translate(-50%, -50%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.search-button:hover::before {
  width: 100%;
  height: 100%;
  opacity: 0.2;
}

.search-button:hover {
  transform: scale(1.08);
  border-color: rgba(219, 192, 141, 0.5);
  box-shadow: 0 4px 16px rgba(219, 192, 141, 0.3);
}

.search-button svg {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  fill: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
}

.search-button:hover svg {
  fill: #dbc08d;
  transform: scale(1.1);
}

/* Botão Mobile */
.search-button-mobile {
  display: none;
}

@media (max-width: 991px) {
  .search-button-mobile {
    display: flex;
    position: absolute;
    top: 50%;
    right: 60px;
    transform: translateY(-50%);
    z-index: 1001;
    width: 48px;
    height: 48px;
    margin: 0;
  }

  .search-button-mobile svg {
    width: 22px;
    height: 22px;
  }

  .search-button-mobile:hover {
    transform: translateY(-50%) scale(1.08);
  }

  .navbar_desktop-view .search-button,
  .navbar_mobile-view-2 .search-button {
    display: none;
  }

  .navbar_container-2 {
    position: relative;
  }
}

/* ========================================
   MODAL OVERLAY - DARK MODE
   ======================================== */

.search-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-modal-overlay.active {
  display: flex;
  opacity: 1;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

/* ========================================
   MODAL CONTAINER - DARK MODE PREMIUM
   ======================================== */

.search-modal {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(26, 27, 31, 0.98) 0%,
    rgba(20, 20, 20, 0.95) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(219, 192, 141, 0.15);
  border-radius: 20px;
  width: 100%;
  max-width: 850px;
  margin-top: 60px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(219, 192, 141, 0.1),
    inset 0 1px 0 rgba(219, 192, 141, 0.05);
  transform: translateY(-30px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #b29158 0%, #dbc08d 50%, #b29158 100%);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.search-modal-overlay.active .search-modal {
  transform: translateY(0) scale(1);
}

/* ========================================
   BOTÃO FECHAR - FORA DO MODAL
   ======================================== */

.search-modal-close {
  position: fixed;
  top: 30px;
  right: 30px;
  background: rgba(219, 192, 141, 0.15);
  border: 2px solid rgba(219, 192, 141, 0.3);
  border-radius: 50%;
  font-size: 28px;
  color: #dbc08d;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  line-height: 1;
  font-weight: 300;
  z-index: 10000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.search-modal-close:hover {
  background: linear-gradient(135deg, #dbc08d 0%, #b29158 100%);
  border-color: #dbc08d;
  color: #1a1b1f;
  transform: rotate(90deg) scale(1.15);
  box-shadow: 0 6px 20px rgba(219, 192, 141, 0.4);
}

/* ========================================
   HEADER - DARK MODE ELEGANTE
   ======================================== */

.search-modal-header {
  padding: 35px 40px 25px;
  border-bottom: 1px solid rgba(219, 192, 141, 0.1);
  background: linear-gradient(
    180deg,
    rgba(219, 192, 141, 0.03) 0%,
    transparent 100%
  );
  position: relative;
}

/* ========================================
   INPUT DE BUSCA - DARK MODE PREMIUM
   ======================================== */

.search-input-wrapper {
  position: relative;
}

.search-input-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(219, 192, 141, 0.05) 0%, rgba(178, 145, 88, 0.08) 100%);
  border-radius: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-input-wrapper:focus-within::before {
  opacity: 1;
}

.search-input {
  width: 100%;
  padding: 18px 60px 18px 24px;
  font-size: 17px;
  font-weight: 400;
  border: 2px solid rgba(219, 192, 141, 0.15);
  border-radius: 14px;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  background: rgba(26, 27, 31, 0.6);
  color: #e0e0e0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
}

.search-input::placeholder {
  color: #777;
  font-weight: 300;
}

.search-input:focus {
  border-color: #dbc08d;
  background: rgba(26, 27, 31, 0.8);
  box-shadow:
    0 4px 16px rgba(219, 192, 141, 0.15),
    0 0 0 4px rgba(219, 192, 141, 0.08);
  transform: translateY(-1px);
}

.search-input-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  fill: #666;
  transition: all 0.3s ease;
  pointer-events: none;
}

.search-input-wrapper:focus-within .search-input-icon {
  fill: #dbc08d;
  transform: translateY(-50%) scale(1.1);
}

/* ========================================
   ÁREA DE RESULTADOS - DARK MODE
   ======================================== */

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 25px 40px 35px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(219, 192, 141, 0.02) 100%
  );
}

/* ========================================
   ESTADO VAZIO - DARK MODE
   ======================================== */

.search-empty {
  text-align: center;
  padding: 80px 30px;
  color: #777;
}

.search-empty svg {
  width: 100px;
  height: 100px;
  fill: #dbc08d;
  margin-bottom: 24px;
  opacity: 0.3;
  filter: drop-shadow(0 4px 8px rgba(219, 192, 141, 0.2));
}

.search-empty h3 {
  font-size: 22px;
  color: #b0b0b0;
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.search-empty p {
  font-size: 15px;
  color: #777;
  margin: 0;
  font-weight: 300;
  line-height: 1.6;
}

/* ========================================
   CABEÇALHO DE RESULTADOS - DARK MODE
   ======================================== */

.search-results-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(219, 192, 141, 0.1);
}

.search-results-count {
  font-size: 14px;
  color: #999;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.search-results-count strong {
  color: #dbc08d;
  font-weight: 600;
  font-size: 15px;
}

/* ========================================
   ITEM DE RESULTADO - DARK MODE LUXUOSO
   ======================================== */

.search-result-item {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(219, 192, 141, 0.12);
  border-radius: 12px;
  margin-bottom: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
  background: linear-gradient(
    135deg,
    rgba(26, 27, 31, 0.6) 0%,
    rgba(20, 20, 20, 0.4) 100%
  );
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.search-result-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #dbc08d 0%, #b29158 100%);
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-result-item:hover::before {
  transform: scaleY(1);
}

.search-result-item:hover {
  border-color: rgba(219, 192, 141, 0.4);
  background: rgba(26, 27, 31, 0.85);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(219, 192, 141, 0.2);
  transform: translateY(-3px) translateX(4px);
}

.search-result-category {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(219, 192, 141, 0.12) 0%, rgba(178, 145, 88, 0.15) 100%);
  color: #dbc08d;
  font-size: 11px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(219, 192, 141, 0.2);
}

.search-result-title {
  font-size: 19px;
  font-weight: 600;
  color: #e0e0e0;
  margin: 0 0 10px;
  line-height: 1.4;
  letter-spacing: 0.2px;
  transition: color 0.3s ease;
}

.search-result-item:hover .search-result-title {
  color: #dbc08d;
}

.search-result-description {
  font-size: 14px;
  color: #aaa;
  margin: 0 0 14px;
  line-height: 1.7;
  font-weight: 400;
}

.search-result-preview {
  font-size: 13px;
  color: #888;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 300;
}

.search-result-url {
  font-size: 12px;
  color: #b29158;
  margin-top: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-result-url::before {
  content: '→';
  font-size: 14px;
  transition: transform 0.3s ease;
}

.search-result-item:hover .search-result-url::before {
  transform: translateX(4px);
}

/* ========================================
   HIGHLIGHT DE TERMOS - DARK MODE
   ======================================== */

.search-highlight {
  background: linear-gradient(135deg, rgba(219, 192, 141, 0.25) 0%, rgba(178, 145, 88, 0.3) 100%);
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 600;
  color: #dbc08d;
  border: 1px solid rgba(219, 192, 141, 0.3);
}

/* ========================================
   LOADING STATE - DARK MODE
   ======================================== */

.search-loading {
  text-align: center;
  padding: 60px;
  color: #777;
}

.search-loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(219, 192, 141, 0.1);
  border-top: 3px solid #dbc08d;
  border-right: 3px solid #b29158;
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  margin: 0 auto 20px;
}

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

/* ========================================
   RESPONSIVO
   ======================================== */

@media (max-width: 768px) {
  .search-modal {
    margin-top: 10px;
    max-height: calc(100vh - 20px);
    border-radius: 16px;
  }

  .search-modal-header {
    padding: 25px 24px 20px;
  }

  .search-modal-close {
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .search-input {
    font-size: 16px;
    padding: 16px 54px 16px 20px;
  }

  .search-results {
    padding: 20px 24px 28px;
  }

  .search-result-item {
    padding: 20px;
  }

  .search-result-title {
    font-size: 17px;
  }

  .search-result-description {
    font-size: 13px;
  }

  .search-empty {
    padding: 60px 20px;
  }

  .search-empty svg {
    width: 80px;
    height: 80px;
  }
}

/* ========================================
   ANIMAÇÕES DE ENTRADA
   ======================================== */

.search-result-item {
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.search-result-item:nth-child(1) { animation-delay: 0.05s; }
.search-result-item:nth-child(2) { animation-delay: 0.1s; }
.search-result-item:nth-child(3) { animation-delay: 0.15s; }
.search-result-item:nth-child(4) { animation-delay: 0.2s; }
.search-result-item:nth-child(5) { animation-delay: 0.25s; }
.search-result-item:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   SCROLLBAR PREMIUM - DARK MODE
   ======================================== */

.search-results::-webkit-scrollbar {
  width: 8px;
}

.search-results::-webkit-scrollbar-track {
  background: rgba(219, 192, 141, 0.05);
  border-radius: 4px;
  margin: 8px 0;
}

.search-results::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #dbc08d 0%, #b29158 100%);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #b29158 0%, #dbc08d 100%);
  background-clip: content-box;
}
