/* ========================================
   PAGE LAYOUT - SIDEBAR OUTSIDE BOX
======================================== */

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotate-border {
    0% {
        --angle: 0deg;
    }

    100% {
        --angle: 360deg;
    }
}

body.boxed {
    background-color: #0d0d0d;
    padding: 0 !important;
    margin: 0;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* html {
    overflow-x: hidden;
    width: 100%;
} */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Page wrapper - Flex layout: content + sidebar */
.page-wrapper {
    display: flex;
    width: 100%;
    max-width: 100%;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Main boxed container - flexible width, fills remaining space */
.boxed-container {
    flex: 1;
    min-width: 0;
    background-color: #1a1b1b;
    border-right: 1px solid #302E2E;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Header with full image display */
/* Header styling moved to styles.css for global availability */

/* Main content area */
#primary.site-main {
    padding: 20px 30px 40px 30px;
    background-color: #1a1b1b;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ========================================
   POE CATALOGUE - ITEM DISPLAY
   ======================================== */

/* 2-column layout for items */
.poe-catalogue {
    display: flex;
    flex-wrap: wrap;
    font-size: 17px;
    color: #8787fe;
    line-height: 1.4;
}

.poe-catalogue .row {
    display: flex;
    width: 33.333%;
    margin-right: 0;
    margin-left: 0;
    padding: 3px;
    box-sizing: border-box;
}

/* Row content - item card */
.poe-catalogue .row-content {
    width: 100%;
    border: 1px solid rgba(43, 51, 60, 0.8);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    display: flex;
    text-align: center;
    box-sizing: border-box;
    background-color: #151519;
    background-image: linear-gradient(135deg,
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0) 50%,
            rgba(40, 70, 120, 0.02) 100%);
    box-shadow:
        0 0 3px rgba(40, 70, 120, 0.38),
        0 0 5px rgba(0, 0, 0, 0.45);
}

/* Alternating row backgrounds - 3 per row */
/* Row 2 (4,5,6), Row 4 (10,11,12)... repeats every 6 */
.poe-catalogue .row:nth-child(6n+4) .row-content,
.poe-catalogue .row:nth-child(6n+5) .row-content,
.poe-catalogue .row:nth-child(6n) .row-content {
    background-color: #111114;
    background-image: linear-gradient(135deg,
            rgba(255, 255, 255, 0.02) 0%,
            rgba(255, 255, 255, 0) 50%,
            rgba(40, 70, 120, 0.01) 100%);
}

/* Hover effect with embers */
.poe-catalogue .row-content:hover {
    box-shadow:
        0 0 5px rgba(255, 69, 0, 0.4),
        0 0 10px rgba(255, 69, 0, 0.3),
        0 0 15px rgba(255, 69, 0, 0.2) !important;
    border: 1px solid orange;
    z-index: 1;
    background: #393939 !important;
}

.poe-catalogue .row-content:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://i.ibb.co/20LYSncc/embers.gif');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: bottom;
    filter: brightness(60%);
    z-index: -1;
}

.poe-catalogue .row-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    border-radius: 5px;
}

/* Left side (icon) */
.poe-catalogue .row-content>.left {
    width: 20%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 6px 0px 6px;
}

.poe-catalogue .row-content .left img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid rgba(51, 51, 51, 0.4);
    background-color: rgba(19, 19, 19, 0.5);
    background-size: cover;
}

/* Right side (details) */
.poe-catalogue .row-content>.right {
    width: 79%;
    display: inline-block;
    padding: 10px 4px 20px 10px;
    border-left: 1px dashed #333;
    text-align: center;
    line-height: 1.2;
    position: relative;
    z-index: 1 !important;
}

/* Vertical buffer to prevent text from overlapping the absolutely positioned whisper box at the bottom */
/* Dynamic buffer: 170px at 2560px (1440p), scales up to 220px at 1600px viewport */
.poe-catalogue .row-content>.right::after {
    content: "";
    display: block;
    /* clamp(min, preferred, max) - scales linearly between 1600px and 2560px viewport */
    height: clamp(150px, calc(260px - 4.3vw), 205px);
    width: 100%;
    pointer-events: none;
}

