/* Style the search input */
.ansera-search-modal-body .ansera-search-send-mail {

    all: unset; /* Reset inherited styles */
    display: none;
    width: 95%;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1.125rem;    

}

.ansera-search-modal-body .ansera-search-modal-input {
    all: unset; /* Reset inherited styles */
    display: block;
    width: 100%;
    padding: 22px 18px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1.125rem;
    height: 0px;
    background-color: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    margin-top: auto
}

.ansera-search-modal-body .ansera-search-modal-input::placeholder {
    color: #ced4da;
    opacity: 1;
    transition: color 0.2s ease-in-out;
}

.ansera-search-modal-body .ansera-search-modal-input:focus {
    border-color: #6236ff;
    color: black;
    outline: none;
}

.ansera-search-modal-body .ansera-search-modal-input:focus::placeholder {
    color: transparent;
}

.ansera-search-modal-body .ansera-search-modal-input {   
    border-top: 1px solid #ccc;
  }

/* Align ❌ exactly where the magnifying glass was */
#close-search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; /* Same as the search icon size */
}

/* General Modal Styles */
.ansera-search-modal-overlay{
    position: fixed;
    display:flex;
    align-items: flex-start;
    justify-content: center;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    /* padding-top: 40px;        100px gap from top */
}

html.ansera-search-modal-open {
    position: fixed;
    overflow: hidden;
    width: 100%;
}

.ansera-search-modal-backdrop{
    display: none;
}

.ansera-search-modal-container {
    background: white;
    max-height: calc(100vh - 10px);
    margin-top: 5px;
    margin-bottom: 5px;
    width: 650px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
    position: relative;
    /* overflow: hidden; */
    display: flex;
    flex-direction: column;
  }

.ansera-search-close-btn {
    background: none;
    border: none;
    padding: 1px;
    color: rgb(134, 142, 150);
    line-height: 1px;
    margin: 0px;
    border-radius: 4px;
}

.ansera-search-close-btn svg {
    cursor: pointer;
  }

/* Header */
.ansera-search-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f3f5;
    /* height: 35px; */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding:15px;
    border-bottom: 1px solid #ced4da;
    cursor: move; 

}

.ansera-search-modal-title {
    flex-grow: 1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-weight: 700;
    font-size: 1.375rem;
    line-height: 1.4;
    margin: 0px;
    margin-left: 10px; /* Optional: space after icon or left edge */
}

.ansera-search-modal-logo{
    height: inherit;
    object-fit: cover; 
    width: 2rem; 
    height: 2rem;
}

.ansera-search-modal-body {
    padding: 15px;
    flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Footer */
.ansera-search-modal-footer {
    padding: 1px 15px; /* top-bottom: 10px, left-right: 15px */
    text-align: center;
    display: flex;
    justify-content: space-between;
}

.ansera-search-modal-footer-text {
    font-size: 12px;
    color: #888;
}

/* Open Modal Button */
.ansera-search-open-modal-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #6236ff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*loader is*/

/* Wrapper */
.ansera-search-generating-content {
    padding: 20px;
    text-align: center;
    display: block;
  }
  
  .ansera-search-generating-text {
    font-size: 0.875rem; /* Smaller text */
    font-weight: 400;
    color: #888;
    margin-bottom: 10px;
    display: flex;
    justify-content: left;
    align-items: center;
  }

  .ansera-search-dots::after {
    content: '';
    display: inline-block;
    width: 1em;
    text-align: left;
    animation: ansera-search-dots 1.2s steps(4, end) infinite;
  }
  
  @keyframes ansera-search-dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
  }
  
  /* Loader Bar Container */
  /* Loader Bar Container */
