/**
 * AI-Style Search CSS
 * Modern, clean design that looks like AI-powered search
 */
 
 /* Disable autocomplete suggestions */
 .suggestions-dropdown {
     display: none !important;
 }

/* Main Container */
.ai-search-page {
    min-height: 100vh;
    background: #f8f9fa;
}

/* Hero Section */
.search-hero {
    background: linear-gradient(135deg, #4b9cd3  0%, #003366 100%);
    padding: 80px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.search-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.search-title {
    color: white;
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.ai-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.4em;
    font-weight: 600;
    letter-spacing: 1px;
    margin-right: 8px;
    vertical-align: middle;
    backdrop-filter: blur(10px);
}

.search-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    margin-bottom: 40px;
}

/* Search Input */
.search-input-wrapper {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.ai-search-input {
    width: 100%;
    padding: 20px 60px 20px 28px;
    font-size: 18px;
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    outline: none;
    background: white;
}

.ai-search-input:focus {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    /* background: linear-gradient(135deg, #667eea, #764ba2); */
    background: linear-gradient(135deg, #4b9cd3 , #003366);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    overflow: hidden; /* Important: clips the shine effect */
}

.search-button:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Shine effect pseudo-element */
.search-button::before {
   content: '';
   position: absolute;
   top: 0;
   left: -100%;
   width: 100%;
   height: 100%;
   background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent
   );
   animation: shine 5.5s infinite;
}

/* Shine animation */
@keyframes shine {
   0% {
      left: -100%;
   }
   100% {
      left: 100%;
   }
}

/* Optional: Pause animation on hover */
.search-button:hover::before {
   animation-play-state: paused;
}

/* ==================================================
   RESET BUTTON
   ================================================== */

.reset-button {
    position: absolute;
    right: 60px;  /* Position to the left of search button */
    top: 50%;
    transform: translateY(-50%);
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    opacity: 0.7;
}

.reset-button:hover {
    background: #e0e0e0;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.reset-button svg {
    width: 18px;
    height: 18px;
}

/* Autocomplete Suggestions */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 1000;
}

.suggestions-list {
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item svg {
    color: #667eea;
    flex-shrink: 0;
}

.suggestion-text {
    flex: 1;
    color: #333;
}

.suggestion-category {
    font-size: 0.85em;
    color: #999;
    padding: 2px 10px;
    background: #f0f0f0;
    border-radius: 12px;
}

/* AI Thinking State */
.ai-thinking-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.ai-thinking {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: #003366;
    font-size: 1.1em;
    font-weight: 500;
    border: 1px solid rgba(0, 51, 101, 0.3);
    background-color:rgba(206, 229, 255, 0.2);
}

.thinking-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #003366;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 16px;
}

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


/* Results Summary */
.results-summary {
    max-width: 800px;
    margin: 40px auto 20px;
    padding: 0 20px;
     
}

.old-summary-content {
    /* display: flex; */
    /* align-items: center; */
    /* gap: 12px; */
    /* padding: 16px 24px; */
    /* background: white; */
    /* border-radius: 12px; */
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); */
    /* border-bottom: 4px solid #003366; */
    /* font-size: 16px; */
    /* font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; */
    /* font-style: italic; */  
}

.old-summary-content svg {
    color: #003366;
    flex-shrink: 0;
}

.old-summary-text {
    color: #333;
}

/* --------------------------------------------------
   OPTION 3: 3D Pop Out with Full Navy Gradient Background
   Entire bubble has navy gradient (white text)
   -------------------------------------------------- */

.summary-content {
    display: flex;
    align-items: center;
    /* gap: 12px; */
    gap: 3px;
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 8px 16px rgba(0, 51, 102, 0.25),
        0 16px 32px rgba(0, 51, 102, 0.15);
    color: white;
    position: relative;
    transform: translateY(-2px);
      
}

.summary-content::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 60px;
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 14px solid #003366;
    filter: drop-shadow(0 -2px 3px rgba(0, 51, 102, 0.15));
}

.summary-content svg {
    color: white;
    flex-shrink: 0;
}