/* Elder backgrounds */
.poe-catalogue .row-content .left img.elder11 {
    background-image: url(https://www.pathofexile.com/image/inventory/ElderBackground.png?w=1&h=1);
}

.poe-catalogue .row-content .left img.elder13 {
    background-image: url(https://www.pathofexile.com/image/inventory/ElderBackground.png?w=1&h=3);
}

.poe-catalogue .row-content .left img.elder21 {
    background-image: url(https://www.pathofexile.com/image/inventory/ElderBackground.png?w=2&h=1);
}

.poe-catalogue .row-content .left img.elder22 {
    background-image: url(https://www.pathofexile.com/image/inventory/ElderBackground.png?w=2&h=2);
}

.poe-catalogue .row-content .left img.elder23 {
    background-image: url(https://www.pathofexile.com/image/inventory/ElderBackground.png?w=2&h=3);
}

.poe-catalogue .row-content .left img.elder24 {
    background-image: url(https://www.pathofexile.com/image/inventory/ElderBackground.png?w=2&h=4);
}

/* Shaper backgrounds */
.poe-catalogue .row-content .left img.shaper11 {
    background-image: url(https://www.pathofexile.com/image/inventory/ShaperBackground.png?w=1&h=1&x=551&y=782);
}

.poe-catalogue .row-content .left img.shaper13 {
    background-image: url(https://www.pathofexile.com/image/inventory/ShaperBackground.png?w=1&h=3&x=169&y=132);
}

.poe-catalogue .row-content .left img.shaper21 {
    background-image: url(https://www.pathofexile.com/image/inventory/ShaperBackground.png?w=2&h=1&x=216&y=25);
}

.poe-catalogue .row-content .left img.shaper22 {
    background-image: url(https://www.pathofexile.com/image/inventory/ShaperBackground.png?w=2&h=2&x=216&y=427);
}

.poe-catalogue .row-content .left img.shaper23 {
    background-image: url(https://www.pathofexile.com/image/inventory/ShaperBackground.png?w=2&h=3&x=321&y=25);
}

.poe-catalogue .row-content .left img.shaper24 {
    background-image: url(https://www.pathofexile.com/image/inventory/ShaperBackground.png?w=2&h=4&x=64&y=226);
}

/* Item name header */
div.itemName2 {
    background:
        url('https://web.poecdn.com/protected/image/item/popup/header-double-rare-left.png?v=1739989653429&key=7fOI1NQk5oFidrmivWNAqw') top left no-repeat,
        url('https://web.poecdn.com/protected/image/item/popup/header-double-rare-right.png?v=1739989653429&key=0DQ30sqHO9eanQuL1NTpNQ') top right no-repeat,
        url('https://web.poecdn.com/protected/image/item/popup/header-double-rare-middle.png?v=1739989653429&key=Hzon14Iy53cgwlmBET_yqw') top center repeat-x;
    text-align: center;
    height: 56px;
    background-size: auto 100%;
    padding-top: 5px;
    margin-bottom: 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.itemName2 span {
    display: block;
    line-height: 1.3;
}

.poe-catalogue .itemName2 {
    color: #ffff77;
    font-size: 19px;
    padding: 3px;
}

/* Reset transform for PoE 2 English and Chinese pages to fix item name position */
html[lang="en"] .poe2-page .itemName2 span,
html[lang="zh"] .poe2-page .itemName2 span {
    transform: translateY(-1px) !important;
}

/* Influence icons in header */
.influence-icon {
    width: 27px;
    height: 27px;
    vertical-align: middle;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.influence-icon.left {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.influence-icon.right {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

/* Item text colors and mods */
.colorWhite {
    color: #FFFFFF !important;
}

.coloraugmented {
    color: #8787fe;
}

.lc {
    max-width: 95%;
    word-wrap: break-word;
    margin: 3px auto;
    color: #7f7f7f;
    font-size: 17px;
    text-align: center;
}

div.lc img {
    vertical-align: middle;
    margin-right: 2px;
}

.explicitMod,
.implicitMod {
    color: #8787fe;
    margin: 3px auto;
    max-width: 95%;
    word-wrap: break-word;
}

.enchantMod {
    color: #b4b4ff;
    margin: 1px auto;
    max-width: 95%;
    word-wrap: break-word;
}

.craftedMod {
    color: #b4b4ff;
    max-width: 95%;
    word-wrap: break-word;
    margin: 3px auto;
    font-size: 17px;
}

.crucibleMod {
    color: #e76424;
    margin: 3px auto;
    max-width: 95%;
    word-wrap: break-word;
}

.fracturedMod {
    color: #a29162;
    margin: 3px auto;
    max-width: 95%;
    word-wrap: break-word;
}

/* Property wrappers - match .lc spacing */
[class^="type"] {
    max-width: 95%;
    word-wrap: break-word;
    margin: 3px auto;
    font-size: 17px;
    color: #7f7f7f;
}

/* Property values should be blue like explicit mods */
[class^="type"] span:not(.lc) {
    color: #8787fe;
}

/* Separator line */
div.separator {
    margin: 2px auto;
    border: none;
    height: 2px;
    width: 80%;
    max-width: 300px;
    background: linear-gradient(to right, transparent 0%, #cb9645 50%, transparent 100%);
}

/* Socket icons */
.lc .socket-icon {
    display: inline-block;
    margin-right: 0px;
    height: 20px;
    width: 20px;
    vertical-align: middle;
}

.lc .link-icon {
    display: inline-block;
    margin: 0;
    height: 16px;
    /* width: 8px; */
    vertical-align: middle;
}

/* ========================================
   WHISPER SECTION - EXACT WORDPRESS MATCH
======================================== */

/* Hidden inputs */
input.whisper,
textarea.pobtext {
    position: fixed !important;
    top: -100px !important;
    left: -100px !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    opacity: 0.01 !important;
    pointer-events: none !important;
}

/* Whisper container */
div.whisper {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 4px;
    padding: 12px 8px;
    border: 1px solid #3333336b;
    background-color: rgba(19, 19, 19, 0.5);
    border-radius: 8px;
    text-align: center;
}

/* Fee text styling */
.textCurrency {
    color: #AA9E82;
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
}

/* Fee label */
.fee-label {
    font-size: 18px;
    color: #c49c50;
    font-weight: normal;
    font-family: 'Fontin SmallCaps', sans-serif;
    text-transform: none;
    letter-spacing: 0.5px;
}

/* Divine styling */
.divine-number {
    font-size: 18px;
    color: #c49c50;
    margin-right: 0px;
    font-weight: 500;
}


.divine-x {
    color: #c49c50;
    font-size: 12px;
    margin: 0 1px;
}

.divine-icon {
    width: 24px !important;
    height: 24px !important;
    vertical-align: middle;
    background: transparent !important;
    border: none !important;
    margin: 0 1px !important;
    padding: 0 !important;
}

/* Mirror styling */
.mirror-number {
    font-size: 12px;
    color: #AA9E82;
    margin-right: 0px;
}

.mirror-x {
    color: #AA9E82;
    font-size: 10px;
    margin: 0 1px;
}

.mirror-icon {
    width: 20px !important;
    height: 20px !important;
    vertical-align: middle;
    background: transparent !important;
    border: none !important;
    margin: 0 1px !important;
    padding: 0 !important;
}

/* Fee text parts */
.fee-and-text {
    color: #AA9E82;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fee-plus {
    color: #c49c50;
    font-size: 16px;
    margin: 0 4px;
}

/* Ownership info */
.ownership-info {
    cursor: help;
    background: rgba(212, 175, 55, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
    color: #a29162;
    position: relative;
    font-size: 14px;
    display: inline-block;
    margin: 6px 0;
}

.ownership-info::after {
    content: attr(data-owners);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: #d4af37;
    padding: 10px 14px;
    border-radius: 4px;
    white-space: pre-wrap;
    max-width: 350px;
    width: max-content;
    min-width: 100px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 8px;
    z-index: 1000;
    font-size: 14px;
    text-align: center;
    border: 1px solid #444;
}

.ownership-info:hover::after {
    opacity: 1;
}

/* Warning note */
.item-note {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c49c50;
    font-size: 14px;
    margin: 8px 0 4px 0;
    gap: 4px;
}

.warning-icon {
    width: 18px;
    height: 18px;
}

.item-buttons-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    margin-top: 10px;
}

/* Buttons */
button.item-whisper {
    background-color: transparent;
    color: #c49c50;
    font-size: 15px;
    font-family: 'Fontin SmallCaps', sans-serif;
    border-radius: 5px;
    margin: 3px;
    padding: 6px 12px;
    border: 1px solid rgba(196, 156, 80, 0.5);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

button.item-whisper:hover {
    background-color: rgba(196, 156, 80, 0.1);
    border-color: #c49c50;
    color: #d4af37;
}

button.item-whisper:focus {
    outline: none;
}

button.item-add-calc {
    min-width: 34px;
    padding: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button.item-add-calc .whisper-tooltip {
    width: max-content !important;
    white-space: nowrap;
    left: auto;
    right: 0;
    transform: none;
    padding: 8px 12px;
}

button.item-add-calc .whisper-tooltip .tooltip-message {
    margin-bottom: 0;
}

/* Request Service Tooltip - JS-based for multi-color support */
button.item-whisper[onclick*="whisper"],
button.item-whisper[onclick*="pobtext"] {
    position: relative;
}

.whisper-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 1000;
    background: linear-gradient(135deg, #1a1a28 0%, #0d1120 100%);
    border: 1px solid #4a5568;
    border-radius: 5px;
    padding: 12px 16px;
    font-size: 13px;
    color: #a8b5d1;
    width: 290px;
    text-align: center;
    line-height: 1.5;
}

.whisper-tooltip .tooltip-message {
    margin-bottom: 10px;
}

.whisper-tooltip .tooltip-cost {
    color: #ff4444;
    font-weight: bold;
    font-size: 14px;
    border-top: 1px solid #4a5568;
    padding-top: 8px;
    margin-top: 8px;
}

button.item-whisper[onclick*="whisper"]:hover .whisper-tooltip,
button.item-whisper[onclick*="pobtext"]:hover .whisper-tooltip,
button.item-add-calc:hover .whisper-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Button icons */
.btn-icon {
    width: 16px;
    height: 16px;
}

/* View Builds button */
.view-builds-btn {
    border-color: rgba(107, 142, 165, 0.5) !important;
    color: #8bb8d0 !important;
}

.view-builds-btn:hover {
    background-color: rgba(107, 142, 165, 0.15) !important;
    border-color: #8bb8d0 !important;
    color: #a8d4ec !important;
}

/* ========================================
   DISCOVER BUILDS POPUP
======================================== */
.discover-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: discoverFadeIn 0.2s ease;
}

@keyframes discoverFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.discover-popup {
    background: rgba(10, 8, 5, 0.98);
    border: 1px solid #ff8c00;
    border-radius: 8px;
    width: 90%;
    max-width: 560px;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.discover-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 2px solid;
    border-image: linear-gradient(to right, transparent, #cb9645, transparent) 1;
    border-radius: 8px 8px 0 0;
}

.discover-popup-title {
    color: #d4af37;
    font-family: 'Fontin SmallCaps', sans-serif;
    font-size: 17px;
    letter-spacing: 0.5px;
    font-weight: bold;
}

.discover-popup-close {
    background: none;
    border: 1px solid #444;
    color: #888;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.discover-popup-close:hover {
    color: #ff4444;
    border-color: #ff4444;
}

.discover-popup-count {
    color: #8B8B8B;
    font-size: 12px;
    padding: 6px 18px;
    border-bottom: 2px solid;
    border-image: linear-gradient(to right, transparent, #cb9645, transparent) 1;
}

.discover-popup-disclaimer {
    color: #888;
    font-size: 9px;
    padding: 6px 18px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(139, 105, 20, 0.2);
    line-height: 1.4;
    text-align: center;
}

.discover-popup-body {
    overflow-y: auto;
    padding: 8px 0;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #8B6914 rgba(10, 8, 5, 0.5);
}

.discover-popup-body::-webkit-scrollbar {
    width: 8px;
}

.discover-popup-body::-webkit-scrollbar-track {
    background: rgba(10, 8, 5, 0.5);
}

.discover-popup-body::-webkit-scrollbar-thumb {
    background: #8B6914;
    border-radius: 4px;
}

.discover-build-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Default for mobile */
    padding: 12px 18px;
    border-bottom: 1px solid rgba(139, 105, 20, 0.2);
    transition: background 0.15s;
    position: relative;
}

.discover-build-entry:hover {
    background: rgba(196, 156, 80, 0.1);
}

.discover-build-entry:last-child {
    border-bottom: none;
}

.discover-build-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
    text-align: center;
}

.discover-build-char {
    color: #c5c5c5;
    font-size: 14px;
    white-space: normal;
    word-break: break-word;
}

.discover-build-details {
    color: #ffffff;
    font-size: 13px;
    font-weight: normal;
    margin-top: -2px;
}

.discover-build-actions {
    display: flex;
    flex-direction: row;
    gap: 5px;
    flex-shrink: 0;
    margin-left: 12px;
    align-items: center;
}

.discover-build-actions .discover-tft-toggle {
    margin-top: 0;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.4;
}

/* Lower row: expand arrow + View Build button */
.discover-build-lower-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Info badge button */
.build-info-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.build-info-btn {
    background: rgba(30, 60, 90, 0.25);
    border: 1px solid rgba(90, 156, 197, 0.35);
    color: #7ab8e0;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    line-height: 18px;
    text-align: center;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.build-info-btn:hover {
    background: rgba(40, 80, 120, 0.4);
    border-color: #4a8ab5;
}

/* Golden (i) button for featured builds */
.featured-info-btn {
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: rgba(212, 175, 55, 0.45) !important;
    color: #d4af37 !important;
}

.featured-info-btn:hover {
    background: rgba(212, 175, 55, 0.25) !important;
    border-color: #d4af37 !important;
}

/* Enlarged for Korean readability */
:lang(ko) .build-info-btn {
    font-size: 14px;
    line-height: 21px;
}

.build-info-box {
    display: none;
    position: absolute;
    right: calc(100% + 8px);
    top: -10px;
    transform: none;
    background: #1a1e2e !important;
    border: 1px solid rgba(90, 156, 197, 0.4);
    border-radius: 6px;
    padding: 5px 10px;
    width: max-content !important;
    min-width: 180px;
    max-width: 500px;
    white-space: normal;
    word-break: normal;
    height: auto !important;
    z-index: 9999;
    font-size: 13px;
    color: #c5c5c5;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.5;
    overflow: visible !important;
    text-align: left;
    opacity: 1 !important;
}

/* Fix mobile/tablet overflow */
/* Golden (i) tooltip for featured builds */
.featured-info-box {
    background: #342a10 !important;
    border-color: #7d6621 !important;
    color: #d4af37 !important;
}

.featured-info-box div {
    color: #d4af37 !important;
}

.build-info-wrapper:hover .build-info-box,
.build-info-box.show {
    display: block !important;
}

/* Fix mobile/tablet: Strictly hide inline tooltips regardless of hover/show class */
@media (max-width: 1024px) {

    .build-info-wrapper:hover .build-info-box,
    .build-info-box.show,
    .build-info-box {
        display: none !important;
    }
}

/* Prevent bottom-most tooltip from overflowing */
.discover-build-entry:last-child .build-info-box,
.discover-build-variant:last-child .build-info-box {
    top: auto !important;
    bottom: 20px !important;
}

/* Mobile: (i) button absolutely positioned at top-right of each build entry */
.discover-build-entry>.build-info-wrapper {
    position: absolute;
    top: 12px;
    /* entry padding-top — aligns with first line start */
    right: 18px;
    /* entry padding-right */
    z-index: 2;
}

/* Desktop Refinements: 1025px+ */
@media (min-width: 1025px) {

    /* (i) button centered on single line */
    .discover-build-entry>.build-info-wrapper {
        top: 17px;
    }

    /* Pull actions out of flow so text can fill width */
    .discover-build-entry {
        align-items: stretch;
    }

    .discover-build-info {
        text-align: left;
        padding-right: 45px;
        /* Reserve space for (i) */
    }

    .discover-build-details {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }

    .discover-build-actions {
        position: absolute;
        right: 18px;
        bottom: 12px;
        height: 32px;
        flex-direction: row;
        align-items: center;
        margin-left: 0;
    }
}

/* Give build-info right padding so text doesn't slide under (i) */
.discover-build-entry>.discover-build-info {
    padding-right: 28px;
}

/* Build info modal overlay (mobile) */
.build-info-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 300000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.build-info-modal {
    background: #0a0a0a;
    background-image: linear-gradient(135deg, rgba(67, 6, 11, 0.2) 0%, rgba(0, 0, 0, 0) 60%);
    border: 2px solid #d4af37;
    outline: none;
    border-radius: 8px;
    padding: 24px 16px 16px;
    min-width: 280px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
}

.build-info-modal-close {
    position: absolute;
    top: 6px;
    right: 6px;
    background: none;
    border: none;
    color: #d4af37;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.build-info-modal-close:hover {
    opacity: 1;
    background: rgba(212, 175, 55, 0.1);
}

.build-info-modal-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    color: #eae5de;
    font-size: 14px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.build-info-modal-row:last-child {
    border-bottom: none;
}

/* When actions (Notes/Showcase) follow the last row, only one separator should show.
   The row already provides its border-bottom, so suppress the redundant border-top here. */
.bib-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

/* Notes + 1 showcase only: use 2 equal columns so both sit on the same line */
.bib-actions:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.build-info-modal .bib-actions {
    border-top: none;
}

/* Blue theme for non-featured build info modal (matches desktop inline tooltip) */
.build-info-modal-blue {
    background: #1a1e2e;
    background-image: none;
    border-color: rgba(90, 156, 197, 0.5);
}

.build-info-modal-blue .build-info-modal-row {
    color: #c5c5c5;
    border-bottom-color: rgba(90, 156, 197, 0.2);
}

.build-info-modal-blue .bim-label {
    color: #7ab8e0;
}

.build-info-modal-blue .build-info-modal-close {
    color: #7ab8e0;
}

.build-info-modal-blue .build-info-modal-close:hover {
    background: rgba(90, 156, 197, 0.1);
}

/* Uniform, slightly larger action-button icons inside the modal */
.build-info-modal .bib-action-btn {
    display: flex;
}

.build-info-modal .bib-action-btn svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
}

.bim-label {
    color: #d4af37;
    font-weight: bold;
    font-family: 'Fontin SmallCaps', sans-serif;
    white-space: nowrap;
    min-width: 85px;
}

.discover-btn {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Fontin SmallCaps', sans-serif;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

.discover-btn-pob {
    background: rgba(30, 60, 90, 0.3);
    color: #5a9cc5;
    border-color: #2a5a7a;
}

.discover-btn-pob:hover {
    background: rgba(40, 80, 120, 0.4);
    border-color: #4a8ab5;
    color: #7ab8e0;
}

.discover-btn-ninja {
    background: transparent;
    color: #c49c50;
    border-color: rgba(196, 156, 80, 0.4);
}

.discover-btn-ninja:hover {
    background: rgba(196, 156, 80, 0.1);
    border-color: #c49c50;
    color: #d4af37;
}

/* Expand Button */
.discover-btn-expand {
    background: rgba(139, 105, 20, 0.2);
    color: #ff8c00;
    border-color: rgba(139, 105, 20, 0.4);
    padding: 6px 12px;
    min-width: unset;
}

.discover-btn-expand:hover {
    background: rgba(196, 156, 80, 0.3);
    border-color: #cb9645;
    color: #ff8c00;
}

.discover-btn-expand .expand-arrow {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 12px;
}

.discover-btn-expand.expanded .expand-arrow {
    transform: rotate(180deg);
}

/* TFT Items Toggle */
.discover-tft-toggle {
    color: #d4af37;
    font-size: 11px;
    cursor: pointer;
    padding: 6px 8px;
    margin-top: 4px;
    user-select: none;
    transition: all 0.2s;
    background: rgba(139, 105, 20, 0.2);
    border-radius: 4px;
    display: block;
    width: fit-content;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
    border: 1px solid rgba(139, 105, 20, 0.4);
}

.discover-tft-toggle:hover {
    color: #ffffff;
    background: rgba(196, 156, 80, 0.3);
    border-color: #cb9645;
}

.discover-tft-toggle .toggle-arrow {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 9px;
    margin-right: 4px;
    color: #ff8c00;
}

.discover-tft-toggle.expanded {
    background: rgba(196, 156, 80, 0.3);
    color: #ffffff;
    border-color: #cb9645;
}

.discover-tft-toggle.expanded .toggle-arrow {
    transform: rotate(90deg);
}

.discover-tft-list {
    display: none;
    margin-top: 6px;
    padding-left: 12px;
    border-left: 2px solid #cb9645;
}

.discover-tft-list.show {
    display: block;
}

.discover-tft-item {
    color: #d4af37;
    font-size: 11px;
    padding: 3px 0;
    padding-left: 8px;
}

.discover-build-more {
    text-align: center;
    color: #555;
    font-size: 12px;
    padding: 10px;
    font-style: italic;
}

/* Build Info - align to left */
.discover-build-info {
    text-align: left;
}

/* Build Variants Container */
.discover-build-variants {
    display: none;
}

.discover-build-variants.show {
    display: block;
}

/* Featured Builds */
.discover-featured-section {
    padding-bottom: 4px;
    margin-bottom: 4px;
}

.discover-featured-label {
    font-size: 11px;
    color: #d4af37;
    padding: 4px 8px 2px;
    letter-spacing: 0.8px;
    opacity: 0.85;
}

.discover-featured-entry {
    background: rgba(212, 175, 55, 0.07) !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.18) !important;
}

.discover-featured-entry:hover {
    background: rgba(212, 175, 55, 0.14) !important;
}

.discover-featured-btn {
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: rgba(212, 175, 55, 0.45) !important;
    color: #d4af37 !important;
}

.discover-featured-btn:hover {
    background: rgba(212, 175, 55, 0.25) !important;
    border-color: #d4af37 !important;
    color: #f0d060 !important;
}

/* Filter Menus */
.discover-popup-filters {
    padding: 6px 12px;
    border-bottom: 2px solid;
    border-image: linear-gradient(to right, transparent, #cb9645, transparent) 1;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.discover-popup-filter-label {
    color: #8B8B8B;
    font-size: 11px;
    white-space: nowrap;
}

.discover-popup-filter-dropdown {
    position: relative;
    flex: 1;
}

.discover-popup-filter-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    background: rgba(139, 105, 20, 0.15);
    border: 1px solid rgba(139, 105, 20, 0.4);
    color: #d4af37;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-family: inherit;
    width: 100%;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    transition: background 0.15s, border-color 0.15s;
}

.discover-popup-filter-trigger:hover,
.discover-popup-filter-trigger.open {
    background: rgba(196, 156, 80, 0.25);
    border-color: #cb9645;
}

.discover-popup-filter-trigger .filter-arrow {
    font-size: 9px;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.discover-popup-filter-trigger.open .filter-arrow {
    transform: rotate(180deg);
}

.discover-popup-filter-list {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: rgba(15, 12, 8, 0.98);
    border: 1px solid #cb9645;
    border-radius: 3px;
    z-index: 9999;
    max-height: 180px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8B6914 rgba(10, 8, 5, 0.5);
}

.discover-popup-filter-list.open {
    display: block;
}

.discover-popup-filter-list::-webkit-scrollbar {
    width: 6px;
}

.discover-popup-filter-list::-webkit-scrollbar-track {
    background: rgba(10, 8, 5, 0.5);
}

.discover-popup-filter-list::-webkit-scrollbar-thumb {
    background: #8B6914;
    border-radius: 3px;
}

.discover-popup-filter-option {
    padding: 5px 10px;
    font-size: 11px;
    color: #8B8B8B;
    cursor: pointer;
    white-space: normal;
    word-break: break-word;
    transition: background 0.1s, color 0.1s;
}

.discover-popup-filter-option:hover {
    background: rgba(196, 156, 80, 0.2);
    color: #d4af37;
}

.discover-popup-filter-option.active {
    color: #d4af37;
    font-weight: bold;
    background: rgba(196, 156, 80, 0.15);
}

.discover-popup-filter-option .filter-option-count {
    color: #666666;
    font-weight: normal;
}

/* Pagination */
.discover-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 18px;
    border-top: 2px solid;
    border-image: linear-gradient(to right, transparent, #cb9645, transparent) 1;
}

.discover-page-btn {
    background: rgba(139, 105, 20, 0.2);
    border: 1px solid #cb9645;
    color: #d4af37;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: normal;
}

.discover-page-btn:hover:not(:disabled) {
    border-color: #d4af37;
    color: #ffffff;
    background: rgba(203, 150, 69, 0.3);
}

.discover-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.discover-page-info {
    color: #8B8B8B;
    font-size: 12px;
}

#discover-current-page {
    color: #d4af37;
    font-weight: bold;
}

/* Discover Builds Popup - Mobile */
@media (max-width: 480px) {
    .discover-build-entry {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 14px;
    }

    /* Re-align (i) button with first line of build name for smaller padding */
    .discover-build-entry>.build-info-wrapper {
        top: 8px;
        right: 14px;
    }

    .discover-build-info {
        width: 100%;
        flex: none;
    }

    .discover-build-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
        align-items: center;
    }

    .discover-build-actions .discover-tft-toggle {
        margin-right: auto;
        margin-top: 0;
        padding: 3px 8px;
        font-size: 11px;
        line-height: 1.4;
    }

    .discover-build-entry>.discover-tft-list {
        width: 100%;
    }

    .discover-btn {
        padding: 3px 8px;
        font-size: 11px;
    }

    .discover-btn-expand {
        padding: 3px 8px;
    }

    .discover-btn-expand .expand-arrow {
        font-size: 10px;
    }

    .discover-popup-title {
        font-size: 14px;
    }

    .discover-popup-count {
        font-size: 11px;
        padding: 5px 14px;
    }

    .discover-build-char {
        font-size: 13px;
    }

    .discover-build-details {
        font-size: 12px;
    }
}

/* ========================================
   FILTERS SECTION
======================================== */

.filters {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    margin-bottom: 30px;
    column-gap: 20px;
    row-gap: 0;
}

.search-fields-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    column-gap: 20px !important;
    margin: 10px 0 0 0 !important;
}

.search-fields-row .filter-group {
    flex: 1 !important;
    min-width: calc(50% - 14px) !important;
    max-width: calc(50% - 0px) !important;
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 100%;
}

.filter-group:nth-child(2),
.filter-group:nth-child(3) {
    min-width: calc(50% - 10px);
    position: relative;
}

.filter-group>span {
    display: block;
    text-align: center;
    width: 100%;
    padding: 6px 0;
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #e0d0c5;
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(35, 10, 5, 0.6) 40%,
            rgba(35, 10, 5, 0.6) 60%,
            rgba(0, 0, 0, 0) 95%);
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(180, 70, 50, 0.2) 20%,
            rgba(180, 70, 50, 0.5) 50%,
            rgba(180, 70, 50, 0.2) 80%,
            rgba(0, 0, 0, 0) 90%) 1;
}

/* Name filter input */
input#name-filter {
    width: 100%;
    max-width: 500px;
    height: 40px;
    background-color: #0d0d0d !important;
    color: #c8c8c8;
    border: 1px solid #475673;
    padding: 6px 12px;
    font: 18px 'Fontin SmallCaps', sans-serif;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 5px;
    margin-left: auto;
    margin-right: auto;
}

input#name-filter:focus {
    outline: none;
    border-color: orange;
}

/* Search Input Wrapper */
.search-input-wrapper {
    position: relative;
    max-width: 500px;
    width: 100%;
    margin: 0 auto 2px auto;
    /* Tightened gap by 10px from 12px */
}

/* Mod suggestions input */
input#mod-suggestions-input {
    width: 100%;
    max-width: 500px;
    height: 40px;
    background-color: #0d0d0d !important;
    color: #c8c8c8;
    border: 1px solid #475673;
    padding: 6px 12px;
    font: 18px 'Fontin SmallCaps', sans-serif;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 0px;
    margin-left: 0;
    margin-right: 0;
}

input#mod-suggestions-input:focus {
    outline: none;
    border-color: #d4743c;
    box-shadow: 0 0 5px rgba(212, 116, 60, 0.5);
}

/* Mod suggestions dropdown */
.mod-suggestions {
    width: 100%;
    margin-bottom: 0px;
    border: 1.5px solid #d4743c;
    border-radius: 5px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 2000;
    background: #0d1120 !important;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    font-family: 'Fontin SmallCaps', sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
}


#mod-suggestions-list {
    background: #0d1120 !important;
    overflow-y: hidden;
    /* Scroll handled by .suggestions-list */
}

/* Custom Scrollbar for the inner list */
.suggestions-list::-webkit-scrollbar {
    width: 10px;
    background: #0a0a14;
}

.suggestions-list::-webkit-scrollbar-track {
    background: #0a0a14;
    border-left: 1px solid #222;
}

.suggestions-list::-webkit-scrollbar-thumb {
    background: #a36520;
    border: 1px solid #000;
    border-radius: 4px;
}

.suggestions-list::-webkit-scrollbar-thumb:hover {
    background: #c47b2b;
}

/* Scrollbar Buttons */
.suggestions-list::-webkit-scrollbar-button {
    display: block;
    height: 10px;
    background-color: #0a0a14;
    background-repeat: no-repeat;
    background-position: center;
}

.suggestions-list::-webkit-scrollbar-button:vertical:decrement {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 2L1 8h8z' fill='%23a36520'/%3E%3C/svg%3E");
}

.suggestions-list::-webkit-scrollbar-button:vertical:increment {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 8L1 2h8z' fill='%23a36520'/%3E%3C/svg%3E");
}

.suggestions-list {
    display: block !important;
    overflow-y: auto;
    max-height: 320px;
    flex: 1;
    scrollbar-color: #a36520 #0a0a14;
    scrollbar-width: thin;
    background: transparent;
}

.mod-suggestion-item {
    display: flex !important;
    padding: 8px 15px;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    color: #c9c9c9;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: transparent;
    transition: all 0.12s ease-in-out;
    word-wrap: break-word;
}

.mod-suggestion-item:last-child {
    border-bottom: none;
}

.mod-suggestion-item:hover,
#mod-suggestions-list .mod-suggestion-item.active {
    background: linear-gradient(to right, rgba(70, 39, 26, 0.5) 0%, rgba(70, 39, 26, 0.2) 70%, transparent 100%);
    color: #fff;
    padding-left: 20px;
}

/* Modifier text wrapping */
.mod-suggestion-item span:first-child {
    white-space: normal;
    word-break: break-word;
    letter-spacing: 0.5px;
    line-height: 1.4;
    flex: 1;
}

/* Tags within suggestions */
.mod-tag {
    font-size: 11px;
    padding: 0px 4px;
    border-radius: 2px;
    text-transform: uppercase;
    font-weight: 500;
    flex-shrink: 0;
    text-align: center;
    line-height: 1.4;
    color: #000;
}

.mod-tag.explicit {
    background: #ff8d6e;
}

.mod-tag.implicit {
    background: #fec455;
}

.mod-tag.enchant {
    background: #b4b4ff;
}

.mod-tag.crafted {
    background: #55bbff;
}

.mod-tag.fractured {
    background: #a29160;
}

.mod-tag.crucible {
    background: #c0521d;
}

.mod-tag.rune {
    background: #55bbff;
}

/* Dropdown tabs / toggles */
.mod-type-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #11141a;
    border-bottom: 2px solid #222 !important;
    padding: 8px !important;
    z-index: 10;
    flex: 0 0 auto;
}

.mod-type-toggles span,
.dropdown-tab {
    padding: 4px 10px !important;
    background-color: #1a1e26 !important;
    background-image: linear-gradient(to bottom, #242932 0%, #202631 100%, #161a21 100%) !important;
    border: 1px solid rgba(61, 68, 82, 0.5) !important;
    border-radius: 4px !important;
    color: #DDE5DE !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-family: 'Fontin SmallCaps', sans-serif !important;
    text-transform: lowercase !important;
    font-weight: normal !important;
    transition: all 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

.mod-type-toggles span:hover,
.dropdown-tab:hover {
    border-color: #FF4500 !important;
    color: #FF8C00 !important;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.7), rgba(180, 50, 30, 0.7)) !important;
}

.mod-type-toggles span.active,
.dropdown-tab.active {
    border-color: #FF4500 !important;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.8), rgba(200, 60, 40, 0.8)) !important;
    color: #FF8C00 !important;
    text-shadow: 0 0 6px rgba(255, 140, 0, 0.5) !important;
    box-shadow: 0 0 8px rgba(255, 69, 0, 0.4) !important;
}

/* ========================================
   SELECTED MOD FILTERS PACH
======================================== */

/* Consolidated Selected Filter Containers - Zero margin by default */
#selected-filters,
#selected-mod-container,
.selected-mod-container,
.selected-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    width: 100%;
    min-height: 0;
}

/* 7px vertical distance (17px - 10px) when select box is present */
#selected-filters:not(:empty),
#selected-mod-container:not(:empty),
.selected-mod-container:not(:empty),
.selected-filters:not(:empty) {
    margin-top: 3px;
    margin-bottom: 17px;
}

.selected-mod-tag {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.8), rgba(200, 60, 40, 0.8));
    border: 1px solid #FF4500;
    border-radius: 4px;
    padding: 6px 12px;
    /* Restored original padding */
    color: #ffecd1;
    font-family: 'Fontin SmallCaps', sans-serif;
    font-size: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    cursor: default;
    position: relative;
    /* For animated border */
}

.selected-mod-tag .mod-text {
    margin-right: 10px;
}

/* Specific colors for inner tags in selected filters - Matched to suggestions */
.selected-mod-tag .mod-type-tag {
    color: #000 !important;
    border: none !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    font-size: 11px !important;
    padding: 0px 4px !important;
    border-radius: 2px !important;
    margin-right: 8px !important;
    text-transform: uppercase !important;
}

.selected-mod-tag .mod-type-tag.explicit {
    background: #ff8d6e !important;
}

.selected-mod-tag .mod-type-tag.implicit {
    background: #fec455 !important;
}

.selected-mod-tag .mod-type-tag.enchant {
    background: #b4b4ff !important;
}

.selected-mod-tag .mod-type-tag.crafted {
    background: #55bbff !important;
}

.selected-mod-tag .mod-type-tag.fractured {
    background: #a29160 !important;
}

.selected-mod-tag .mod-type-tag.crucible {
    background: #c0521d !important;
}

.selected-mod-tag .mod-type-tag.rune {
    background: #55bbff !important;
}

.selected-mod-tag .remove-btn {
    font-size: 16px;
    color: #e59367;
    cursor: pointer;
    font-weight: bold;
    margin-left: 2px;
    line-height: 1;
}

.selected-mod-tag .remove-btn:hover {
    color: #fff;
}


/* Animated Border for Selected Mod Tags */
.selected-mod-tag::after {
    content: '';
    position: absolute;
    inset: 0px;
    border-radius: inherit;
    background: conic-gradient(from var(--angle),
            transparent 0deg,
            transparent 20deg,
            #ff6600 345deg,
            #ff8800 350deg,
            #ffaa00 355deg,
            #ff8800 357deg,
            #ff6600 360deg,
            transparent 360deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    padding: 2px;
    animation: rotate-border 1.5s linear infinite;
    pointer-events: none;
    z-index: 10;
}

/* ========================================
   CATEGORY TAGS - EXACT WORDPRESS MATCH
======================================== */

.base-type-category-tags {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 25px;
    max-width: 100%;
}

/* Match spacing between inputs and additional filters only when filters exist */
.additional-filters-section {
    margin-top: 0px;
}


.base-type-category-tag {
    min-height: 50px;
    height: 50px;
    padding: 8px 50px 8px 55px;
    font: 18px 'Fontin SmallCaps', Helvetica, Arial, sans-serif;
    color: #DDE5DE;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #1a1e26;
    background-image: linear-gradient(to bottom, #242932 0%, #202631 100%, #161a21 100%);
    border: 1px solid #4a5466;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 0 3px rgba(40, 70, 120, 0.18),
        0 0 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 8px 25px rgba(255, 255, 255, 0.03);
}


.base-type-category-tags>* img {
    position: absolute;
    left: 12px;
    max-width: 36px;
    max-height: 36px;
    width: 26px;
    height: 36px;
    scale: 110%;
    margin-bottom: 0px !important;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 5px;
    padding: 1px;
    background: #1a1b1b;
}

.base-type-category-tag .category-count {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #DDE5DE;
    opacity: 0.7;
}

.base-type-category-tag:hover {
    border-color: #FF4500;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.7), rgba(180, 50, 30, 0.7));
    color: #FF8C00;
    text-shadow: 0 0 6px rgba(255, 140, 0, 0.5);
}

.base-type-category-tag:hover .category-count {
    color: #FF8C00;
    opacity: 1;
}

.base-type-category-tag.active-orange {
    border-color: #FF4500;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.8), rgba(200, 60, 40, 0.8));
    color: #FF8C00;
    text-shadow: 0 0 6px rgba(255, 140, 0, 0.5);
    box-shadow: 0 0 8px rgba(255, 69, 0, 0.4);
}

.base-type-category-tag.active-orange .category-count {
    color: #FF8C00;
    opacity: 1;
}

.base-type-category-tag[data-category="all"] {
    color: #FFA500;
}

.base-type-category-tag[data-category="all"] .category-count {
    color: #FFA500;
}

/* Selected filters */


.selected-filters .filter {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.8), rgba(200, 60, 40, 0.8));
    border: 1px solid #FF4500;
    padding: 4px 8px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 16px;
    height: auto;
    width: auto;
    max-width: 900px;
    white-space: nowrap;
}

.selected-filters .filter .filter-text {
    display: inline-block;
    max-width: 730px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-filters .filter span {
    margin-left: 3px;
}

.selected-filters .filter .remove {
    margin-left: 5px;
    color: #ff8d6e;
    font-weight: bold;
    font-size: 26px;
    line-height: 1;
    margin-bottom: 3px;
}

/* Additional filters */
.additional-filters .stat-input {
    width: 70px;
    padding: 4px 8px;
    background: #0d0d0d;
    border: 1px solid #444;
    color: #dde5de;
    transition: border-color 0.2s, color 0.2s;
    font-family: 'Fontin SmallCaps', sans-serif;
    border-radius: 3px;
}

.additional-filters .stat-input:focus {
    outline: none;
    border-color: #c49c50;
    color: #c49c50;
}

.additional-filters .stat-input::placeholder {
    color: #666;
}

.additional-filters .stat-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 0 10px;
}

.stat-filter {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-filter span {
    color: #dde5de;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Toggle switches */
.iiq-toggle,
.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.iiq-toggle.disabled,
.filter-toggle.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (min-width: 992px) {
    .stat-filter span {
        font-size: 17px;
    }

    .additional-filters .stat-input {
        width: 85px;
        padding: 6px 10px;
        font-size: 16px;
    }

    .iiq-toggle-switch,
    .filter-toggle-switch {
        width: 48px;
        height: 24px;
        border-radius: 12px;
    }

    .iiq-toggle-switch::after,
    .filter-toggle-switch::after {
        width: 20px;
        height: 20px;
        top: 1px;
        left: 2px;
    }

    .iiq-toggle.active .iiq-toggle-switch::after,
    .filter-toggle.active .filter-toggle-switch::after {
        transform: translateX(24px);
    }

    .additional-filters .stat-filter-row {
        gap: 30px;
    }
}

.iiq-toggle-switch,
.filter-toggle-switch {
    width: 40px;
    height: 20px;
    background: #333;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
    border: 1px solid #444;
}

.iiq-toggle-switch::after,
.filter-toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #888;
    border-radius: 50%;
    top: 1px;
    left: 2px;
    transition: transform 0.2s, background 0.2s;
}

.iiq-toggle.active .iiq-toggle-switch,
.filter-toggle.active .filter-toggle-switch {
    background: rgba(180, 70, 50, 0.4);
    border-color: #c49c50;
}

.iiq-toggle.active .iiq-toggle-switch::after,
.filter-toggle.active .filter-toggle-switch::after {
    transform: translateX(20px);
    background: #c49c50;
}

.iiq-toggle-label,
.filter-toggle-label {
    color: #dde5de;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.iiq-toggle.active .iiq-toggle-label,
.filter-toggle.active .filter-toggle-label {
    color: #c49c50;
}


/* Star Icon - move just the icon to the right */
.star-icon {
    width: 40px;
    height: 33px;
    background: none;
    border: none;
    position: absolute;
    top: 60px;
    right: -1px;
    opacity: 0.9;
    cursor: pointer;
    z-index: 999;
}

/* Star Container */
.star-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 999;
    width: 40px;
    height: 33px;
    display: block;
    margin: 0;
    padding: 0;
}

/* Star Popup */
.star-popup {
    display: none;
    position: absolute;
    background-color: #222;
    color: #ffbb33;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    width: 300px;
    top: 65px;
    right: calc(100% + 10px);
    z-index: 9999;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.9);
    border: 1px solid orange;
    white-space: normal;
    text-align: center;
}

.star-popup .white-text {
    color: #ffffff !important;
}

.star-popup .red-text {
    color: #ff4444 !important;
}

.star-popup::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("https://i.ibb.co/20LYSncc/embers.gif");
    background-size: cover;
    filter: brightness(50%);
    z-index: -1;
    border-radius: inherit;
    opacity: 0.5;
}

.star-container:hover .star-popup {
    display: block;
}

.star-popup .build-name {
    color: #ffb43d;
    font-size: 15px;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 180, 60, 0.4);
    display: block;
    margin: 10px 0;
}

.star-popup .white-text {
    color: #ffffff !important;
    display: block;
    line-height: 1.3;
}

.star-popup .red-text {
    color: #ff4444 !important;
    display: block;
    line-height: 1.31;
}

/* PoE Tooltip */
.poe-hoverable {
    cursor: pointer;
}

.poe-hoverable:hover {
    color: #ff6600;
}

#poe-tooltip {
    position: absolute;
    background: #1a1a1a;
    border: 2px solid #8b4513;
    border-radius: 8px;
    padding: 8px 12px !important;
    min-width: 250px;
    max-width: 450px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    font-family: 'Fontin SmallCaps', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #ccc;
    display: block !important;
}

#poe-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

#poe-tooltip::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #8b4513;
}

.tooltip-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.tooltip-left {
    flex: 1;
}

.tooltip-right {
    text-align: right;
    flex-shrink: 0;
}

.tooltip-range {
    color: #ff6600;
    font-weight: bold;
}

.tooltip-tier {
    color: #8888ff;
    font-style: italic;
}

.tooltip-ilvl {
    color: #888;
    font-size: 12px;
    font-family: sans-serif !important;
}

.tooltip-paren {
    font-family: sans-serif !important;
    font-size: 12px;
    color: #888;
}

/* Hybrid modifier styles */
.tooltip-hybrid-line {
    margin-bottom: 4px;
}

.tooltip-hybrid-line:last-child {
    margin-bottom: 0;
}

/* Lazy load sentinel */
#lazy-load-sentinel {
    height: 1px;
    width: 100%;
}

/* Loading */
#poe-loading {
    text-align: center;
    padding: 30px;
    color: #dde5de;
}