.ansera-search-loader-bar {
    position: relative;
    width: 100%;
    height: 8px; /* Increased height */
    background-color: #f8f9fa;
    border-radius: 5px;
    overflow: hidden;
  }
  
  /* Flowing Purple Line */
  .ansera-search-loader-wave {
    position: absolute;
    height: 100%;
    width: 100%; /* Covers full width for a stronger effect */
    background: linear-gradient(
      90deg,
      transparent,
      #6236ff,
      transparent
    );
    animation: ansera-search-flow 1.2s linear infinite;
  }
  
  /* Animation */
  @keyframes ansera-search-flow {
    0% {
      left: -100%;
    }
    100% {
      left: 100%;
    }
  }

  



  .ansera-search-chat-history {
  
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    /* border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc  max-height: 95vh; /* Adjust as needed */
    min-height: 1vh;
}

.ansera-search-question {
    /* padding: 0.5rem;
    background-color: #f4f4f4; */
    padding-bottom: 6px;
    border-radius: 4px;
    max-width: 100%;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-weight: bold;
    color: #333;
}

.ansera-search-answer {
    color: #222;
}


.ansera-search-btn-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px; /* space between rows */
}


.ansera-search-answer-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    
    margin-top: 8px;
}

.ansera-search-btn {
    all: unset; /* Reset all inherited button styles */
    background-color: #f8f9fa !important;
    color: #858e96 !important;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
}

.ansera-search-btn-group {
    display: flex;
    gap: 10px;
}

.ansera-search-divider {
    border: none;
    border-top: 1px solid #ccc;
    margin: 10px 0 10px 0; /* top right bottom left */
    width: 100%;
}


.ansera-search-sources {
    margin-top: 10px;
}

.ansera-search-source-heading {
    font-size: small;
    color: black;
    margin-bottom: 5px;
}

.ansera-search-source-tiles {
    display: flex;
    flex-wrap: nowrap;          /* Prevent wrapping to new lines */
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 5px;
    white-space: nowrap;

    scrollbar-width: thin;
    scrollbar-color: #aaa transparent;
}

.ansera-search-source-tiles::-webkit-scrollbar {
    height: 6px;
}

.ansera-search-source-tiles::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

.ansera-search-source-tile {
    background-color: #7A7A7A;
    border: none;
    width: 200px;
    height: 60px; /* Fixed height */
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    padding: 10px;
    position: relative;
    flex-shrink: 0;
    overflow: hidden; /* Hide overflow content */
    border: 3px solid teal;
}

.ansera-search-source-tile .tile-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-height: 0; /* Allow content to shrink */
    overflow: hidden; /* Hide overflow content */
}

.ansera-search-source-tile .tile-content span {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Show maximum 2 lines */
    -webkit-box-orient: vertical;
}

.ansera-search-source-tile .tile-footer {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    flex-shrink: 0; /* Prevent footer from shrinking */
}

.ansera-search-source-tile .wp-logo {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

.ansera-search-source-tile .ansera-search-source-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.65rem;
}

.ansera-search-source-tile:hover {
    background-color: #8a8a8a;
    /* transform: translateY(-2px); */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ansera-search-source-tile i {
    color: white;
    font-size: 0.9rem;
    margin-top: 2px;
}

.ansera-search-btn:hover{
    border-color: #3e38e6 !important;
}

.ansera-search-modal-wrapper {
    position: absolute;
    width: fit-content;
    height: fit-content;
    overflow: visible;
    box-sizing: border-box;
    
  }
  
  /* Tablet view (landscape & portrait) */
@media (max-width: 768px) {
    .ansera-search-modal-wrapper {
        max-width: 95vw;
        max-height: 95vh;
    }
    .ansera-search-modal-container {
        max-width: 98vw;
    }
}

/* Mobile view */
@media (max-width: 480px) {
    .ansera-search-modal-wrapper {
        max-width: 98vw;
        max-height: 98vh;
    }
    .ansera-search-modal-container {
        max-width: 98vw;
    }
}

.ansera-search-resize-handle.ansera-search-left {
    position: absolute;
    left: 0;               /* Position it exactly on the left edge */
    top: 0;
    bottom: 0;
    width: 10px;           /* Width of the handle */
    cursor: ew-resize;     /* Resize cursor */
    z-index: 10;           /* Ensure it's on top of the modal */
    /*background-color: rgba(0, 0, 0, 0.2);  Optional, to make it visible */
}


.ansera-search-resize-handle.ansera-search-right {
    position: absolute;
    right: 0; /* Position it on the right edge */
    top: 0;
    bottom: 0;
    width: 10px;
    cursor: ew-resize;
    z-index: 10;
    /* background-color: rgba(0, 0, 0, 0.2); */
}

.ansera-search-resize-handle.ansera-search-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 10px;
  width: 100%;
  cursor: ns-resize;
  z-index: 10;
}

