/*
============================================================
 POLSKAELITA.PL | Green Dark | MyBB 1.8.41
 pe_forum_controls.css | v4.0

 Pelny arkusz: przyciski Napisz watek, sortowanie,
 moderacja, Szukaj w tym dziale, Skocz do.
 v4: poprawiony WYLACZNIE przycisk WYCZYSC (type="button").
============================================================
*/

:root {
    --pe-panel-bg-1: #16272b;
    --pe-panel-bg-2: #122026;
    --pe-panel-bg-3: #153025;
    --pe-panel-border: #355348;
    --pe-input-bg: #1f2024;
    --pe-input-border: #2f4139;
    --pe-input-focus: #6eb98b;
    --pe-btn-green-1: #2f7b4a;
    --pe-btn-green-2: #1f5c35;
    --pe-btn-green-border: #57a86f;
    --pe-btn-green-hover-1: #379055;
    --pe-btn-green-hover-2: #246941;
    --pe-btn-green-hover-border: #7ec995;
    --pe-text-main: #edf5ef;
    --pe-text-soft: #d9e7dd;
}

/* 1. Wspolne obudowy */

.tl-container,
.second-cont,
.stable,
.forum_controls,
.thread_controls {
    box-sizing: border-box;
}

/* 2. Pasek nad i pod lista tematow */

.tl-container:has(+ .stable),
.stable + .second-cont.tl-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    min-height: 66px;
    margin: 14px 0 12px !important;
    padding: 12px 18px !important;
    background: linear-gradient(
        90deg,
        var(--pe-panel-bg-1),
        var(--pe-panel-bg-2) 55%,
        var(--pe-panel-bg-3)
    );
    border: 1px solid var(--pe-panel-border);
    border-radius: 10px;
    box-shadow:
        inset 0 1px 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;
}

/* NAPISZ WATEK */

.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,
        var(--pe-btn-green-1),
        var(--pe-btn-green-2)
    ) !important;

    border: 1px solid var(--pe-btn-green-border) !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 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,
        var(--pe-btn-green-hover-1),
        var(--pe-btn-green-hover-2)
    ) !important;

    border-color: var(--pe-btn-green-hover-border) !important;
    color: #fff !important;
}

/* 3. Dolny panel narzedzi */

.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,
        #122027 55%,
        #14252a
    );

    border: 1px solid #355348;
    border-radius: 10px;

    box-shadow:
        inset 0 1px 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. Pola formularzy */

.stable + .second-cont.tl-container + .tl-container form[action*="search.php"],
.stable + .second-cont.tl-container + .tl-container form:has(select[name="fid"]),
.stable + .second-cont.tl-container + .tl-container form:has(select[name="action"]) {
    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 rgba(255,255,255,.02);
}

/* 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,
.stable + .second-cont.tl-container + .tl-container form span {
    color: var(--pe-text-main) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

/* 5. Inputy i 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,
.stable select {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    margin: 0 !important;
    background: var(--pe-input-bg) !important;
    border: 1px solid var(--pe-input-border) !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;
}

/* Focus */

.stable + .second-cont.tl-container + .tl-container input:focus,
.stable + .second-cont.tl-container + .tl-container select:focus,
.stable select:focus {
    border-color: var(--pe-input-focus) !important;

    box-shadow:
        0 0 0 2px rgba(110,185,139,.12) !important;
}

/*
============================================================
 6. MALE PRZYCISKI

 Wszystkie maja ten sam kolor.

 WAZNE:
 MyBB generuje WYCZYSC jako input[type="button"].
============================================================
*/

.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"],

.stable input[type="submit"][value="Ok"],
.stable button[type="submit"][value="Ok"],

.stable input[type="submit"][value="OK (0)"],
.stable button[type="submit"][value="OK (0)"],

.stable input[type="submit"][value="WYCZYŚĆ"],
.stable button[type="submit"][value="WYCZYŚĆ"],

/* POPRAWKA V4 - WYCZYSC */

.stable + .second-cont.tl-container + .tl-container input[type="button"][onclick*="clearChecked"],
.stable + .second-cont.tl-container + .tl-container input[type="button"][value="WYCZYŚĆ" i],
.stable + .second-cont.tl-container + .tl-container button[type="button"][onclick*="clearChecked"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    height: 38px !important;
    min-height: 38px !important;
    padding: 0 16px !important;
    margin: 0 !important;

    background: linear-gradient(
        180deg,
        var(--pe-btn-green-1),
        var(--pe-btn-green-2)
    ) !important;

    background-image: linear-gradient(
        180deg,
        var(--pe-btn-green-1),
        var(--pe-btn-green-2)
    ) !important;

    border: 1px solid var(--pe-btn-green-border) !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 rgba(255,255,255,.08),
        0 2px 6px rgba(0,0,0,.10) !important;

    cursor: pointer;
    transition: .18s ease;
    box-sizing: border-box;
}

/* HOVER - MALE PRZYCISKI */

.stable + .second-cont.tl-container + .tl-container input[type="submit"]:hover,
.stable + .second-cont.tl-container + .tl-container button[type="submit"]:hover,

.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,

.stable input[type="submit"][value="OK (0)"]:hover,
.stable button[type="submit"][value="OK (0)"]:hover,

.stable input[type="submit"][value="WYCZYŚĆ"]:hover,
.stable button[type="submit"][value="WYCZYŚĆ"]:hover,

.stable + .second-cont.tl-container + .tl-container input[type="button"][onclick*="clearChecked"]:hover,
.stable + .second-cont.tl-container + .tl-container input[type="button"][value="WYCZYŚĆ" i]:hover,
.stable + .second-cont.tl-container + .tl-container button[type="button"][onclick*="clearChecked"]:hover {
    background: linear-gradient(
        180deg,
        var(--pe-btn-green-hover-1),
        var(--pe-btn-green-hover-2)
    ) !important;

    background-image: linear-gradient(
        180deg,
        var(--pe-btn-green-hover-1),
        var(--pe-btn-green-hover-2)
    ) !important;

    border-color: var(--pe-btn-green-hover-border) !important;
    color: #fff !important;
}

/* ROZMIARY PRZYCISKOW OK */

.stable input[type="submit"][value="OK"],
.stable button[type="submit"][value="OK"],
.stable input[type="submit"][value="Ok"],
.stable button[type="submit"][value="Ok"] {
    min-width: 44px !important;
    width: 44px !important;
    margin-left: 6px !important;
}

/* OK (0) I WYCZYSC */

.stable input[type="submit"][value="OK (0)"],
.stable button[type="submit"][value="OK (0)"],
.stable input[type="submit"][value="WYCZYŚĆ"],
.stable button[type="submit"][value="WYCZYŚĆ"],

.stable + .second-cont.tl-container + .tl-container input[type="button"][onclick*="clearChecked"],
.stable + .second-cont.tl-container + .tl-container input[type="button"][value="WYCZYŚĆ" i] {
    min-width: 64px !important;
}

/* 7. Inne kontrolki */

.stable form,
.stable .tfoot,
.stable .tcat,
.stable .thead,
.stable .inline_row,
.stable .inline_row input,
.stable .inline_check {
    box-sizing: border-box;
}

/* 8. RESPONSYWNOSC - TABLETY */

@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"]),
    .stable + .second-cont.tl-container + .tl-container form:has(select[name="action"]) {
        width: 100%;
        justify-content: flex-start;
    }
}

/* 9. TELEFONY */

@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% !important;
    }
}

/* 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,
    .stable + .second-cont.tl-container + .tl-container button,
    .stable input[type="submit"],
    .stable button[type="submit"] {
        transition: none !important;
    }
}