.spinner {
    border: 3px solid #333;
    border-top: 3px solid #c49c50;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Main site scrollbar */
body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: #0a0a0a;
}

body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4743c 0%, #b85a2a 100%);
    border-radius: 6px;
    border: 1px solid #8b4513;
}

body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e88a50 0%, #d4743c 100%);
}

/* ========================================
   INFLUENCE ICONS
======================================== */

.influence-icon {
    width: 27px;
    height: 27px;
    vertical-align: middle;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: absolute;
    top: 14px;
}

.influence-icon.left {
    left: 5px;
}

.influence-icon.right {
    right: 5px;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
======================================== */


/* ========================================
   FEE DISPLAY STYLES - MATCHES WORDPRESS
======================================== */

.fee-label {
    font-size: 1.5em;
    vertical-align: middle;
    position: relative;
    top: -1px;
    color: #c49c50;
}

.divine-number {
    font-size: 1.5em;
    vertical-align: middle;
    color: #c49c50;
    position: relative;
    top: -1px;
}

.divine-x {
    vertical-align: middle;
    color: #c49c50;
    position: relative;
    font-size: 1.0em;
    margin-right: 0px;
}

.divine-icon {
    width: 30px !important;
    height: 30px !important;
    vertical-align: middle;
    margin: 0 2px 0 0;
    object-fit: contain;
    left: -2px;
    background: transparent !important;
    position: relative;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.fee-plus {
    font-size: 1.5em;
    vertical-align: middle;
    color: #c49c50;
    margin-left: -3px;
    margin-right: 1px;
    position: relative;
    top: -1px;
}

.fee-and-text {
    vertical-align: middle;
    position: relative;
    top: -1px;
    color: #8b8b8b;
    font-size: 0.85em;
}

.fee-and-x {
    vertical-align: middle;
    position: relative;
    top: -1px;
    color: #8b8b8b;
    font-size: 0.6em;
    margin: 0 1px;
}

.mirror-icon {
    width: 22px !important;
    height: 22px !important;
    vertical-align: middle;
    margin: 0 2px;
    object-fit: contain;
    background: transparent !important;
    position: relative;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Fee Text Styling */
.fee-text-upper {
    text-transform: lowercase;
    color: #a3977c;
    font-family: 'Fontin SmallCaps', sans-serif;
}

.fee-mirror-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    /* Close spacing */
    color: #a3977c;
}

.fee-mirror-group img {
    vertical-align: middle;
    margin: 0 1px;
}

.small-x {
    font-size: 0.8em;
    vertical-align: middle;
    margin-right: -1px;
    margin-top: 0.5px;

}

/* PoE 2 Specific Styles */
.poe2-page .itemName2 {
    font-family: 'Fontin SmallCaps', sans-serif;
    background:
        url('https://web.poecdn.com/protected/image/item/popup2/header-double-rare-left.png?v=1739989653373&key=GlFK9dDlo33Cw3Ak7P5MnA') top left / 46px auto no-repeat,
        url('https://web.poecdn.com/protected/image/item/popup2/header-double-rare-right.png?v=1739989653373&key=rXqdxbUkuIkWyVJPJVY9cQ') top right / calc(46px - 1px) auto no-repeat,
        url('https://web.poecdn.com/protected/image/item/popup2/header-double-rare-middle.png?v=1739989653373&key=yJGcA667EzDzrPzd1_9-vg') top center / 46px auto repeat-x;
    text-align: center;
    background-size: auto 100%;
    height: 68px !important;
    padding-top: 10px !important;
    font-size: 19px;
    color: #ffff77;
    text-shadow: 1px 1px 2px black;
    position: relative;
    padding-left: 45px !important;
    padding-right: 45px !important;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.poe2-page .itemName2 span {
    display: block;
    line-height: 1.3;
    transform: translatey(5px);
    color: #ffff77;
}

.influence-icon-poe2 {
    position: absolute;
    top: 48%;
    transform: translateY(-50%);
    width: 30px !important;
    height: 30px !important;
    pointer-events: none;
    z-index: 5;
}

.influence-icon-poe2.left {
    left: 10px;
}

.influence-icon-poe2.right {
    right: 10px;
}

.poe2-page .row-content {
    position: relative;
}

.colorWhite {
    color: #ffffff;
}

/* Toggle switches */
.iiq-toggle,
.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.iiq-toggle.disabled,
.filter-toggle.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.iiq-toggle-switch,
.filter-toggle-switch {
    width: 40px;
    height: 20px;
    background: #333;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
    border: 1px solid #444;
}

.iiq-toggle-switch::after,
.filter-toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #888;
    border-radius: 50%;
    top: 1px;
    left: 2px;
    transition: transform 0.2s, background 0.2s;
}

.iiq-toggle.active .iiq-toggle-switch,
.filter-toggle.active .filter-toggle-switch {
    background: rgba(180, 70, 50, 0.4);
    border-color: #c49c50;
}

.iiq-toggle.active .iiq-toggle-switch::after,
.filter-toggle.active .filter-toggle-switch::after {
    transform: translateX(20px);
    background: #c49c50;
}

.iiq-toggle-label,
.filter-toggle-label {
    color: #dde5de;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.iiq-toggle.active .iiq-toggle-label,
.filter-toggle.active .filter-toggle-label {
    color: #c49c50;
}

/* Additional filters */
.additional-filters .stat-input {
    width: 70px;
    padding: 4px 8px;
    background: #0d0d0d;
    border: 1px solid #444;
    color: #dde5de;
    transition: border-color 0.2s, color 0.2s;
    font-family: 'Fontin SmallCaps', sans-serif;
    border-radius: 3px;
}

.additional-filters .stat-input:focus {
    outline: none;
    border-color: #c49c50;
    color: #c49c50;
}

.additional-filters .stat-input::placeholder {
    color: #666;
}

.additional-filters .stat-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 0 10px;
}

.stat-filter {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-filter span {
    color: #dde5de;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Search Fields Alignment */
.search-fields-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.search-fields-row .filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    min-width: 300px;
}

.search-fields-row .filter-group span {
    margin-bottom: 8px;
    font-weight: bold;
    color: #e0d0c5;
    text-transform: uppercase;
    font-size: 14px;
    text-align: center;
}

.search-fields-row .filter-group input {
    width: 100% !important;
}

.base-type-category-tags {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 25px;
    max-width: 100%;
    width: 100%;
    margin-top: 15px;
}

.base-type-category-tag {
    min-height: 50px;
    height: 50px;
    padding: 8px 50px 8px 55px;
    font: 21px 'Fontin SmallCaps', Helvetica, Arial, sans-serif;
    color: #DDE5DE;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    background-color: #1a1e26;
    background-image: linear-gradient(to bottom, #242932 0%, #202631 100%, #161a21 100%);
    border: 1px solid #4a5466;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center !important;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 0 3px rgba(40, 70, 120, 0.18),
        0 0 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 8px 25px rgba(255, 255, 255, 0.03);
}

.base-type-category-tags>* img {
    position: absolute;
    left: 6px;
    max-width: 36px;
    max-height: 36px;
    width: 36px;
    height: 46px;
    scale: 110%;
    margin-bottom: 0.5px !important;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 5px;
    padding: 2px;
    background: #1a1b1b;
}

.base-type-category-tag .category-count {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #DDE5DE;
    opacity: 0.7;
}

.base-type-category-tag .weapon-count {
    /* Added for compatibility if weapon-count is used in HTML */
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #DDE5DE;
    opacity: 0.7;
    margin-left: 0;
}

.base-type-category-tag:hover {
    border-color: #FF4500;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.7), rgba(180, 50, 30, 0.7));
    color: #FF8C00;
    text-shadow: 0 0 6px rgba(255, 140, 0, 0.5);
}

.base-type-category-tag:hover .category-count,
.base-type-category-tag:hover .weapon-count {
    color: #FF8C00;
    opacity: 1;
}

.base-type-category-tag.active,
.base-type-category-tag.active-orange {
    border-color: #FF4500;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.8), rgba(200, 60, 40, 0.8));
    color: #FF8C00;
    text-shadow: 0 0 6px rgba(255, 140, 0, 0.5);
    box-shadow: 0 0 8px rgba(255, 69, 0, 0.4);
    position: relative;
    /* Ensure ::after is positioned correctly */
}

/* Animated Border */
.base-type-category-tag.active::after,
.base-type-category-tag.active-orange::after,
.weapon-type-category-tag.active-orange::after,
.item-type-tag.active-orange::after,
.main-navigation .current-menu-item>a::after,
.selected-filters .filter::after {
    content: '';
    position: absolute;
    inset: 0px;
    border-radius: inherit;
    /* Match parent border radius */
    background: conic-gradient(from var(--angle),
            transparent 0deg,
            transparent 20deg,
            #ff6600 345deg,
            #ff8800 350deg,
            #ffaa00 355deg,
            #ff8800 357deg,
            #ff6600 360deg,
            transparent 360deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    padding: 2px;
    animation: rotate-border 1.5s linear infinite;
    pointer-events: none;
    z-index: 10;
}

.base-type-category-tag.active .category-count,
.base-type-category-tag.active-orange .category-count,
.base-type-category-tag.active .weapon-count,
.base-type-category-tag.active-orange .weapon-count {
    color: #FF8C00;
    opacity: 1;
}

.base-type-category-tag[data-category="all"],
.view-all-items {
    color: #FFA500;
}

.base-type-category-tag[data-category="all"] .category-count,
.base-type-category-tag[data-category="all"] .weapon-count,
.view-all-items .category-count,
.view-all-items .weapon-count {
    color: #FFA500;
}

/* Selected filters */
.selected-filters {
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    justify-content: flex-start;
    width: 100%;
    min-height: 40px;
    margin-bottom: 15px;
}

.selected-filters .filter {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: linear-gradient(to bottom, rgba(74, 31, 10, 0.8), rgba(200, 60, 40, 0.8));
    border: 1px solid #FF4500;
    padding: 4px 8px;
    border-radius: 7px;
    cursor: url('../images/cursor.png'), auto;
    font-size: 16px;
    height: auto;
    width: auto;
    max-width: 900px;
    white-space: nowrap;
}

@media (min-width: 769px) {
    .selected-filters .filter {
        margin-top: -10px;
    }
}

.selected-filters .filter .filter-text {
    display: inline-block;
    max-width: 730px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-filters .filter span {
    margin-left: 3px;
}

.selected-filters .filter .remove {
    margin-left: 5px;
    color: #ff8d6e;
    font-weight: bold;
    font-size: 26px;
    line-height: 1;
    margin-bottom: 3px;
    position: relative;
    z-index: 20;
    cursor: url('../images/pointer.png'), pointer;
}

.selected-filters .filter .remove::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    cursor: inherit;
    z-index: 20;
}

@font-face {
    font-family: 'FontinSmallcaps';
    src: url('../fonts/Fontin-SmallCaps.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

.poe-hoverable {
    cursor: pointer;
}

.poe-hoverable:hover {
    color: #ff6600;
}

.tooltip-left {
    flex: 1;
}

.tooltip-right {
    text-align: right;
    flex-shrink: 0;
}

.tooltip-range {
    color: #ff6600;
    font-weight: bold;
}

.tooltip-tier {
    color: #8888ff;
    font-style: italic;
}

.tooltip-ilvl {
    color: #888;
    font-size: 12px;
    font-family: sans-serif !important;
}

.tooltip-paren {
    font-family: sans-serif !important;
    font-size: 12px;
    color: #888;
}

.tooltip-annoint-effect {
    color: #ff6600;
    font-weight: normal;
}

.tooltip-divider {
    border-bottom: 1px solid #555;
    margin: 4px 0;
    width: 100%;
}

/* ========================================
   RESPONSIVE BREAKPOINTS (Consolidated)
======================================== */

@media (max-width: 1830px) {
    .poe-catalogue .row {
        width: 50%;
    }

    /* Shorten Search Label */
    .mod-filter-group>span {
        font-size: 0 !important;
    }

    .mod-filter-group>span::after {
        content: "SEARCH MODS: USE MOUSE OR KEYBOARD";
        font-size: 15px;
        display: block;
    }

    /* Smaller Category Tags */
    .base-type-category-tags {
        gap: 4px;
    }

    .base-type-category-tag {
        font-size: 18px;
        padding: 5px 35px 5px 45px;
        /* Reduced padding */
        min-height: 40px;
        height: 40px;
    }

    .base-type-category-tag .category-count,
    .base-type-category-tag .weapon-count {
        font-size: 12px;
    }

    /* Smaller Category Images for intermediate resolutions */
    .base-type-category-tags>* img {
        max-width: 28px;
        max-height: 32px;
        width: 28px;
        height: 32px;
        scale: 100%;
    }
}

@media (max-width: 991px) {
    .page-wrapper {
        flex-direction: column;
    }

    .boxed-container {
        width: 100%;
        max-width: 100%;
    }

    .sidebar--sticky.hovercraft {
        position: relative;
        width: 100%;
        min-width: 100%;
        height: auto;
        order: -1;
    }

    .poe-catalogue .row {
        width: 100% !important;
    }

    .base-type-category-tags {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .poe-catalogue {
        font-size: 12px;
    }

    div.itemName2 {
        height: 44px;
        font-size: 14px !important;
    }

    .poe-catalogue .itemName2 {
        font-size: 14px;
    }

    .lc {
        max-width: 100%;
        word-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        margin: 3px auto;
        color: #7f7f7f;
        font-size: 15px;
        text-align: center;
    }

    .lc .socket-icon {
        height: 14px !important;
        width: 14px !important;
    }

    .lc .link-icon {
        height: 12px !important;
        width: 12px !important;
    }

    .influence-icon {
        width: 23px !important;
        height: 23px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .influence-icon-poe2 {
        width: 20px !important;
        height: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }



    /* Stack search fields on mobile */
    .search-fields-row {
        flex-direction: column !important;
        gap: 15px !important;
        margin-top: 10px !important;
    }

    .search-fields-row .filter-group {
        min-width: 100% !important;
        width: 100% !important;
    }

    #primary.site-main {
        padding: 15px 5px 30px 5px !important;
    }

    .header__page-header {
        background-color: #1a1b1b !important;
        /* Fix black line gap on mobile */
    }

    .header-image {
        margin-top: 10px !important;
        /* Lowered by 10px on mobile */
    }

    input#name-filter,
    input#mod-suggestions-input {
        max-width: 100% !important;
    }

    .filter-group>span {
        text-align: center !important;
        /* Centered as requested */
        margin-bottom: 15px !important;
        margin-top: 20px !important;
        font-size: 12px !important;
        padding: 3px 5px !important;
        display: block !important;
        width: 100% !important;
    }

    /* Search Label Fix for Mobile: Remove duplicate and use short text */
    .mod-filter-group>span {
        font-size: 0 !important;
        /* Hide original text */
    }

    .mod-filter-group>span::after {
        content: "Search Mods:" !important;
        /* Override intermediate text */
        font-size: 12px !important;
        /* Make it visible */
        display: block;
    }

    /* Resize Category Images on Mobile */
    .base-type-category-tags>* img {
        width: 26px !important;
        height: 30px !important;
    }

    /* Resize Additional Filters Header on Mobile */
    .additional-filters-header {
        font-size: 12px !important;
        padding: 3px 5px !important;
        margin-top: 15px !important;
    }

    .additional-filters .stat-filter-row {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: flex-start !important;
    }

    .textCurrency {
        font-size: 14px !important;
    }

    .explicitMod,
    .implicitMod,
    .enchantMod,
    .craftedMod,
    .crucibleMod,
    .fracturedMod {
        font-size: 15px !important;
        /* Matching all mods to 15px on mobile */
    }

    /* Quality text line wrap on mobile (e.g., "Quality (Critical Modifiers): +20%") */
    .property {
        white-space: normal !important;
        word-wrap: break-word !important;
        max-width: 100% !important;
        font-size: 15px !important;
    }

    button.item-whisper {
        font-size: 14px !important;
        padding: 6px 12px !important;
        position: static !important;
    }

    .whisper-tooltip {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: 65px !important;
        width: 90% !important;
        max-width: 350px !important;
        z-index: 10000 !important;
    }

    .poe-catalogue .row-content>.right {
        width: 100% !important;
        border-left: none !important;
        padding: 10px 5px !important;
        text-align: center !important;
    }

    .itemName2 span {
        display: block !important;
        line-height: 1.2 !important;
        font-size: 16px !important;
    }

    #poe-tooltip {
        max-width: calc(100vw - 40px) !important;
        font-size: 13px !important;
        padding: 10px 12px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
    }

    #poe-tooltip::before {
        display: none !important;
    }

    /* Mobile Category Tags - Single Column Layout */
    .base-type-category-tags {
        grid-template-columns: 1fr !important;
        gap: 2px !important;
    }

    .base-type-category-tag {
        font-size: 18px !important;
        padding-right: 50px !important;
        padding-left: 50px !important;
        margin-bottom: 5px !important;
        justify-content: center !important;
        white-space: nowrap !important;
    }

    .base-type-category-tag .category-count,
    .base-type-category-tag .weapon-count {
        position: absolute !important;
        transform: translateY(-50%) !important;
        top: 50% !important;
        right: 15px !important;
        font-size: 15px !important;
        margin: 0 !important;
        display: inline !important;
    }

    /* Mobile Selected Filters (Wrap Text) */
    .selected-filters .filter {
        white-space: normal !important;
        height: auto !important;
        max-width: 100% !important;
    }

    .selected-filters .filter .filter-text {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        display: inline !important;
    }

    .star-icon {
        width: 30px;
        height: auto;
        background: none;
        border: none;
        position: absolute;
        top: 46px;
        right: -1px;
        opacity: 0.9;
        cursor: pointer;
        z-index: 999;
    }


}

@media (max-width: 480px) {
    .poe-catalogue .row-content .left {
        width: auto !important;
        min-width: 0 !important;
    }

    .poe-catalogue .row-content {
        flex-direction: column !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Ensure row takes full width */
    .poe-catalogue .row {
        width: 100% !important;
        margin: 0 !important;
        padding: 5px 0 !important;
    }

    .poe-catalogue .itemName2 {
        white-space: normal !important;
    }

    .itemName2 span {
        font-size: 15px !important;
        padding-bottom: 1px;
    }

    html[lang="ko"] .itemName2 span {
        padding-top: 2px;
        padding-bottom: 0px;
    }

    .poe-catalogue .row-content .left img {
        max-width: 100% !important;
        max-height: 150px !important;
        object-fit: contain !important;
    }

    /* Stack filter groups */
    .filter-group {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
    }

    .filter-group span {
        margin-bottom: 5px !important;
        margin-right: 0 !important;
    }

    .filter-group input {
        width: 100% !important;
    }

    /* Fix overlap of Fee/Whisper box on mobile */
    div.whisper {
        position: static !important;
        width: 100% !important;
        margin: 20px 0 0 0 !important;
        box-sizing: border-box !important;
    }

    .item-buttons-row button.item-whisper > span:first-child {
        display: none;
    }

    .poe-catalogue .row-content>.right::after {
        display: none !important;
    }

    /* Reduce vertical gap between Search Mods and Additional Filters */
    .filters-right-col {
        margin-top: 0 !important;
    }

    .filters-layout-row {
        gap: 5px !important;
    }

    .filter-group>span {
        margin-top: 5px !important;
    }

    .search-fields-row {
        margin-bottom: 5px !important;
    }

    /* PoE 2 Only Mobile Overrides */
    .poe2-page .influence-icon-poe2 {
        width: 30px !important;
        height: 30px !important;
        top: 48% !important;
    }

    .poe2-page .itemName2 span {
        font-size: 20px !important;
    }

}

@font-face {
    font-family: 'Fontin SmallCaps';
    src: url('../fonts/Fontin-SmallCaps.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* PoE Tooltip Styles */
.poe-hoverable {
    cursor: pointer;
}

.poe-hoverable:hover {
    color: #ff6600;
}

#poe-tooltip {
    position: absolute;
    background: #1a1a1a;
    border: 2px solid #8b4513;
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 250px;
    max-width: 450px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    font-family: 'Fontin SmallCaps', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #ccc;
}

#poe-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

#poe-tooltip::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #8b4513;
}

.tooltip-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.tooltip-left {
    flex: 1;
}

.tooltip-right {
    text-align: right;
    flex-shrink: 0;
}

.tooltip-range {
    color: #ff6600;
    font-weight: bold;
}

.tooltip-tier {
    color: #8888ff;
    font-style: italic;
}

.tooltip-ilvl {
    color: #888;
    font-size: 12px;
    font-family: sans-serif !important;
}

.tooltip-paren {
    font-family: sans-serif !important;
    font-size: 12px;
    color: #888;
}

/* Hybrid modifier styles */
.tooltip-hybrid-line {
    margin-bottom: 4px;
}

.tooltip-hybrid-line:last-child {
    margin-bottom: 0;
}

body {
    display: flex;
    background: #2a2a2a;
    color: #ccc;
    font-family: 'Fontin SmallCaps', Arial, sans-serif;
    padding: 20px;
    line-height: 1.6;
}

/* ========================================
   FILTER LAYOUT RESTRUCTURING
   ======================================== */
.filters-layout-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
}

.filters-left-col {
    width: 60%;
    display: flex;
    flex-direction: column;
}

.filters-right-col {
    width: 40%;
}

/* Ensure inner elements behave nicely */
.filters-left-col .search-fields-row {
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    margin-top: 0;
    /* Remove top margin from original style */
}

/* Header Alignment */
.filters-left-col .search-fields-row .filter-group span,
.filters-left-col .filter-group span,
.filters-right-col .additional-filters span {
    margin-bottom: 10px;
    /* Shared consistent margin */
    font-weight: bold;
    color: #e0d0c5;
    text-transform: uppercase;
    font-size: 14px;
    line-height: 1.4;
    /* Baseline height */
    text-align: center;
}

/* Specific fix for alignment: Ensure containers start at the same Y offset */
.filters-left-col .search-fields-row,
.filters-right-col .additional-filters {
    margin-top: 10px !important;
    margin-bottom: 0 !important;
}

/* Additional Filters: Row 1 (Stats) */
.filters-right-col .additional-filters .stats-row {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: flex-start;
    /* Better grouping for fewer items */
    gap: 20px;
    /* Consistent gap between filters */
    margin-bottom: 5px;
    padding: 0;
}

.filters-right-col .additional-filters .stats-row .stat-filter {
    flex: 0 0 auto;
    /* Don't stretch */
    min-width: 0;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    height: 26px !important;
    /* Optimized container height */
}

/* Additional Filters: Row 2 (Toggles) */
.filters-right-col .additional-filters .toggles-row {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: flex-start;
    /* Better grouping for fewer items */
    gap: 20px;
    /* Consistent gap between toggles */
    align-items: center;
    margin-top: 5px !important;
    padding: 0;
}

.filters-right-col .additional-filters .toggles-row .filter-toggle,
.filters-right-col .additional-filters .toggles-row .iiq-toggle {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.filters-right-col .additional-filters .toggles-row .filter-toggle-label,
.filters-right-col .additional-filters .toggles-row .iiq-toggle-label {
    font-size: 11px;
    letter-spacing: 0.2px;
    line-height: normal !important;
    margin: 0 !important;
    display: inline-block !important;
    /* Block conflict with flex centering */
}

/* Specific shrink for stat inputs in the split layout */
.filters-right-col .additional-filters .stat-input {
    width: 42px !important;
    padding: 2px 4px !important;
    font-size: 11px !important;
    height: 20px !important;
    /* Fixed height for consistent midline */
    margin: 0 !important;
    box-sizing: border-box !important;
}

.filters-right-col .additional-filters .stat-filter span {
    font-size: 13px !important;
    white-space: nowrap;
    line-height: normal !important;
    /* Reset to normal to allow transformation to control positioning */
    display: inline-block !important;
    transform: translateY(-1px) !important;
    /* Significant nudge to match input centers */
    margin: 0 !important;
}

.filters-right-col .additional-filters .stat-filter {
    gap: 6px !important;
    /* Unified gap for stats */
}

/* Direct sizing for switches to avoid scale-induced misalignment */
.filters-right-col .additional-filters .toggles-row .iiq-toggle-switch,
.filters-right-col .additional-filters .toggles-row .filter-toggle-switch {
    transform: none !important;
    width: 34px !important;
    height: 16px !important;
    border-radius: 8px !important;
    margin: 0 !important;
}

.filters-right-col .additional-filters .toggles-row .iiq-toggle-switch::after,
.filters-right-col .additional-filters .toggles-row .filter-toggle-switch::after {
    width: 12px !important;
    height: 12px !important;
    top: 1px !important;
    left: 1px !important;
}

.filters-right-col .additional-filters .toggles-row .iiq-toggle.active .iiq-toggle-switch::after,
.filters-right-col .additional-filters .toggles-row .filter-toggle.active .filter-toggle-switch::after {
    transform: translateX(18px) !important;
}

/* Responsiveness for smaller screens */
@media screen and (max-width: 1200px) {
    .filters-layout-row {
        flex-direction: column;
    }

    .filters-left-col,
    .filters-right-col {
        width: 100%;
    }

    .filters-right-col {
        margin-top: 10px;
    }

    .filters-right-col .additional-filters .stats-row,
    .filters-right-col .additional-filters .toggles-row {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

/* =========================================
   New Filter Layout Styles
   ========================================= */

.search-inputs-container {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    width: 100%;
    align-items: flex-start;
}

.selected-filters:empty {
    display: none;
}

.search-inputs-container .filter-group {
    flex: 1 1 50%;
    width: 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Ensure inputs fill the group and have updated styling */
.search-inputs-container .filter-group input {
    width: 100% !important;
    box-sizing: border-box;
}

/* Custom Input Styles - Reverted to Standard look but kept sizing/position */
#name-filter,
#mod-suggestions-input {
    height: 44px !important;
    text-indent: 0;
    padding: 0 15px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    color: #eee;
    font-family: 'Fontin', 'Roboto', sans-serif;
    font-size: 15px !important;
    border-radius: 4px;
    margin-top: 5px !important;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Reverted Borders/Shadows to neutral */
    border: 1px solid #444 !important;
    box-shadow: none !important;
}

#name-filter:focus,
#mod-suggestions-input:focus,
.stat-filter-row-vertical .stat-input:focus {
    border-color: #ffaa00 !important;
    box-shadow: none !important;
    outline: none !important;
}

#name-filter::placeholder,
#mod-suggestions-input::placeholder {
    color: #777 !important;
    text-transform: uppercase;
    font-size: 13px;
}

/* Override existing margins for filter groups inside container */
.search-inputs-container .filter-group>span {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    display: block;
}

.additional-filters-section {
    width: 100%;
    margin-top: 10px;
}

/* Updated Header Style per User Request */
.additional-filters-header {
    display: block;
    text-align: center;
    width: 100%;
    padding: 6px 0;
    margin-bottom: 20px;
    margin-top: -10px;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #e0d0c5;
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(35, 10, 5, 0.6) 40%,
            rgba(35, 10, 5, 0.6) 60%,
            rgba(0, 0, 0, 0) 95%);
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(180, 70, 50, 0.2) 20%,
            rgba(180, 70, 50, 0.5) 50%,
            rgba(180, 70, 50, 0.2) 80%,
            rgba(0, 0, 0, 0) 90%) 1;
    font-family: 'Fontin SmallCaps', sans-serif;
    box-shadow: none;
    border-radius: 0;
}

.additional-filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    width: 99.7%;
    margin: 0 auto;
    /* Lighter background around parameters (User said "way too dark") */
    background: rgba(20, 20, 20, 0.3);
    border: 1px solid #2a2a2a;
    border-radius: 7px;
    padding: 25px;
    box-sizing: border-box;
}

.filter-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.filter-column h4 {
    color: #dfcfab;
    font-size: 14px;
    margin-bottom: 15px;
    text-transform: uppercase;
    text-align: center;
    border-radius: 4px;
    background-color: #211f1f;
    font-weight: normal;
    letter-spacing: 1px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Fontin SmallCaps', sans-serif !important;
}

/* Match Header Widths to Content Widths */
.additional-filters-grid>.filter-column:nth-child(1) h4 {
    max-width: 400px;
    /* Matches Defenses */
}

.additional-filters-grid>.filter-column:nth-child(2) h4,
.additional-filters-grid>.filter-column:nth-child(3) h4 {
    max-width: 350px;
    /* Matches Toggles */
}

/* Defenses Column */
.stat-filter-row-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

.stat-filter-row-vertical .stat-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 0 !important;
}

.stat-filter-row-vertical .stat-filter span {
    color: #e0d0c5;
    font-size: 0.9rem;
    min-width: 110px;
    text-align: left;
    margin: 0 !important;
    font-family: 'Fontin SmallCaps', sans-serif !important;
}

.stat-filter-row-vertical .stat-inputs {
    display: flex;
    gap: 5px;
}

/* Radius on inputs */
.stat-filter-row-vertical .stat-input {
    width: 60px !important;
    background: #000;
    border: 1px solid #333;
    color: #ddd;
    text-align: center;
    padding: 5px;
    font-family: inherit;
    height: 28px !important;
    margin: 0 !important;
    border-radius: 3px !important;
}

/* Toggles Column */
.toggles-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 350px;
}

.toggles-column .filter-toggle,
.toggles-column .iiq-toggle,
.toggles-column .iir-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    margin: 0 !important;
}

.toggles-column .filter-toggle-label,
.toggles-column .iiq-toggle-label {
    color: #e0d0c5;
    font-size: 0.9rem;
    font-family: 'Fontin SmallCaps', sans-serif !important;
    min-width: 0;
}

/* Switches - Lighter Colors */
.toggles-column .filter-toggle-switch,
.toggles-column .iiq-toggle-switch {
    position: relative;
    width: 40px !important;
    height: 20px !important;
    background-color: #2a2a2a !important;
    /* Lighter background */
    border: 1px solid #4a4a4a;
    border-radius: 10px !important;
    transition: background-color 0.3s;
    margin: 0 !important;
    transform: none !important;
    flex-shrink: 0;
}

.toggles-column .filter-toggle-switch::after,
.toggles-column .iiq-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px !important;
    left: 2px !important;
    width: 14px !important;
    height: 14px !important;
    background-color: #888;
    /* Lighter knob */
    border-radius: 50%;
    transition: transform 0.3s, background-color 0.3s;
}