.ansera-search-resize-handle.ansera-search-top {
    position: absolute;
    top: 0;
    left: 0;
    height: 10px;
    width: 100%;
    cursor: ns-resize;
    z-index: 10;
  }
  

  #ansera-search-email-box {
    position: relative;
  }
  
  
  #ansera-search-send-email {
    all: unset;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  

    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* #ansera-search-send-email:hover {
    background-color: #f1f3f5;
  } */

  .ansera-search-default-question-container{
    display: flex; 
    flex-direction: row; 
    gap: 10px; 
    overflow-x: auto;
    border-radius:10px; 
    background-color: transparent;
  }

  /* WebKit Browsers (Chrome, Safari, Edge) */
.ansera-search-default-question-container::-webkit-scrollbar {
    width: 6px;     /* vertical scrollbar */
    height: 6px;    /* horizontal scrollbar */
  }
  
  .ansera-search-default-question-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }
  
  .ansera-search-default-question-container::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 10px;
  }
  
  .ansera-search-default-question-container::-webkit-scrollbar-thumb:hover {
    background-color: #555;
  }

  .ansera-search-welcome-question {
    padding: 10px; 
    background-color: #f0f0f0; 
    border-radius: 25px; 
    cursor: pointer;
    white-space: nowrap;  
    }
  
#ansera-search-plugin-search {
    flex: 1;
    /* min-width: 1600px; */
    padding: 0px 45px 0px 60px;
    height: auto;
    min-height: 70px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
    white-space: normal;
    overflow: auto;
    text-overflow: clip;
    word-wrap: break-word;
    resize: vertical;
    border-color: teal;
}

#ansera-search-plugin-search::placeholder {
    color: #999999;
    opacity: 1;
}



#ansera-search-play-button {
    all: unset;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #007bff;
    color: white;
    transition: all 0.3s ease;
    height: 40px;
    width: 40px;
}

#ansera-search-play-button:hover {
    background-color: #0056b3;
}

#ansera-search-play-button svg {
    width: 20px;
    height: 20px;
}

.ansera-search-invisible-scrollbar {
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE and Edge */
  }
  .ansera-search-invisible-scrollbar::-webkit-scrollbar {
    display: none;                  /* Chrome, Safari, Opera */
  }



.ansera-search-search-bar {
    position: fixed;
      
    left: 50%;
    transform: translateX(-50%);
    width: 60vw;
    /* padding: 10px 15px; */
    z-index: 9999;
    box-sizing: border-box;
    /* display: flex; */
    flex-direction: column;
    gap: 5px;
    /* background: #fff; */
    bottom: 15px;
    border-radius: 10px;

}

.ansera-search-question-boxes {
    position: relative;
    height: 40px;
    width: 50%;
    margin: 5px auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ansera-search-question-box {
    cursor: pointer;
    position: absolute;
    min-width: 50%;
    height: 40px;
    background-color: #7A7A7A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    box-sizing: border-box;
    opacity: 1;
    pointer-events: none;
    border-radius: 24px !important;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    transition: top 1.5s ease-in-out;
    top: 40px;
    visibility: hidden;
}

.ansera-search-question-box.active {
    pointer-events: auto;
    visibility: visible;
}

.ansera-search-question-box.previous {
    top: -40px;
    pointer-events: none;
}

.ansera-search-question-box.reset {
    top: 40px;
}

.ansera-search-question-box p {
    margin: 0;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    width: auto;
    padding: 0 10px;
}

/* Large screens (1200px and up) */
@media (max-width: 1800px) {
    .ansera-search-search-bar {
        width: 98%;
        min-width: auto;
    }
    
    #ansera-search-plugin-search {
        width: 100%;
        min-width: auto;
    }
}