.summary-text {
    color: white;
    font-size: 1.4em;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.summary-text strong {
    color: white;
}






/* Search Results */
.search-results-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.result-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #003366;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slideIn 0.4s ease forwards;
    overflow-wrap: break-word;
}

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

.result-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ai-confidence {
    display: inline-block;
    background: linear-gradient(135deg, #4b9cd3, #003366);
    color: white;
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 1em;
    font-weight: 600;
}

.ai-tag {
    display: inline-block;
    /* background: #f0f0f0; */
    background: #e3f2fd !important;
    color: #003366;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 500;
}

 /* Clickable tag styling */
 .ai-tag-link {
     display: inline-block;
     background: #e3f2fd;  /* Light blue for clickable */
     color: #1976d2;       /* Darker blue text */
     padding: 4px 12px;
     border-radius: 12px;
     font-size: 0.8em;
     font-weight: 500;
     text-decoration: none;
     transition: all 0.2s ease;
 }
 
 .ai-tag-link:hover {
     background: #1976d2 !important;
     color: #ffffff;
     transform: translateY(-1px);
 }
 
 
 
 /* Category tag - clickable, blue theme */
 .ai-tag-industry {
     display: inline-block;
     background: #e3f2fd;
     color: #1976d2;
     padding: 4px 12px;
     border-radius: 12px;
     font-size: 0.8em;
     font-weight: 500;
     text-decoration: none;
     transition: all 0.2s ease;
 }
 
 .ai-tag-industry:hover {
     background: #1976d2;
     color: white;
     transform: translateY(-1px);
 }
 
 /* Freshness tags - non-clickable, different colors */
 .ai-tag-freshness {
     display: inline-block;
     padding: 4px 12px;
     border-radius: 12px;
     font-size: 0.8em;
     font-weight: 500;
     cursor: default;
 }
 
 /* "New" tag - green */
 .ai-tag-new {
     background: #ddfddf !important;
     color: #2e7d32;
     border: 1px solid #81c784;
 }
 
 /* "Recent" tag - orange/amber */
 .ai-tag-recent {
     background: #fff3e0 !important;
     color: #e65100;
     border: 1px solid #ffb74d;
 }
 
 /* Generic tag (fallback) */
 .ai-tag {
     display: inline-block;
     background: #f0f0f0;
     color: #666;
     padding: 4px 12px;
     border-radius: 12px;
     font-size: 0.8em;
     font-weight: 500;
 }
 
 
 
 
 
 
 

.result-title {
    font-size: 1.4em;
    margin-bottom: 12px;
    line-height: 1.3;
}

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

.result-title a:hover {
    color: #003366;
}

.result-title mark {
    background: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
}

.result-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.result-state {
    /* color: #85313A;
    font-weight: 500;
    font-size: 1em;
    
    display: inline-block; */
    background: linear-gradient(135deg, #bb4754, #85313A);
    color: white;
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 1em;
    font-weight: 600;
}

.result-price {
    color: #28a745;
    font-weight: 600;
    font-size: 1.1em;
}

.ai-reason {
    display: flex;
    /* flex-basis: auto;  */
    /* flex-grow: 0;  */
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    /* background: #f8f9fa; */
    background: #FDF6F4;
    border-radius: 8px;
    border: 1px solid #E8C5C0;
    font-size: 1em;
    font-weight: 500;
    color: #85313A;
    margin-top: 12px;
}

.ai-reason svg {
    color: #85313A;
    flex-shrink: 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.no-results svg {
    color: #ddd;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 12px;
}

.no-results p {
    color: #666;
    margin-bottom: 8px;
}

.no-results .suggestion {
    color: #999;
    font-size: 0.9em;
}

/* Error State */
.search-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 16px;
    color: #856404;
}

/* Quick Examples */
.quick-examples {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.quick-examples h3 {
    color: #666;
    font-size: 1em;
    margin-bottom: 20px;
    font-weight: 500;
}

.example-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.example-pill {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 12px 24px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    font-size: 0.95em;
    font-weight: 500;
}

.example-pill:hover {
    border-color: #003366;
    color: #003366;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
    
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-title {
        font-size: 1.8em;
    }
    
    .ai-search-input {
        font-size: 16px;
        padding: 16px 50px 16px 20px;
    }
    
    .result-card {
        padding: 20px;
    }
    
    .result-title {
        font-size: 1.2em;
    }
    
    .example-pills {
        flex-direction: column;
    }
    
    .example-pill {
        width: 100%;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* ==================================================
   EXTENDED RESULTS SECTION - Non Animated
   ================================================== */
   
/*    .extended-results {
       max-width: 450px;
       margin: 0 auto; 
       padding: 0 20px 60px;  
   } */
   
/*    .extended-results-card {
       background: white;
       border-radius: 16px;  
       padding: 24px;  
       margin-bottom: 16px;  
       box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);  
       border: 2px solid #003366;  
       text-align: center; 
   } */
   
   /* .extended-results-card h3 {
       color: #333;
       margin: 0 0 12px;
       font-size: 1.3em;
   } */
   
 /*   .extended-results-card p {
       color: #666;
       margin: 0 0 20px;
       font-size: 0.95em;
   } */
   
/*    .extended-results-button {
       display: inline-flex;
       align-items: center;
       gap: 8px;
       color: white;
       padding: 14px 28px;
       border-radius: 50px;
       text-decoration: none;
       font-weight: 600;
       transition: all 0.3s ease;
       background: linear-gradient(135deg, #003366, #0066cc);
       box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
   } */
   
 /*   .extended-results-button:hover {
       transform: translateY(-2px);
       box-shadow: 0 6px 16px rgba(0, 51, 102, 0.4);
       color: white;
   } */
   
/*    .extended-results-button svg {
       width: 18px;
       height: 18px;
   } */
   
   /* ==================================================
   EXTENDED RESULTS SECTION - Animated
   ================================================== */

.extended-results {
       max-width: 675px;
       margin: 0 auto;
       padding: 0 20px 60px;
       position: relative;
       overflow: hidden;
   }
   
   .extended-results-card {
       position: relative;
       background: white;
       border-radius: 16px;
       padding: 24px;
       margin-bottom: 16px;
       box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
       border-left: 8px solid #003366;
       text-align: center;
       overflow: hidden;
   }
   
   /* Animated Parallelogram Background */
   .extended-results-card::before {
       content: '';
       position: absolute;
       top: 0;
       left: -100%;  /* Start off-screen left */
       width: 100%;
       height: 100%;
       background: linear-gradient(135deg, 
           rgba(0, 51, 102, 0.03) 0%, 
           rgba(0, 102, 204, 0.05) 100%
       );
       transform: skewX(-15deg);  /* Creates parallelogram */
       animation: slideParallelogramOneWay 18s linear infinite;  /* 12 seconds, one-way */
       z-index: 0;
   }
   
   /* One-way slide animation (left to right continuously) */
   @keyframes slideParallelogramOneWay {
       0% {
           left: -100%;
       }
       100% {
           left: 100%;
       }
   }
   
   /* Keep content above the animated background */
   .extended-results-card h3,
   .extended-results-card p,
   .extended-results-button {
       position: relative;
       z-index: 1;
   }
   
   .extended-results-card h3 {
       color: #333;
       margin: 0 0 12px;
       font-size: 1.3em;
   }
   
   .extended-results-card p {
       color: #666;
       margin: 0 0 20px;
       font-size: 0.95em;
   }
   
   .extended-results-button {
       display: inline-flex;
       align-items: center;
       gap: 8px;
       background: linear-gradient(135deg, #003366, #0066cc);
       color: white;
       padding: 14px 28px;
       border-radius: 50px;
       text-decoration: none !important;
       font-weight: 600;
       transition: all 0.3s ease;
       box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
   }
   
   .extended-results-button a{
      text-decoration: none;
   }
   
   .extended-results-button:hover {
       transform: translateY(-2px);
       box-shadow: 0 6px 16px rgba(0, 51, 102, 0.4);
       color: white;
   }
   
   .extended-results-button svg {
       width: 18px;
       height: 18px;
   }
 
 /* ==================================================
    BACK TO TOP BUTTON
    ================================================== */
 
 .back-to-top-container {
     max-width: 800px;
     margin: 0 auto;
     padding: 0 20px 40px;
     text-align: center;
 }
 
 .back-to-top-button {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     background: white;
     color: #003366;
     padding: 12px 24px;
     border: 2px solid #003366;
     border-radius: 50px;
     font-weight: 600;
     font-size: 0.95em;
     cursor: pointer;
     transition: all 0.3s ease;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
 }
 
 .back-to-top-button:hover {
     background: #003366;
     color: white;
     transform: translateY(-2px);
     box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
 }
 
 .back-to-top-button svg {
     width: 20px;
     height: 20px;
     transition: transform 0.3s ease;
 }
 
 .back-to-top-button:hover svg {
     transform: translateY(-3px);
 }
 
 
 /* ==================================================
    ALTERNATIVE STYLES
    ================================================== */
 
 /* ALTERNATIVE 1: Filled Navy Button */
 /*
 .back-to-top-button {
     background: linear-gradient(135deg, #003366, #0066cc);
     color: white;
     border: none;
 }
 
 .back-to-top-button:hover {
     transform: translateY(-2px) scale(1.05);
 }
 */
 
 /* ALTERNATIVE 2: Icon Only (Circular) */
 /*
 .back-to-top-button {
     width: 50px;
     height: 50px;
     padding: 0;
     border-radius: 50%;
     justify-content: center;
 }
 
 .back-to-top-button span {
     display: none;
 }
 */
 
 /* ALTERNATIVE 3: Minimal Text Link */
 /*
 .back-to-top-button {
     background: transparent;
     border: none;
     box-shadow: none;
     color: #003366;
     padding: 10px 16px;
 }
 
 .back-to-top-button:hover {
     background: #f8f9fa;
     color: #0066cc;
 }
 */
 
 /* CSS for cooldown message  */
 .search-cooldown-message {
     background: #fff3cd;
     color: #856404;
     padding: 12px 20px;
     border-radius: 8px;
     text-align: center;
     border: 1px solid #ffeeba;
 }
 
 .ai-search-input:disabled {
     background: #f0f0f0 !important;  /* Gray background */
     color: #999 !important;          /* Gray text */
     cursor: not-allowed !important;
     opacity: 0.6;                     /* Dim it */
 }
 
 /* Animated Glow for Location Tag  */
 .location_glow-tag {
   position: relative;
   overflow: hidden;
   /* background: linear-gradient(135deg, #bb4754, #85313A); */
   box-shadow:
     0 4px 18px rgba(187, 71, 84, 0.2),
     inset 0 1px 0 rgba(255, 255, 255, 0.2);
 }
 
 .location_glow-tag::before {
   content: '';
   position: absolute;
   top: -50%;
   left: -200px;
   width: 160px;
   height: 200%;
   background: linear-gradient(
     105deg,
     rgba(255, 255, 255, 0)    25%,
     rgba(255, 255, 255, 0.12) 40%,
     rgba(255, 255, 255, 0.18) 50%,
     rgba(255, 255, 255, 0.12) 60%,
     rgba(255, 255, 255, 0)    75%
   );
   animation: glide 16s infinite linear;
 }
 
 @keyframes glide {
   0%   { left: -200px; }
   55%  { left: 110%; }
   100% { left: 110%; }
 }
 
.search-refinement-bar {
     margin-top: 12px;
     display: flex;
     align-items: center;
     gap: 10px;
     flex-wrap: wrap;
 }
 
 .refinement-label {
     font-size: 14px;
     color: #666;
 }
 
 .refine-chip {
     border: 1px solid #d0d7de;
     background: #fff;
     color: #333;
     border-radius: 999px;
     padding: 8px 14px;
     cursor: pointer;
     font-size: 14px;
 }
 
 .refine-chip.active {
     background: #111827;
     color: #fff;
     border-color: #111827;
 }


