ul.thread_tools,
ul.thread_tools li {
	list-style: none;
	padding: 0;
	margin: 0;
}

ul.thread_tools li {
	padding-left: 24px;
	padding-bottom: 4px;
	margin-bottom: 3px;
	font-size: 11px;
	background-image: url(../../../images/showthread_sprite.png);
	background-repeat: no-repeat;
}

ul.thread_tools li.printable {
	background-position: 0 0;
}

ul.thread_tools li.sendthread {
	background-position: 0 -20px;
}

ul.thread_tools li.subscription_add {
	background-position: 0 -40px;
}

ul.thread_tools li.subscription_remove {
	background-position: 0 -60px;
}

ul.thread_tools li.poll {
	background-position: 0 -80px;
}

.showthread_spinner {
	width: 100%;
	margin: 0 auto;
	display: block;
	text-align: center;
	padding: 20px;
}

/* =========================================================
   V3.18 — SHOWTHREAD TOOL LINKS
   Font Awesome icons + compact Locked & Loaded legend styling.
   Scoped only to the thread-tools list at the bottom of threads.
   ========================================================= */

ul.thread_tools {
    display:grid !important;
    grid-template-columns:repeat(2, minmax(190px, 1fr)) !important;
    gap:6px 8px !important;

    width:min(100%, 460px) !important;

    margin:10px 0 14px !important;
    padding:9px !important;

    box-sizing:border-box !important;

    background:#14191b !important;
    border:1px solid #394144 !important;
    border-radius:6px !important;
}

ul.thread_tools li {
    position:relative !important;

    display:flex !important;
    align-items:center !important;

    min-height:34px !important;

    margin:0 !important;
    padding:0 9px 0 38px !important;

    box-sizing:border-box !important;

    background:#171c1e !important;
    background-image:none !important;

    border:1px solid #30383b !important;
    border-radius:5px !important;

    font-size:11px !important;
    line-height:1.25 !important;

    transition:
        background .16s ease,
        border-color .16s ease,
        transform .16s ease,
        box-shadow .16s ease !important;
}

ul.thread_tools li::before {
    content:"\f0c9";

    position:absolute !important;
    left:7px !important;
    top:50% !important;
    transform:translateY(-50%) !important;

    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;

    width:24px !important;
    height:24px !important;

    border:1px solid #647f9e !important;
    border-radius:50% !important;

    background:#111617 !important;

    color:#9fc2e6 !important;

    font-family:"Font Awesome 6 Free",
                "Font Awesome 5 Free",
                "FontAwesome" !important;
    font-size:11px !important;
    font-style:normal !important;
    font-weight:900 !important;
    line-height:1 !important;

    box-shadow:
        0 0 5px rgba(100,127,158,.16),
        inset 0 0 0 2px rgba(100,127,158,.035) !important;

    pointer-events:none !important;
}

ul.thread_tools li a {
    display:block !important;
    width:100% !important;

    color:#d7dcda !important;

    font-weight:600 !important;
    text-decoration:none !important;
}

ul.thread_tools li:hover {
    background:#202629 !important;
    border-color:#596367 !important;

    transform:translateY(-1px) !important;

    box-shadow:0 4px 10px rgba(0,0,0,.16) !important;
}

ul.thread_tools li:hover a {
    color:#fff !important;
}

/* Printable */
ul.thread_tools li.printable::before {
    content:"\f02f" !important;
}

/* Send to a friend */
ul.thread_tools li.sendthread::before {
    content:"\f1d8" !important;
}

/* Subscribe / Unsubscribe — coordinates with User CP subscriptions icon */
ul.thread_tools li.subscription_add::before,
ul.thread_tools li.subscription_remove::before {
    content:"\f02e" !important;
}

ul.thread_tools li.subscription_add::before {
    color:#9fcf8a !important;
    border-color:#66885b !important;
}

ul.thread_tools li.subscription_remove::before {
    color:#dc8c90 !important;
    border-color:#8b4b50 !important;
}

/* Favorite Threads plugin */
ul.thread_tools li:has(a[href*="favorite"])::before,
ul.thread_tools li:has(a[href*="favorites"])::before {
    content:"\f005" !important;

    color:#d8c27f !important;
    border-color:#8e7b4e !important;

    box-shadow:
        0 0 5px rgba(216,194,127,.14),
        inset 0 0 0 2px rgba(216,194,127,.03) !important;
}

/* Add Poll */
ul.thread_tools li.poll::before {
    content:"\f080" !important;

    color:#c6b07f !important;
    border-color:#7f704d !important;
}

/* Light theme */
html[data-ar-theme="light"] ul.thread_tools {
    background:#f2f0e9 !important;
    border-color:#bbb9b0 !important;
}

html[data-ar-theme="light"] ul.thread_tools li {
    background:#faf9f5 !important;
    border-color:#d2d0c8 !important;
}

html[data-ar-theme="light"] ul.thread_tools li a {
    color:#303637 !important;
}

html[data-ar-theme="light"] ul.thread_tools li:hover {
    background:#e7e4da !important;
    border-color:#a9aaa4 !important;
}

html[data-ar-theme="light"] ul.thread_tools li:hover a {
    color:#1d2223 !important;
}

html[data-ar-theme="light"] ul.thread_tools li::before {
    background:#f4f2ec !important;
}

/* Mobile */
@media screen and (max-width:760px) {
    ul.thread_tools {
        grid-template-columns:1fr !important;

        width:100% !important;

        gap:6px !important;

        margin:8px 0 12px !important;
        padding:8px !important;
    }

    ul.thread_tools li {
        width:100% !important;
        min-height:36px !important;
    }
}


/* =========================================================
   V3.19 — FIVE-LINK THREAD TOOLS COMPACT LAYOUT
   Keeps the left tool panel no taller than the moderation
   controls on the right. When Favorite Threads is present:
   2 columns / 2 rows + full-width Add Poll final row.
   ========================================================= */

ul.thread_tools {
    gap:5px 7px !important;
    padding:7px !important;
    margin:8px 0 10px !important;
}

ul.thread_tools li {
    min-height:30px !important;
    padding:0 8px 0 36px !important;
}

ul.thread_tools li::before {
    width:22px !important;
    height:22px !important;
    left:7px !important;
    font-size:10px !important;
}

/* With Favorite Threads restored, Add Poll becomes item #5.
   Let that final row span both columns without increasing
   the overall panel beyond the 3-row moderation stack. */
ul.thread_tools li:nth-child(5) {
    grid-column:1 / -1 !important;
}

/* Keep the full-width final row visually balanced. */
ul.thread_tools li:nth-child(5) a {
    text-align:center !important;
}

/* Preserve icon position when the final row is centered. */
ul.thread_tools li:nth-child(5)::before {
    left:10px !important;
}

/* Mobile remains one clean column. */
@media screen and (max-width:760px) {
    ul.thread_tools {
        gap:5px !important;
        padding:7px !important;
    }

    ul.thread_tools li,
    ul.thread_tools li:nth-child(5) {
        grid-column:auto !important;
        min-height:34px !important;
    }

    ul.thread_tools li:nth-child(5) a {
        text-align:left !important;
    }
}
