:root {
    /* Astra header / menu height */
    --header-height: 20px;
}

.apple-search-container {
    max-width: 1240px;
    border: 1px solid;
}

/* Scope any list/reset styles inside search overlay */
.apple-search-wrapper ul {
    list-style: none;
    margin: 0;
    padding-left: 0;
    position: relative;
}

/* Optional: If you need menu-item-like style for your quick links inside overlay */
.apple-search-wrapper li {
    line-height: 1em !important;
    font-size: 14px !important;
    color: #000;
}

/* ===============================
   Wrapper
================================ */
.apple-search-wrapper {
    position: relative;
    max-width: 1240px;
}

/* ===============================
   Search Button
================================ */
.apple-search-wrapper .apple-search-toggle {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.apple-search-wrapper .apple-search-toggle:hover,
.apple-search-wrapper .apple-search-toggle:focus {
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    color: #111;
}

.apple-search-overlay > * {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

/* Make overlay taller for results */
.apple-search-overlay {
    position: fixed;
    top: var(--header-height); /* menu height er niche */
    left: 0;
    width: 100%;
    height: 500px; /* Increased height */
    background: #ffffff;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    z-index: 9999;
    overflow-y: auto; /* Allow scrolling if needed */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
}

/* Active state */
.apple-search-overlay.active {
    transform: translateY(0);
    margin-top: 7%;
    opacity: 1;
}

/* ===============================
   Search Input
================================ */
.apple-search-input {
    width: 90%;
    max-width: 1240px;
    display: block;
    font-size: 22px;
    border: none;
    border-bottom: 2px solid #ddd;
    padding: 12px;
    outline: none;
    font-family: "Inter", system-ui, sans-serif;
    background: transparent;
    margin: 20px auto 0;
}

/* ===============================
   Search Results
================================ */
.apple-search-results {
    max-width: 1240px;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
}

.apple-search-results a {
    padding: 10px 0;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    font-size: 13px !important;
    color: #000 !important;
}

.apple-search-results a:hover {
    background: #f5f5f5;
}

.apple-search-results .loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.apple-search-results .no-result {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* ===============================
   Quick Links Section
================================ */
.apple-search-quick-links {
    max-width: 1240px;
}

.quick-links-title {
    font-size: 14px !important;
    color: #000 !important;
    margin: 20px 0 15px 0 !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.apple-search-wrapper .apple-search-quick-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.apple-search-wrapper .apple-search-quick-links a {
    font-size: 13px !important;
    color: #000 !important;
    padding-left: 20px;
    display: inline;
}

.apple-search-wrapper .apple-search-quick-links a:hover {
    color: #0066CC;
    text-decoration: none;
}

/* ===============================
   Arrow added for Quick Links
================================ */

/* Quick Links list items inside search overlay */
.apple-search-wrapper .apple-search-quick-links ul li {
    margin: 0;
    padding: 0;
    display: block;
    position: relative;
    padding-left: 20px; /* space for the arrow */
    line-height: 1em !important;
}

/* Arrow before each Quick Links item */
.apple-search-wrapper .apple-search-quick-links ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #000;
    font-size: 14px;
    line-height: 1;
}

/* ===============================
   Search Results Title
================================ */
.apple-search-wrapper .results-title {
    font-size: 14px;
    color: #000;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0;
}

.ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item {
    line-height: 0px;
}

/* ===============================
   Mobile / Responsive Adjustments
================================ */
@media (max-width: 768px) {

    /* Fullscreen overlay */
    .apple-search-wrapper .apple-search-overlay {
        height: calc(100vh - var(--header-height));
    }

    /* Search input adjustments */
    .apple-search-input {
        margin-top: 40px;
        font-size: 20px;
    }

    /* Quick Links container adjustments */
    .apple-search-wrapper .apple-search-quick-links {
        margin: 20px auto 0;
        padding: 0 20px;
    }

    /* Quick Links anchor font size */
    .apple-search-wrapper .apple-search-quick-links a {
        font-size: 16px !important;
    }
}

