/* ==========================================================================
   TEXT MAP: fieldstyle.css
   --------------------------------------------------------------------------
   Section 1: Root Variables & Theme Matrix
   Section 2: Global Resets & Layout Foundations
   Section 3: Topbar & Weight Displays
   Section 4: Main Viewport, Images & Map Flags
   Section 5: Sidebar Controls & Typography
   Section 6: UI Components (Buttons, Inputs, Sliders)
   Section 7: Modals & Form Layouts
   Section 8: Inventory & Dynamic Lists
   Section 9: Search Overlays & Animations
   ========================================================================== */

/* ==========================================
// SECTION 1: ROOT VARIABLES & THEME MATRIX
// ========================================== */
:root {
    --bg-color: #2c251e; --panel-bg: #3d352b; --accent-green: #556b2f; --active-green: #6b8e23;
    --active-yellow: #f1c40f; --text-main: #f5f2eb; --text-muted: #d2c9b1; --display-bg: #000000;
    --border-color: #4a3f31; --weight-bg: #1f1a14; --weight-border: #6b8e23;
}

/* 1. DESERT */
body.theme-desert { --bg-color: #3b2f25; --panel-bg: #4a3b2f; --accent-green: #8b5a2b; --active-green: #cd853f; --text-main: #fdf5e6; --text-muted: #e6c280; --border-color: #5c4a3d; --weight-bg: #2b221a; --weight-border: #cd853f; }
body.theme-desert-light { --bg-color: #fdf5e6; --panel-bg: #e8d5c4; --accent-green: #dcb388; --active-green: #cd853f; --text-main: #3b2f25; --text-muted: #6b5544; --border-color: #c4a78d; --weight-bg: #fdf5e6; --weight-border: #cd853f; }

/* 2. FOREST */
body.theme-forest { --bg-color: #2c251e; --panel-bg: #3d352b; --accent-green: #556b2f; --active-green: #6b8e23; --active-yellow: #f1c40f; --text-main: #f5f2eb; --text-muted: #d2c9b1; --display-bg: #000000; --border-color: #4a3f31; --weight-bg: #1f1a14; --weight-border: #6b8e23; }
body.theme-forest-light { --bg-color: #233026; --panel-bg: #2e3e32; --accent-green: #4f6e56; --active-green: #689e75; --text-main: #f5f2eb; --text-muted: #a3b8aa; --border-color: #384a3c; --weight-bg: #1a241c; --weight-border: #689e75; }

/* 3. URBAN */
body.theme-urban { --bg-color: #2c3e50; --panel-bg: #34495e; --accent-green: #5d6d7e; --active-green: #7fb3d5; --text-main: #ecf0f1; --text-muted: #bdc3c7; --border-color: #465c71; --weight-bg: #1a252f; --weight-border: #7fb3d5; }
body.theme-urban-light { --bg-color: #ecf0f1; --panel-bg: #ffffff; --accent-green: #aeb6bf; --active-green: #7fb3d5; --text-main: #2c3e50; --text-muted: #5d6d7e; --border-color: #d5dbdb; --weight-bg: #e5e8e8; --weight-border: #7fb3d5; }

/* 4. MARINE */
body.theme-marine { --bg-color: #0f172a; --panel-bg: #1e293b; --accent-green: #0284c7; --active-green: #0ea5e9; --text-main: #f8fafc; --text-muted: #94a3b8; --border-color: #334155; --weight-bg: #0b1120; --weight-border: #0ea5e9; }
body.theme-marine-light { --bg-color: #f0f9ff; --panel-bg: #dbeafe; --accent-green: #7dd3fc; --active-green: #0ea5e9; --text-main: #0f172a; --text-muted: #334155; --border-color: #93c5fd; --weight-bg: #f0f9ff; --weight-border: #0ea5e9; }

/* 5. TACTICAL */
body.theme-tactical { --bg-color: #0d0d0d; --panel-bg: #1a1a1a; --accent-green: #333333; --active-green: #4d4d4d; --text-main: #e6e6e6; --text-muted: #999999; --border-color: #262626; --weight-bg: #000000; --weight-border: #4d4d4d; }
body.theme-tactical-light { --bg-color: #121418; --panel-bg: #1e2229; --accent-green: #374151; --active-green: #3b82f6; --text-main: #f5f2eb; --text-muted: #9ca3af; --border-color: #2d3748; --weight-bg: #0f1115; --weight-border: #3b82f6; }

/* 6. RED LIGHT COMPATIBLE */
body.theme-redlight { --bg-color: #0d0000; --panel-bg: #1a0000; --accent-green: #4d0000; --active-green: #800000; --text-main: #ff9999; --text-muted: #cc4444; --border-color: #330000; --weight-bg: #000000; --weight-border: #800000; }
body.theme-redlight-light { --bg-color: #2a0000; --panel-bg: #3d0000; --accent-green: #800000; --active-green: #b30000; --text-main: #ffcccc; --text-muted: #ff6666; --border-color: #5c0000; --weight-bg: #1a0000; --weight-border: #b30000; }

/* 7. CHOCOLATE */
body.theme-chocolate { --bg-color: #2e1c15; --panel-bg: #3d261c; --accent-green: #5c392a; --active-green: #7a4c38; --text-main: #e8dcd8; --text-muted: #b89c91; --border-color: #4f3124; --weight-bg: #1f120e; --weight-border: #7a4c38; }
body.theme-chocolate-light { --bg-color: #e8dcd8; --panel-bg: #d1c3be; --accent-green: #b89c91; --active-green: #967466; --text-main: #2e1c15; --text-muted: #5c392a; --border-color: #b5a49d; --weight-bg: #e8dcd8; --weight-border: #967466; }

/* 8. COLOR BLIND SAFE (Universal High Contrast) */
body.theme-cb { --bg-color: #002244; --panel-bg: #003366; --accent-green: #ffc20a; --active-green: #e6b800; --text-main: #ffffff; --text-muted: #99c2ff; --border-color: #004080; --weight-bg: #001122; --weight-border: #ffc20a; }
body.theme-cb-light { --bg-color: #f0f0f0; --panel-bg: #ffffff; --accent-green: #d55e00; --active-green: #b34f00; --text-main: #000000; --text-muted: #555555; --border-color: #dcdcdc; --weight-bg: #e0e0e0; --weight-border: #d55e00; }


/* ==========================================
// SECTION 2: GLOBAL RESETS & LAYOUT
// ========================================== */
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }

body, html { 
    width: 100%; height: 100%; overflow: hidden; 
    background-color: var(--bg-color); color: var(--text-main); 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    transition: background-color 0.3s ease, color 0.3s ease; 
}

#app-container {
    display: flex; flex-direction: column; width: 100vw; height: 100vh;
    padding: 10px; gap: 15px;
}


/* ==========================================
// SECTION 3: TOPBAR & WEIGHT DISPLAYS
// ========================================== */
#pack-info-topbar { 
    width: 100%; padding: 10px 16px; background: rgba(61,53,43,0.9); 
    border-bottom: 1px solid var(--border-color); z-index: 10; font-size: 0.9rem; 
    display: flex; flex-direction: column; gap: 8px; color: var(--text-muted); 
}
#pack-info-topbar strong { color: var(--text-main); }

#topbar-weights { 
    display: grid; 
    grid-template-areas: "t1 tot pk" "t2 tot br";
    grid-template-columns: 1fr 1.1fr 1fr; gap: 6px; width: 100%; 
}

.wb-t1 { grid-area: t1; }
.wb-t2 { grid-area: t2; }
.wb-pk { grid-area: pk; }
.wb-br { grid-area: br; }
.wb-tot { 
    grid-area: tot; display: flex; flex-direction: column; justify-content: center; 
    align-items: center; border: 2px solid var(--active-yellow) !important; background-color: #1f1a14; 
}
.wb-tot .weight-block-title { color: var(--active-yellow); font-size: 0.95rem; }
.wb-tot .weight-block-value { font-size: 1rem; }

.weight-block { 
    background-color: var(--weight-bg); border: 1px solid var(--weight-border); 
    border-radius: 4px; padding: 4px 6px; font-size: 0.8rem; display: flex; 
    flex-direction: column; gap: 2px; color: var(--text-muted); text-align: center;
}
.weight-block-title { font-weight: bold; color: var(--text-main); }
.weight-block-value { font-size: 0.85rem; color: var(--text-main); white-space: nowrap; }


/* ==========================================
// SECTION 4: MAIN VIEWPORT, IMAGES & FLAGS
// ========================================== */
#display-canvas-area {
    flex: 1 1 auto;
    width: 100%;
    /* UPGRADE: Forces the canvas to stay at maximum height so landscape images can't shrink it! */
    min-height: calc(100dvh - 200px); 
    max-height: calc(100dvh - 200px);
    background-color: var(--display-bg);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#viewport-image-wrapper { 
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: pan-y; 
    border: 1px solid rgba(241, 196, 15, 0.9);
    border-radius: 4px;
    box-sizing: border-box;
}

#main-view-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    display: block;
}

#bedroll-overlay { 
    position: absolute;
    max-width: 25%;
    height: auto;
    display: none;
    pointer-events: auto;
    z-index: 20; 
    border-radius: 4px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.7); 
    cursor: move;
    transform-origin: top right; 
}

#flag-interaction-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.map-flag { 
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: #ff4757;
    border: 2px solid #ffffff; 
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5); 
    z-index: 6;
    touch-action: manipulation; 
}

.map-flag::after { 
    content: attr(data-label);
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translateX(-50%); 
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 3px;
    white-space: nowrap; 
}

#navigation-breadcrumbs { 
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 12;
    background: rgba(0,0,0,0.7); 
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: none; 
}

#pocket-bottom-controls { 
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%); 
    z-index: 12;
    display: none;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 90%; 
}

#pocket-bottom-controls .ui-btn {
    width: auto;
    justify-content: center;
    gap: 8px;
}




/* ==========================================
// SECTION 5: SIDEBAR CONTROLS & TYPOGRAPHY
// ========================================== */
#sidebar-controls { 
    flex: 1; width: 100%; background-color: var(--panel-bg); border: 2px solid var(--border-color); 
    border-radius: 6px; display: flex; flex-direction: column; padding: 15px; overflow-y: auto; 
    gap: 20px; position: relative; 
    min-height: 0; /* CRITICAL FIX: Forces sidebar to scroll instead of stretching the main canvas */
}

.brand-header { text-align: center; border-bottom: 2px solid var(--border-color); padding-bottom: 12px; }
.brand-main { font-size: 2.2rem; font-weight: 800; letter-spacing: 1px; color: var(--text-main); display: block; }
.brand-sub { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); display: block; margin-top: -2px; }
.brand-author { font-size: 1.2rem; font-style: italic; color: var(--text-muted); margin-top: 2px; display: block; }

