/* ---- START: New & Modified Styles for Search Form ---- */


.ai-loader {
  border: 6px solid rgba(255, 255, 255, 0.2);
  border-top: 6px solid #ffffff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

div#ai-search-results {
    color: #fff;
}
#ai-destination-search p {
    color: #fff;
}


/* This new rule targets the main container to lay out the form elements */
#ai-destination-search {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    flex-direction: row;
}




/* This new rule styles the button to match the input and control its size */
#ai-destination-submit {
    font-family: "Heebo", Sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #FFFFFF;
    background-color: #0373ab; /* A sample color */
    border: 1px solid #0373ab;
    border-radius: 10px;
    padding: 13px 25px;
    cursor: pointer;
    flex-shrink: 0; /* Prevents the button from shrinking on small screens */
}

/* ---- END: New & Modified Styles for Search Form ---- */


input#ai-destination-input {
    font-family: "Heebo", Sans-serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 1px;
    color: #8E8E8E;
    background-color: #FFFFFF;
    border-color: #8E8E8E;
    padding: 13px 20px;
    margin: 0;
    border-width: 1px;
    border-style: solid;
    border-radius: 10px;
    /* --- CHANGES --- */
    flex-grow: 1; /* Allows the input to expand and fill the remaining space */
    min-width: 0; /* Prevents the input from overflowing its container on small screens */
}

/* קונטיינר התוצאות */
#ai-search-results{
    display:grid;
    grid-template-columns:repeat(1,1fr); /* מובייל ברירת מחדל */
    gap:30px;
    max-width:1200px;
    padding:0 16px;       /* שוליים פנימיים למסכים קטנים */
    box-sizing:border-box;
    direction:rtl;
    text-align:center;
    /* --- CHANGES --- */
    flex-basis: 100%; /* Makes the results container take up the full width, forcing it to a new line */
    margin: 0px auto 0; /* Adds 30px space on top and keeps it centered horizontally */
}

/* טאבלט – 3 בעמודה ורוחב מלא */
@media (min-width:768px) and (max-width:1023px){
    #ai-search-results{
        grid-template-columns:repeat(3,1fr);
        max-width:100%;
    }
}

/* מחשב – 4 בעמודה ועד 1200px */
@media (min-width:1024px){
    #ai-search-results{
        grid-template-columns:repeat(4,1fr);
        max-width:1200px;
    }
}

/* כרטיס תוצאה (הקישור העוטף) */
#ai-search-results .ai-card{
    display:block;           /* שיהיה פריט גריד */
    background:#fff;
    border:1px solid #e5e5e5;
    border-radius:12px;
    overflow:hidden;
    text-decoration:none;
    color:inherit;
    transition:transform .2s ease, box-shadow .2s ease;
    position: relative; /* חשוב בשביל הצמדה של המחיר */
}
#ai-search-results .ai-card:hover{
    transform:translateY(-2px);
    box-shadow:0 6px 16px rgba(0,0,0,.08);
}

/* תמונה */
#ai-search-results .ai-card-image img{
    height: 150px;
    border-radius: 20px 20px 0 0;
    width: 100%;
    object-fit: cover;
}

#ai-search-results .ai-card-image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(0deg, rgba(52, 94, 116, 0.58) 10%, rgba(0, 0, 0, 0.15) 40%);
    pointer-events: none;
    border-radius: 20px 20px 0 0;
}

/* תוכן */
#ai-search-results .ai-card-content{
    padding:0 20px 10px 20px;
}

/* כותרת יעד */
#ai-search-results .ai-destination-title{
    font-family: "Heebo", Sans-serif;
    font-size: 16px;
    font-weight: 400;
    text-align: right;
}

.ai-destination-title strong {
    font-size: 22px;
    font-weight: 600;
    display: block;
    width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#ai-search-results .ai-destination-title .from-symbol{
    font-weight:400;
}

/* טקסטים משניים */
#ai-search-results .ai-subtext{
    margin: 4px 0;
    font-size: 13px;
    font-weight: 500;
    color: #858585;
    text-align: right;
    margin-top: -15px;
}

#ai-search-results .ai-subtext_2{
    display:none;
}

/* מחיר מוצמד בפינה שמאלית עליונה */
#ai-search-results .ai-price{
position: absolute;
    top: 160px;
    left: 15px;
}
#ai-search-results .ai-price-label {
    color: #0373ab;
    font-size: 12px;
    font-weight: 400;
    text-align: right;
    margin-bottom: -4px;
}
#ai-search-results .ai-price-amount{
    font-family: "Anton", Sans-serif;
    font-size:28px;
    font-weight:400;
    color:#0373ab;
}