.toggles-column .filter-toggle.active .filter-toggle-switch,
.toggles-column .iiq-toggle.active .iiq-toggle-switch,
.toggles-column .iir-toggle.active .filter-toggle-switch {
    background-color: #4a2828 !important;
    /* Brownish */
    border-color: #c49c50;
}

.toggles-column .filter-toggle.active .filter-toggle-switch::after,
.toggles-column .iiq-toggle.active .iiq-toggle-switch::after,
.toggles-column .iir-toggle.active .filter-toggle-switch::after {
    transform: translateX(20px) !important;
    background-color: #c49c50 !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .additional-filters-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }



    .stat-filter-row-vertical .stat-filter span {
        min-width: unset;
    }
}

/* Toggle Filters Button */
.toggle-filters-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 48px;
    /* Align with inputs */
}

.toggle-filters-btn {
    background: #211f1f;
    border: 1px solid #444;
    color: #e0d0c5;
    padding: 8px 16px;
    border-radius: 4px;
    margin-top: 13px;
    cursor: pointer;
    font-family: 'Fontin SmallCaps', sans-serif !important;
    font-size: 13px;
    text-transform: uppercase;
    transition: all 0.2s;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.toggle-filters-btn:hover {
    border-color: #ffaa00;
    color: #fff;
    background: #2a2828;
}

.additional-filters-section.hidden {
    display: none !important;
}

.additional-filters-section.collapsed .additional-filters-grid {
    display: none;
}

.additional-filters-header {
    cursor: url('../images/pointer.png'), pointer;
    user-select: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.additional-filters-toggle-arrow {
    font-size: 16px;
    color: #e0d0c5;
    line-height: 1;
    background: #3a1917;
    border-radius: 2px;
    padding: 2px 5px;
    cursor: url('../images/pointer.png'), pointer;
}

/* Mobile: Stack search fields vertically */
@media (max-width: 768px) {
    .search-fields-row {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .search-fields-row .filter-group {
        min-width: 100% !important;
        max-width: 100% !important;
    }

    .search-inputs-container {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .search-inputs-container .filter-group {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
}

/* ========================================
   DESKTOP ALIGNMENT FIX (Width 80% + Centered Whisper)
======================================== */
@media (min-width: 992px) {
    .poe-catalogue .row-content>.right {
        width: 80% !important;
        padding: 10px 7px 20px 6px !important;
    }

    div.whisper {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 95% !important;
    }
}

/* Disabled filter state */
.disabled-filter {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    filter: grayscale(100%);
}