.almas-search-modal { 
    position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 2147483647 !important; 
    display: flex; justify-content: center; align-items: flex-start; padding-top: 10vh; 
    opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; 
    direction: rtl; 
    font-family: inherit;
    pointer-events: none;
}
.almas-search-modal.active { opacity: 1; visibility: visible; pointer-events: auto; }
.almas-s-modal-overlay { 
    position: absolute; inset: 0; width: 100%; height: 100%; 
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(var(--almas-glass-blur)); 
    -webkit-backdrop-filter: blur(var(--almas-glass-blur)); 
    z-index: 1; 
}
.almas-s-modal-content { position: relative; width: 92%; max-width: 800px; z-index: 10; transform: translateY(50px) scale(0.9); transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); opacity: 0; will-change: transform, opacity; }
.almas-search-modal.active .almas-s-modal-content { transform: translateY(0) scale(1); opacity: 1; }

.almas-s-modal-close { 
    position: fixed; 
    top: 20px; 
    right: 20px; 
    left: auto;
    background: transparent !important; 
    border: none; 
    color: #ef4444; 
    width: 40px; 
    height: 40px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); 
    z-index: 2147483647 !important;
    animation: almasPopIn 0.6s 0.2s backwards;
    padding: 0;
    outline: none;
}
.almas-s-modal-close svg { width: 24px; height: 24px; stroke-width: 3px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); transition: transform 0.3s, filter 0.3s; }
@media (hover: hover){
.almas-s-modal-close:hover { transform: rotate(90deg) scale(1.2); filter: brightness(1.2); color: #dc2626; background: transparent !important; }
}

.almas-search-modal .almas-search-results {
    width: 100% !important;
    left: 0 !important;
    top: 100% !important;
    margin-top: 10px !important;
    transform: none !important;
    border-radius: var(--almas-radius-element, 20px) !important;
    position: absolute !important;
    box-sizing: border-box !important;
}

@media (max-width: 800px) {
        .almas-search-modal .almas-search-results {
            width: 100% !important;
            left: 0 !important;
            top: 100% !important;
            border-radius: var(--almas-radius-element, 20px) !important;
        }
}
@media (max-width: 768px) { 
    .almas-search-modal { padding-top: 60px; } 
    .almas-s-modal-content { width: 95%; }
    .almas-s-modal-close {
        top: 5px !important;
        right: 5px !important;
    }
}
@media (max-width: 1024px) {
    .almas-s-modal-overlay {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    .almas-s-modal-overlay { background: rgba(15, 23, 42, 0.75) !important; }
}
