/* ZUSS subject search – uses the site's theme variables (light + dark) */

.zs-search {
    position: relative;
    z-index: 20;                 /* results float above the cards below */
    width: 100%;
    max-width: 600px;
    margin: 0 auto 25px;
}

.zs-field {
    position: relative;
}

.zs-input {
    width: 100%;
    padding: 14px 18px;

    font-family: inherit;
    font-size: 17px;
    color: var(--text-color);

    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;

    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.zs-input:focus {
    border-color: var(--main-color);
}

/* Placeholders: English on the left, Arabic on the right */
.zs-ph {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    color: var(--secondary-text-color);
    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.zs-ph-en {
    left: 18px;
    max-width: 58%;
}

.zs-ph-ar {
    right: 18px;
    max-width: 38%;
    font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
}

.zs-input:not(:placeholder-shown) ~ .zs-ph {
    display: none;
}


/* Floating results */
.zs-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;

    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;

    max-height: min(60vh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;

    background: var(--card-bg);                                        /* fallback */
    background: color-mix(in srgb, var(--card-bg) 65%, transparent);   /* transparency: 82% = how solid */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(8px);                                       /* blur strength */

    border: 2px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.zs-results[hidden] {
    display: none;
}

.zs-item {
    display: block;
    padding: 12px 16px;
    text-align: start;

    color: var(--text-color);
    background: var(--card-bg);
    background: color-mix(in srgb, var(--card-bg) 65%, transparent);
    border: 2px solid var(--border-color);
    border-radius: 12px;

    transition: transform 0.3s ease, border-color 0.3s ease;
}

.zs-item:hover,
.zs-item:focus-visible {
    transform: translateY(-2px);
    border-color: var(--main-color);
    outline: none;
}

.zs-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.zs-title {
    color: var(--sub-text-color);
    font-size: 17px;
    font-weight: bold;
}

.zs-ar {
    color: var(--text-color);
    font-size: 16px;
    font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
}

.zs-badge {
    margin-top: 4px;
    color: var(--secondary-text-color);
    font-size: 13px;
}

.zs-msg {
    padding: 12px;
    text-align: center;
    color: var(--secondary-text-color);
}

@media (max-width: 420px) {
    .zs-ph { font-size: 15px; }
}
