/* ============================================================
   Sentence search (/Dictionary/SentenceSearch) — "Цахим өгүүлбэр".
   Scoped under .ss so it can't affect other pages.
   ============================================================ */

.ss {
    --ss-brand: #3f51b5;
    --ss-brand-d: #2c3a91;
    --ss-brand-l: #5c6bc0;
    --ss-accent: #ff7a59;
    --ss-accent-d: #f4623a;
    --ss-ink: #16225a;
    --ss-body: #4d5468;
    --ss-muted: #8a90a2;
    --ss-line: #e4e7f2;
    --ss-bg-soft: #f6f7fb;
    --ss-radius: 16px;
    --ss-shadow: 0 18px 40px -20px rgba(22, 27, 51, .3);
    --ss-shadow-sm: 0 10px 24px -16px rgba(22, 27, 51, .26);

    font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif;
    color: var(--ss-body);
    padding-bottom: 80px;
}
.ss * { box-sizing: border-box; }
.ss h1, .ss h2, .ss h3, .ss h4 { font-family: 'Montserrat', 'Roboto', sans-serif; color: var(--ss-ink); margin: 0; }
.ss__wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }

/* ---------- Search hero ---------- */
.ss-hero {
    text-align: center;
    padding: 50px 22px 40px;
    background: linear-gradient(180deg, #eef1fb 0%, #ffffff 100%);
    border-bottom: 1px solid var(--ss-line);
    margin-bottom: 34px;
}
.ss-hero__eyebrow {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
    color: var(--ss-brand);
    background: rgba(63, 81, 181, .1);
    padding: 6px 15px; border-radius: 999px; margin-bottom: 14px;
}
.ss-hero h1 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; margin-bottom: 22px; }

/* search form */
.ss-search { max-width: 760px; margin: 0 auto; }
.ss-search .row { margin: 0; }
.ss-search .form-group { margin: 0; }
.ss-search .control-label, .ss-search .bar { display: none !important; }
.ss-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    background: #fff;
    border: 1.5px solid var(--ss-line);
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 16px 34px -22px rgba(22, 27, 51, .4);
}
.ss-form__book { flex: 0 0 200px; }
.ss-form__q { flex: 1; min-width: 200px; }
.ss-form select,
.ss-form #book_id,
.ss-form input[type="text"],
.ss-form #stf {
    width: 100%;
    height: 52px;
    border: 1.5px solid var(--ss-line) !important;
    border-radius: 12px !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    color: var(--ss-ink);
    background: #fff;
    text-align: left !important;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.ss-form select:focus, .ss-form input:focus {
    outline: none;
    border-color: var(--ss-brand) !important;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, .14) !important;
}
.ss-form__btn {
    flex: 0 0 auto;
    height: 52px;
    min-width: 130px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ss-brand-l), var(--ss-brand));
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 12px 24px -12px rgba(63, 81, 181, .8);
    transition: transform .2s ease;
}
.ss-form__btn:hover { transform: translateY(-1px); }

/* ---------- Layout ---------- */
.ss-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
    align-items: start;
}
@media (max-width: 900px) { .ss-layout { grid-template-columns: 1fr; } }

/* ---------- Matched sentence card ---------- */
.ss-sentence {
    background: #fff;
    border: 1px solid var(--ss-line);
    border-radius: var(--ss-radius);
    box-shadow: var(--ss-shadow-sm);
    padding: 28px 30px;
    margin-bottom: 22px;
}
.ss-sentence__book {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px; font-weight: 700; letter-spacing: .04em;
    color: var(--ss-brand);
    background: rgba(63, 81, 181, .1);
    padding: 5px 13px; border-radius: 999px; margin-bottom: 16px;
}
.ss-sentence__kr {
    font-size: clamp(20px, 2.6vw, 26px);
    font-weight: 700;
    color: var(--ss-ink);
    line-height: 1.45;
    margin-bottom: 12px;
}
.ss-sentence__mn {
    font-size: 17px;
    color: var(--ss-body);
    line-height: 1.6;
    padding-top: 14px;
    border-top: 1px dashed var(--ss-line);
}