/* Medium screens (992px to 1199px) */
@media (max-width: 1199px) {
    .ansera-search-search-bar {
        width: 95%;
    }
    
    #ansera-search-plugin-search {
        font-size: 15px;
        height: 60px;
    }
}

/* Small screens (768px to 991px) */
@media (max-width: 991px) {
    .ansera-search-search-bar {
        width: 90%;
        padding: 0;
    }
    
    #ansera-search-plugin-search {
        font-size: 14px;
        min-height: 55px;
        padding: 15px 40px 15px 45px;
    }
    
    #ansera-search-send-question {
        min-width: 80px;
        height: 35px;
        font-size: 13px;
        right: 8px !important;
    }
    
    #ansera-search-ansera-input-icon {
        left: 10px;
    }

    #ansera-search-ansera-input-icon img {
        width: 28px;
        height: 28px;
    }
}

/* Extra small screens (up to 767px) */
@media screen and (max-width: 767px) {
    .ansera-search-search-bar {
        width: 100%;
        min-width: auto;
        flex-direction: column;
        gap: 15px;
        padding: 0;
        box-sizing: border-box;
    }
    
    #ansera-search-plugin-search {
        width: 100%;
        min-width: auto;
        min-height: 50px;
        margin-left: 0px;
        font-size: 14px;
        padding: 12px 35px 12px 45px;
    }
    
    #ansera-search-send-question {
        width: 100%;
        min-width: auto;
        margin-top: -6px;
        height: 40px;
        right: 8px !important;
    }
    
    #ansera-search-ansera-input-icon {
        left: 8px;
    }

    #ansera-search-ansera-input-icon img {
        width: 25px;
        height: 25px;
    }

    #ansera-search-play-button {
        right: 8px;
        height: 35px;
        width: 35px;
    }

    #ansera-search-play-button svg {
        width: 16px;
        height: 16px;
    }
}

/* Small mobile devices (up to 480px) */
@media screen and (max-width: 480px) {
    #ansera-search-send-question {
        right: 8px !important;
        height: 35px;
    }

    #ansera-search-ansera-input-icon img {
        width: 22px;
        height: 22px;
    }

    #ansera-search-play-button {
        right: 5px;
        height: 30px;
        width: 30px;
    }

    #ansera-search-play-button svg {
        width: 14px;
        height: 14px;
    }
}

#ansera-search-ansera-input-icon {
    all: unset;
    position: absolute;
    /* left: 15px; */
    top: 8px;
    /* transform: translateY(-115%); */
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 45px;
    z-index: 2;
    transition: none;
    bottom: 15px;
}

/* #ansera-search-ansera-input-icon img {
    width: 35px;
    height: 35px;
    object-fit: contain;
} */

#ansera-search-ansera-trash-icon {
    position: absolute;
    right: 70px;
    /* top: 50%; */
    transform: translateY(-125%);
    /* padding: 8px; */
    display: flex;
    align-items: center;
    justify-content: center;
    /* height: 40px; */
    /* width: 40px; */
    z-index: 2;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

#ansera-search-ansera-trash-icon:hover {
    color: #ff4444;
}

#ansera-search-ansera-trash-icon i {
    font-size: 18px;
}



#ansera-search-send-question:hover {
    background: #f0f0f0;
}

#ansera-search-send-question i {
    font-size: 14px;
}


#ansera-search-cyclic-child-div
{
    text-decoration: none; 
    color: #fff; 
    padding: 8px 15px; 
    border-radius: 12px; 
    transition: all 0.3s ease; 
    background-color: #333; 
    font-size: 14px; 
    text-align: center; 
    min-width: 200px;
    height:12px;
    line-height:1;
    cursor: pointer;
}



#ansera-search-questions-large-view-parent-div
{
    position:absolute;
    display: flex;
    justify-content: center;
    left:50px;
    bottom:0px;
    width:92%;
    gap:20px;
    display: flex;
    overflow-x: auto;
    font-size: 13px;
    max-width: 85%;
    
}