  /*Loading spinner*/

  .loading-overlay {
    position: fixed; /* Full viewport coverage */
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999;
    background: rgba(255,255,255,0.8);
    opacity: 0;
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center; /* Center vertically */
    transition: opacity 0.3s linear, visibility 0.3s linear;
    pointer-events: none;
    display: flex !important;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  
  .loading-overlay.active {
    opacity: 1;
    visibility: visible !important;
    display: flex !important;
    pointer-events: auto;
  }
  
  .loading-overlay-content {
    background-color: #ffffff;
    padding: 30px;
    border: 5px solid #70004B;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  
  .spinner-ring {
    width: 60px;
    height: 60px;
    border: 6px solid white;
    border-top: 6px solid #70004B;
    border-radius: 50%;
    animation: spin 0.8s linear infinite, colorCycle 3s linear infinite;
    margin-bottom: 10px;
  }
  .spinner-image {
    max-width: 100px;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  @keyframes colorCycle {
    0%   { border-top-color: #70004B; }
    20%  { border-top-color: #B13B95; }
    40%  { border-top-color: #CD4139; }
    60%  { border-top-color: #E1A46C; }
    80%  { border-top-color: #E9949F; }
    100% { border-top-color: #70004B; }
  }

  .search-result-image img {
    width: 150px;
    height: 150px;
    object-fit: cover; 
    display: block;
}

.loading-text {
    margin-left: 20px;
}

.loading-text::after {
    content: '';
    display: inline-block;
    text-align: left;
    width: 3ch; /* reserve space for 3 dots */
    animation: dots 2.0s steps(3, end) infinite;
}

@keyframes dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75% { content: '...'; }
    100%   { content: ''; }
}