/* ---------- Sub-sections (Үг / Дүрэм) ---------- */
.ss-section {
    background: #fff;
    border: 1px solid var(--ss-line);
    border-radius: var(--ss-radius);
    box-shadow: var(--ss-shadow-sm);
    padding: 22px 26px;
    margin-bottom: 22px;
}
.ss-section__head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 14px;
}
.ss-section__head h3 { font-size: 16px; font-weight: 700; }
.ss-section__head i {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 8px; font-size: 13px; color: #fff;
    background: linear-gradient(135deg, var(--ss-brand-l), var(--ss-brand));
}

.ss-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) 1.4fr;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--ss-line);
    align-items: baseline;
}
.ss-row:first-of-type { border-top: 0; }
.ss-row__term {
    font-family: 'Montserrat', 'Roboto', sans-serif;
    font-weight: 700;
    color: var(--ss-ink);
    font-size: 16px;
}
.ss-row__term a { color: var(--ss-brand); text-decoration: none; cursor: pointer; }
.ss-row__term a:hover { text-decoration: underline; }
.ss-row__def { color: var(--ss-body); font-size: 15px; line-height: 1.55; }

/* rule play button */
.ss-rule-play {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px; font-weight: 600;
    color: var(--ss-accent-d);
    background: rgba(255, 122, 89, .12);
    border: 0; border-radius: 999px;
    padding: 6px 13px; cursor: pointer;
    transition: background .2s ease;
}
.ss-rule-play:hover { background: rgba(255, 122, 89, .22); }

/* ---------- Video ---------- */
.ss-video {
    background: #000;
    border-radius: var(--ss-radius);
    overflow: hidden;
    box-shadow: var(--ss-shadow);
    margin-bottom: 22px;
}
.ss-video__frame { position: relative; width: 100%; padding-top: 56.25%; }
.ss-video__frame iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }

/* ---------- Recent searches ---------- */
.ss-history { background: #fff; border: 1px solid var(--ss-line); border-radius: var(--ss-radius); box-shadow: var(--ss-shadow-sm); padding: 22px 26px; }
.ss-history__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ss-history__head h3 { font-size: 16px; font-weight: 700; }
.ss-history__head i { color: var(--ss-muted); }
.ss-history table { width: 100%; border-collapse: collapse; }
.ss-history td { padding: 10px 0; border-top: 1px solid var(--ss-line); font-size: 14px; vertical-align: top; }
.ss-history td:first-child { padding-right: 16px; }
.ss-history td a { color: var(--ss-brand); text-decoration: none; font-weight: 600; }
.ss-history td a:hover { text-decoration: underline; }

/* ---------- States ---------- */
.ss-state {
    text-align: center;
    background: #fff;
    border: 1px solid var(--ss-line);
    border-radius: var(--ss-radius);
    box-shadow: var(--ss-shadow-sm);
    padding: 54px 28px;
}
.ss-state__icon {
    width: 72px; height: 72px;
    margin: 0 auto 20px;
    display: grid; place-items: center;
    border-radius: 50%;
    font-size: 30px; color: var(--ss-brand);
    background: rgba(63, 81, 181, .1);
}
.ss-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.ss-state p { margin: 0 auto; max-width: 470px; font-size: 15.5px; color: var(--ss-body); }
.ss-state strong { color: var(--ss-ink); }

/* ---------- Aside ---------- */
.ss-aside .aside-widet { margin-bottom: 22px; }
.ss-aside .aside-widet img { width: 100%; height: auto; border-radius: var(--ss-radius); box-shadow: var(--ss-shadow-sm); display: block; }

@media (max-width: 560px) {
    .ss-form { padding: 12px; }
    .ss-form__book, .ss-form__q, .ss-form__btn { flex: 1 1 100%; }
    .ss-row { grid-template-columns: 1fr; gap: 4px; }
}