.control-group { 
    display: flex; flex-direction: column; gap: 8px; 
    flex-shrink: 0; /* Prevents the group from compressing */
}

/* UPGRADE: Safely reclaims ~15px of padding for phones, overriding the inline HTML */
#sidebar-controls .control-group:last-child {
    padding-bottom: 25px !important;
}

.group-title { 
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); 
    border-bottom: 1px solid var(--active-yellow); padding-bottom: 4px; margin-bottom: 2px; font-weight: bold; 
}


/* ==========================================
// SECTION 6: UI COMPONENTS (BUTTONS, INPUTS)
// ========================================== */
.ui-btn { 
    background-color: var(--accent-green); color: var(--text-main); border: none; padding: 10px 14px;
    border-radius: 4px; cursor: pointer; font-size: 0.9rem; font-family: inherit; font-weight: bold;
    transition: background-color 0.2s; display: flex; justify-content: space-between; align-items: center; width: 100%;
    flex-shrink: 0; /* CRITICAL FIX: Stops buttons from getting thinner */
}
.ui-btn:hover { background-color: var(--active-green); }
.ui-btn:active { transform: scale(0.98); }
.ui-btn span { pointer-events: none; }

.active-yellow { background-color: var(--active-yellow) !important; color: #111 !important; box-shadow: 0 0 8px rgba(241,196,15,0.6); }

.status-text-large { font-size: 1rem; background: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 6px; font-weight: bold; }
.ui-select { background-color: var(--bg-color); color: var(--text-main); border: 1px solid var(--border-color); padding: 8px; border-radius: 4px; font-size: 0.85rem; outline: none; width: 100%; }

.form-item { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.form-item label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.form-input { background-color: var(--bg-color); color: var(--text-main); border: 1px solid var(--border-color); padding: 8px 10px; border-radius: 4px; font-size: 0.9rem; outline: none; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.form-row-3 .form-input { min-width: 0; padding: 8px 4px; text-align: center; }

.track-row { display: flex; justify-content: space-around; align-items: center; background: var(--weight-bg); padding: 6px; border-radius: 4px; border: 1px solid var(--border-color); margin-top: 4px; }
.track-row label { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-main); font-weight: bold; cursor: pointer; }

/* NEW UI COMPONENT: Search Mode Cards */
.search-card {
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s ease;
    font-size: 0.9rem;
    line-height: 1.4;
}
.search-card:hover {
    border-color: var(--active-green);
}
.search-card.active-card {
    border-color: var(--active-yellow);
    box-shadow: 0 0 8px rgba(241,196,15,0.4);
}

/* ==========================================
// SECTION 7: MODALS & FORM LAYOUTS
// ========================================== */
/* UPGRADE: 100% Full-Screen Modals (Fat-Finger Proof) */
.floating-window { 
    position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; 
    background-color: var(--panel-bg); border: none; border-radius: 0; 
    z-index: 1000 !important; /* <--- FIX: Lowered to 1000 so search modals (9999) float above */
    display: none; flex-direction: column; 
    overflow-y: auto; overflow-x: hidden; 
}

/* UPGRADE: Pushes the title to the very top and centers it cleanly */
.window-header { 
    background-color: var(--bg-color); padding: 12px 16px; display: flex; justify-content: center; align-items: center; 
    border-bottom: 1px solid var(--border-color); font-weight: bold; font-size: 1.1rem; flex-shrink: 0;
}

/* UPGRADE: Standardized Locked Canvas for Modal Images (Matches Main View) */
.modal-locked-canvas {
    width: calc(100% - 32px); /* Standard width to match main landing canvas */
    margin: 16px auto 0 auto;
    height: 55vh; /* Standardized size to match main landing canvas */
    min-height: 220px;
    background: #000;
    /* Framed look with a FULL yellow accent border on all sides */
    border: 2px solid var(--active-yellow); 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0; /* Prevents canvas from shrinking when scrolling */
}

.modal-locked-canvas img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.window-body { padding: 16px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }
.window-footer { display: flex; gap: 10px; }

/* Critical Pad-Bottoms requested (Ensures Trackers don't get clipped) */
#win-pack-manager .window-body, #win-bedroll-manager .window-body, #win-item-details .window-body, #win-bedroll-item-details .window-body { padding-bottom: 150px !important; }

/* BUG FIX: Changed from repeat(3, 1fr) to repeat(2, 1fr) to prevent URL box overflow */
.photo-upload-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.photo-slot { background: var(--bg-color); border: 1px dashed var(--border-color); border-radius: 4px; padding: 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.75rem; position: relative; }
.photo-slot-title { font-weight: bold; color: var(--text-muted); }
.thumb-preview { width: 60px; height: 60px; background: #111; border-radius: 4px; object-fit: cover; display: none; }
.file-input-hidden { display: none; }
.upload-trigger-btn { background: var(--panel-bg); border: 1px solid var(--border-color); color: var(--text-main); padding: 4px 8px; font-size: 0.7rem; border-radius: 3px; cursor: pointer; }

/* ==========================================
// ACTION DROPDOWN MENU (Clipboard System)
// ========================================== */
.action-dropdown { position: relative; display: inline-block; }
.action-dropdown-btn { 
    background: var(--active-green); color: #111; border: none; border-radius: 4px; cursor: pointer; font-weight: bold;
    display: flex; align-items: center; justify-content: center; 
    padding: 10px 16px; /* Fat thumb trigger */
    font-size: 0.9rem;
}

/* UPGRADE: Screen-Centered, Fat-Thumb Ambidextrous Menu */
.action-dropdown-content { 
    display: none; 
    position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
    background-color: var(--panel-bg); 
    width: 60vw; max-width: 320px; 
    box-shadow: 0px 15px 40px rgba(0,0,0,0.95); z-index: 10000; 
    border: 2px solid var(--active-yellow); border-radius: 8px; overflow: hidden; padding: 15px;
}
.action-dropdown-content.show { display: block; }

.action-dropdown-content button { 
    color: var(--text-main); 
    padding: 20px 20px; /* Tall touch targets */
    text-decoration: none; display: block; 
    background: var(--bg-color); border: 1px solid var(--border-color); width: 100%; 
    text-align: center; /* Centered Text */
    cursor: pointer; font-size: 1rem; font-weight: bold; 
    margin-bottom: 12px; border-radius: 6px;
    font-family: inherit;
}
.action-dropdown-content button:hover, .action-dropdown-content button:active { background-color: #333; color: var(--active-yellow); border-color: var(--active-yellow); }
.action-dropdown-content button:last-child { margin-bottom: 0; }

/* ==========================================
// UPGRADE: TELEMETRY & TRACKING SYSTEM
// ========================================== */
.tracker-slot-row { display: flex; align-items: center; margin-bottom: 8px; }
.tracker-dropdown { flex: 1; padding: 6px; font-size: 0.9rem; background: var(--bg-color); color: var(--text-main); border: 1px solid var(--border-color); border-radius: 4px; }

/* The Fixed-Height Corral for Custom Trackers */
.tracker-corral { 
    background: rgba(0, 0, 0, 0.15); 
    border: 1px inset var(--border-color); 
    border-radius: 6px; 
    padding: 10px; 
    max-height: 160px; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}

/* Individual Tracker Editor Row */
.tracker-item { display: flex; align-items: center; gap: 8px; }
.tracker-input { flex: 1; margin: 0 !important; padding: 6px 8px !important; font-size: 0.85rem; }

/* Smart Tags for the Item Modal */
.tracker-tag-container { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tracker-tag { 
    display: inline-flex; align-items: center; 
    background: var(--bg-color); border: 1px solid var(--active-green); 
    padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; color: var(--text-main); 
}
.tracker-tag-close { margin-left: 6px; color: #b33939; cursor: pointer; font-weight: bold; }




/* Gear Library - Forces modal to override Window Manager JS demotions */
#win-gear-library { z-index: 10005 !important; }




/* ==========================================
// SECTION 8: INVENTORY & DYNAMIC LISTS
// ========================================== */
.inventory-scroll-container { flex: 1; overflow-y: auto; border: 1px solid var(--border-color); background: var(--bg-color); padding: 8px; border-radius: 4px; display: flex; flex-direction: column; gap: 8px; }

.inventory-item-row { display: flex; align-items: center; gap: 12px; background: var(--panel-bg); padding: 6px; border-radius: 4px; border: 1px solid var(--border-color); }
.large-thumb { width: 70px; height: 70px; object-fit: cover; background: #000; border-radius: 4px; cursor: pointer; border: 1px solid var(--border-color); }

.bedroll-item-row { display: flex; align-items: center; gap: 8px; background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 4px; padding: 6px; }
.bedroll-item-thumb { width: 50px; height: 50px; object-fit: cover; background: #000; border-radius: 4px; cursor: pointer; border: 1px solid var(--border-color); }
.bedroll-item-fields { flex: 1; display: flex; flex-direction: column; gap: 4px; }


/* ==========================================
// SECTION 9: SEARCH OVERLAYS & ANIMATIONS
// ========================================== */
#guided-search-module, #standard-search-module {
    position: fixed; bottom: 15px; left: 5vw; z-index: 9999; 
    background: rgba(61,53,43,0.95); border: 2px solid var(--active-yellow); 
    border-radius: 6px; padding: 20px; display: none; flex-direction: column; 
    backdrop-filter: blur(4px); width: 90vw; height: auto;
}

.search-desc-block {
    font-size: 0.9rem; color: var(--text-muted); padding: 10px; background: var(--bg-color);
    border: 1px solid var(--border-color); border-radius: 4px; height: 22%; display: flex;
    flex-direction: column; justify-content: center;
}
.search-desc-block strong { color: var(--active-yellow); display: block; margin-bottom: 4px; font-size: 1rem; }

/* Animations */
.flag-pulse-highlight { animation: pulse-glow 1s infinite alternate; z-index: 10 !important; }
@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px 2px var(--active-yellow); transform: translate(-50%, -50%) scale(1); }
    100% { box-shadow: 0 0 20px 8px var(--active-yellow); transform: translate(-50%, -50%) scale(1.6); }
}

.bedroll-pulse-highlight { animation: pulse-glow-bedroll 1s infinite alternate; z-index: 30 !important; }
@keyframes pulse-glow-bedroll {
    0% { box-shadow: 0 0 5px 2px var(--active-yellow); transform: translate(-15px, 15px) scale(var(--br-scale, 1)); }
    100% { box-shadow: 0 0 20px 8px var(--active-yellow); transform: translate(-15px, 15px) scale(calc(var(--br-scale, 1) + 0.05)); }
}

/* Original Search Pulse (Used for Map Flags) */
.search-match-pulse { animation: searchPulse 1.5s infinite !important; background-color: var(--active-green) !important; z-index: 20 !important; }
@keyframes searchPulse {
    0% { box-shadow: 0 0 0 0 var(--active-green); transform: translate(-50%, -50%) scale(1); }
    70% { box-shadow: 0 0 0 15px transparent; transform: translate(-50%, -50%) scale(1.3); }
    100% { box-shadow: 0 0 0 0 transparent; transform: translate(-50%, -50%) scale(1); }
}

/* UPGRADE: Special Centered Pulse for the Main Backpack Image */
img#main-view-image.search-match-pulse {
    animation: packPulse 1.5s infinite !important;
    background-color: transparent !important; /* Removes the solid green square background */
}
@keyframes packPulse {
    0% { filter: drop-shadow(0 0 2px var(--active-green)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 15px var(--active-green)); transform: scale(1.03); }
    100% { filter: drop-shadow(0 0 2px var(--active-green)); transform: scale(1); }
}

/* Event Locks */
.guided-active-lock { pointer-events: none !important; }
.sidebar-locked { overflow: hidden !important; pointer-events: none !important; }
.sidebar-locked > #guided-search-module, .sidebar-locked > #standard-search-module { pointer-events: auto !important; }
.sidebar-locked #btn-map-mode, .sidebar-locked #btn-delete-flag { pointer-events: auto !important; }

.form-input {
    box-sizing: border-box;
}

/* UPGRADE: Search Settings Modal - Fat Thumb Options & Thumb Zone */
#search-cards-container {
    gap: 20px !important; 
    padding-bottom: 30px !important; 
}

#win-search-options .search-card {
    padding: 30px 15px !important; 
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    font-size: 1.1rem !important;
    line-height: 1.4 !important; 
}

#win-search-options > div:last-child {
    padding-bottom: 60px !important; 
}


/* Hide PacTrack specific workspaces so they don't bleed into FieldPac */
.pactrack-workspace-overlay,
.pactrack-fullscreen-workspace,
.pactrack-sidebar-workspace {
    display: none !important;
}