/*
============================================================
 POLSKAELITA.PL | Green Dark | MyBB 1.8.41
 pe_forum_controls.css | v2

 Przyciski "Napisz wątek", sortowanie, szukaj w dziale,
 skocz do - w jednym spójnym stylu.
============================================================
*/

/* =========================================================
   1. WSPÓLNE KONTENERY GÓRNY / DOLNY
========================================================= */

.tl-container {
    box-sizing: border-box;
}

.tl-container:has(+ .stable),
.stable + .second-cont.tl-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;

    width: 100%;
    min-height: 66px;

    margin: 14px 0 12px !important;
    padding: 12px 18px !important;

    background: linear-gradient(90deg, #1a292c 0%, #152126 55%, #163026 100%);
    border: 1px solid #335147;
    border-radius: 10px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.03),
        0 4px 12px rgba(0,0,0,.12);
}

.tl-container:has(+ .stable) > .left,
.stable + .second-cont.tl-container > .left {
    margin-right: auto;
}

.tl-container:has(+ .stable) > .right,
.stable + .second-cont.tl-container > .right {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* =========================================================
   2. PRZYCISKI "NAPISZ WĄTEK"
========================================================= */

.tl-container:has(+ .stable) a[href*="newthread.php"],
.stable + .second-cont.tl-container a[href*="newthread.php"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: 148px;
    height: 42px;

    padding: 0 18px !important;
    margin: 0 !important;

    background: linear-gradient(180deg, #2f7b4a 0%, #1f5c35 100%) !important;
    border: 1px solid #57a86f !important;
    border-radius: 8px !important;

    color: #f1fff5 !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-transform: uppercase;
    white-space: nowrap;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 2px 8px rgba(0,0,0,.12);
    transition: .18s ease;
}

.tl-container:has(+ .stable) a[href*="newthread.php"]:hover,
.stable + .second-cont.tl-container a[href*="newthread.php"]:hover {
    background: linear-gradient(180deg, #379055 0%, #246941 100%) !important;
    border-color: #7ec995 !important;
    color: #fff !important;
}

/* =========================================================
   3. GŁÓWNY DOLNY PANEL Z SZUKAJ / SKOCZ DO
========================================================= */

.stable + .second-cont.tl-container + .tl-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px;

    width: 100%;
    margin: 10px 0 24px !important;
    padding: 14px 16px !important;

    background: linear-gradient(90deg, #14262c 0%, #122027 55%, #14252a 100%);
    border: 1px solid #355348;
    border-radius: 10px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.02),
        0 4px 12px rgba(0,0,0,.10);
}

.stable + .second-cont.tl-container + .tl-container > .right {
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px 16px;
    margin: 0 !important;
    float: none !important;
}

/* =========================================================
   4. BOX SZUKAJ / BOX SKOCZ DO
========================================================= */

.stable + .second-cont.tl-container + .tl-container form[action*="search.php"],
.stable + .second-cont.tl-container + .tl-container form:has(select[name="fid"]) {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;

    min-height: 58px;
    padding: 10px 12px !important;
    margin: 0 !important;

    background: rgba(255,255,255,.025);
    border: 1px solid #355348;
    border-radius: 9px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

/* =========================================================
   5. ETYKIETY
========================================================= */

.stable + .second-cont.tl-container + .tl-container form label,
.stable + .second-cont.tl-container + .tl-container form strong,
.stable + .second-cont.tl-container + .tl-container form .smalltext {
    color: #edf5ef !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

/* =========================================================
   6. INPUTY / SELECTY
========================================================= */

.stable + .second-cont.tl-container + .tl-container
input[type="text"],
.stable + .second-cont.tl-container + .tl-container
input[type="search"],
.stable + .second-cont.tl-container + .tl-container
select {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    margin: 0 !important;

    background: #1f2024 !important;
    border: 1px solid #2f4139 !important;
    border-radius: 6px !important;

    color: #eef6f0 !important;
    font-size: 12px !important;
    line-height: 38px !important;
    box-sizing: border-box;
    outline: none;
    box-shadow: none !important;
}

.stable + .second-cont.tl-container + .tl-container input[type="text"],
.stable + .second-cont.tl-container + .tl-container input[type="search"] {
    width: 175px;
}

.stable + .second-cont.tl-container + .tl-container select[name="fid"] {
    width: 190px;
}

.stable + .second-cont.tl-container + .tl-container input:focus,
.stable + .second-cont.tl-container + .tl-container select:focus {
    border-color: #6eb98b !important;
    box-shadow: 0 0 0 2px rgba(110,185,139,.12) !important;
}

/* =========================================================
   7. DOLNE PRZYCISKI OK
========================================================= */

.stable + .second-cont.tl-container + .tl-container input[type="submit"],
.stable + .second-cont.tl-container + .tl-container button[type="submit"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: 44px;
    width: 44px;
    height: 38px !important;
    min-height: 38px !important;

    padding: 0 !important;
    margin: 0 !important;

    background: linear-gradient(180deg, #3a9a47 0%, #2f7c39 100%) !important;
    border: 1px solid #60bf6d !important;
    border-radius: 6px !important;

    color: #f7fff7 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-transform: uppercase;
    text-align: center;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 2px 6px rgba(0,0,0,.10);
    cursor: pointer;
    transition: .18s ease;
}

.stable + .second-cont.tl-container + .tl-container input[type="submit"]:hover,
.stable + .second-cont.tl-container + .tl-container button[type="submit"]:hover {
    background: linear-gradient(180deg, #47aa55 0%, #378844 100%) !important;
    border-color: #83d08f !important;
    color: #fff !important;
}

/* =========================================================
   8. GÓRNY PANEL SORTOWANIA PRZY LIŚCIE TEMATÓW
   TO JEST TEN ZAZNACZONY PRZEZ CIEBIE "OK"
========================================================= */

.stable .tcat + div,
.stable .tfoot,
.stable .threadlist_bottom,
.stable .threadlist_controls,
.stable .forumdisplay_sorting,
.stable .forumdisplay_options {
    box-sizing: border-box;
}

/* Stylujemy selecty i przycisk OK w pasku sortowania */
.stable select,
.stable input[type="submit"],
.stable button[type="submit"] {
    vertical-align: middle;
}

/* Selecty przy sortowaniu */
.stable select {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 12px !important;

    background: #14262a !important;
    border: 1px solid #355247 !important;
    border-radius: 6px !important;

    color: #edf5ef !important;
    font-size: 12px !important;
    line-height: 36px !important;
    box-sizing: border-box;
}

/* TEN GÓRNY OK ZAZNACZONY NA SCREENIE */
.stable input[type="submit"][value="OK"],
.stable button[type="submit"][value="OK"],
.stable input[type="submit"][value="Ok"],
.stable button[type="submit"][value="Ok"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 44px !important;
    min-width: 44px !important;
    height: 36px !important;
    min-height: 36px !important;

    padding: 0 !important;
    margin: 0 0 0 6px !important;

    background: linear-gradient(180deg, #3a9a47 0%, #2f7c39 100%) !important;
    border: 1px solid #60bf6d !important;
    border-radius: 6px !important;

    color: #f7fff7 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-transform: uppercase;
    text-align: center;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 2px 6px rgba(0,0,0,.10);
    cursor: pointer;
    box-sizing: border-box;
}

.stable input[type="submit"][value="OK"]:hover,
.stable button[type="submit"][value="OK"]:hover,
.stable input[type="submit"][value="Ok"]:hover,
.stable button[type="submit"][value="Ok"]:hover {
    background: linear-gradient(180deg, #47aa55 0%, #378844 100%) !important;
    border-color: #83d08f !important;
    color: #fff !important;
}

/* =========================================================
   9. RESPONSYWNOŚĆ
========================================================= */

@media (max-width: 980px) {
    .stable + .second-cont.tl-container + .tl-container > .right {
        justify-content: flex-start;
    }

    .stable + .second-cont.tl-container + .tl-container form[action*="search.php"],
    .stable + .second-cont.tl-container + .tl-container form:has(select[name="fid"]) {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .tl-container:has(+ .stable),
    .stable + .second-cont.tl-container {
        padding: 10px 12px !important;
    }

    .tl-container:has(+ .stable) a[href*="newthread.php"],
    .stable + .second-cont.tl-container a[href*="newthread.php"] {
        min-width: 132px;
        height: 40px;
        font-size: 11px !important;
    }

    .stable + .second-cont.tl-container + .tl-container input[type="text"],
    .stable + .second-cont.tl-container + .tl-container input[type="search"],
    .stable + .second-cont.tl-container + .tl-container select {
        width: 100%;
    }
}

/* =========================================================
   10. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
    .tl-container:has(+ .stable) a[href*="newthread.php"],
    .stable + .second-cont.tl-container a[href*="newthread.php"],
    .stable + .second-cont.tl-container + .tl-container input[type="submit"],
    .stable + .second-cont.tl-container + .tl-container button[type="submit"],
    .stable input[type="submit"][value="OK"],
    .stable button[type="submit"][value="OK"] {
        transition: none !important;
    }
}