/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1f2933 0, #05060a 55%, #020308 100%);
    color: #e5e7eb;
    min-height: 100vh;
}

/* HEADER */
header {
    padding: 16px 20px;
    border-bottom: 1px solid #111827;
    background: linear-gradient(90deg, #020617, #111827);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.logo-title h1 {
    font-size: 22px;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 12px;
    color: #9ca3af;
}

.top-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

select, button {
    padding: 6px 10px;
    background: #020617;
    color: #e5e7eb;
    border: 1px solid #374151;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

select:focus, button:focus {
    outline: 1px solid #facc15;
}

button:hover {
    background: #111827;
}

/*
.filters label {
    margin-right: 6px;
    font-size: 13px;
    cursor: pointer;
}
*/
.editor-btn {
    margin-left: auto;
    border-color: #facc15;
    color: #facc15;
}

/* MAIN LAYOUT */
main {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* MAP SECTION */
.map-section {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 8px;
    border: 1px solid #1f2937;
    padding: 10px;
}

.map-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #9ca3af;
}

.zoom-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.zoom-buttons button {
    width: 26px;
    height: 26px;
    padding: 0;
    text-align: center;
    font-weight: bold;
}

.hint {
    font-size: 12px;
    opacity: 0.8;
}

/* MAP CONTAINER */
#mapContainer {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 80vh;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #111827;
    background: #020617;
}

#mapWrapper {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
}
 /*
#radarImage {
    display: block;
    width: 100%;
    height: auto;
} 
 */



#radarImage {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    display: block;
} 



#markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* MARKERS */

/*
.marker {
    position: absolute;
	width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #020617;
    box-shadow: 0 0 6px rgba(0,0,0,0.7);
}
 
.marker.smoke {
    background: #22c55e;
    border-color: #14532d; 
}


.marker.flash {
    background: #3b82f6;
}

.marker.molotov {
    background: #ef4444;
}

.marker.he { 
	background: #ff7a00; 
	border-color: #b45309;
}


.marker:hover {
    transform: scale(1.15);
}





.marker:hover .marker-icon {
    transform: scale(1.35);
    filter: brightness(1.3);
    z-index: 9999;
}
*/

.marker {
    position: absolute;
    pointer-events: auto;
}

/* wygląd markera */
.marker-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #00000055;
    transition: transform 0.15s ease, filter 0.15s ease;
}

/* kolory granatów */
.marker.smoke .marker-icon {
    background: #22c55e;
    border-color: #14532d;
}

.marker.flash .marker-icon {
    background: #3b82f6;
}

.marker.molotov .marker-icon {
    background: #ef4444;
}

/* 🔥 HE pomarańczowy */
.marker.he .marker-icon {
    background: #ff7a00;
    border-color: #b45309;
}

.marker:hover .marker-icon {
    transform: scale(1.35);
    filter: brightness(1.3);
    z-index: 9999;
}

.marker.active-marker .marker-icon {
    transform: scale(1.45);
    filter: brightness(1.5);
    box-shadow: 0 0 12px rgba(255,255,255,0.6);
    z-index: 9999;
}

/*tooltip*/

.marker {
    position: absolute;
}

.marker-tooltip {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 35px;
	font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    border: 1px solid #334155;
}

.marker-tooltip img {
    width: 300px;
    height: auto;
    margin-top: 4px;
    border-radius: 4px;
}

.marker:hover .marker-tooltip {
    opacity: 1;
}
 

/* STAND POINT */
.stand-point {
    position: absolute;
/*	width: 14px;
    height: 14px;*/
    width: 24px;
    height: 24px;
    background: #facc15;
    border-radius: 50%;
    border: 2px solid #020617;
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.7);
}

/* SIDE PANEL */
.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 100%;
    height: 100%;  
    background: #020617;
    border-left: 1px solid #111827;
    padding: 16px;
    transform: translateX(100%);
    transition: transform 0.25s ease-out;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 10px;
	
	
 /*   overflow-y: auto; */
}
/*
.side-panel {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.side-header {
    flex-shrink: 0;
}
*/

/*

.panel-content {
    overflow-y: auto;
    min-height: 0;
}

*/
 
.side-header {
    flex-shrink: 0; /* header nie przewija się */
}

.panel-content {
    overflow-y: auto; /* przewijanie */
    overflow-x: hidden;
    flex-grow: 1;     /* zajmuje całą resztę miejsca */
    min-height: 0;    /* KLUCZOWE — pozwala się ścisnąć */
}

/* Chrome / Edge / Opera */
.panel-content::-webkit-scrollbar {
    width: 8px;
}

.panel-content::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 4px;
}

.panel-content::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Firefox */
.panel-content {
    scrollbar-width: thin;
    scrollbar-color: #334155 #0f172a;
}



.side-panel.visible {
    transform: translateX(0);
}

.side-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.side-header h2 {
    font-size: 18px;
}

.panel-type {
    font-size: 12px;
    color: #9ca3af;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: #9ca3af;
}

.panel-description {
    font-size: 13px;
    color: #d1d5db;
}

.panel-images {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.panel-images img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #1f2937;
}

.panel-info p {
    font-size: 13px;
    margin: 3px 0;
}

/* EDITOR PANEL */
.editor-panel {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 8px;
    border: 1px solid #1f2937;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editor-panel h2 {
    font-size: 16px;
    margin-bottom: 4px;
}

.editor-panel label {
    font-size: 13px;
    color: #d1d5db;
}

.editor-panel input,
.editor-panel textarea,
.editor-panel select {
    width: 100%;
    margin-top: 3px;
    margin-bottom: 6px;
    padding: 6px 8px;
    background: #020617;
    border: 1px solid #374151;
    border-radius: 4px;
    color: #e5e7eb;
    font-size: 13px;
}

.editor-panel textarea {
    min-height: 60px;
    resize: vertical;
}

.editor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 18px;
}

/* BUTTONS */
.primary-btn {
    background: #22c55e;
    border-color: #16a34a;
    color: #022c22;
    font-weight: 600;
}

.primary-btn:hover {
    background: #16a34a;
}

.editor-grid .primary-btn1 {
    align-self: center;
	
}
 

.primary-btn1 {
	background: #22c55e;
	border-color: #16a34a;
    color: #022c22;
    font-weight: 600;
}




.primary-btn1:hover {
    background: #16a34a;
}


.danger-btn {
    background: #b91c1c;
    border-color: #7f1d1d;
    color: #fee2e2;
    margin-top: 10px;
}

.danger-btn:hover {
    background: #dc2626;
}

.edit-marker {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #000;
    box-shadow: 0 0 10px rgba(255,255,255,0.9);
    z-index: 20;
}

.edit-marker.stand {
    background: #facc15; /* żółty */
}

.edit-marker.to {
    background: #38bdf8; /* jasny niebieski */
}


/* UTILS */
.hidden {
    display: none !important;
}

/* MOBILE */
@media (max-width: 768px) {
    header {
        padding: 12px;
    }

    .top-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    #mapContainer {
        height: 55vh;
    }

    .side-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid #111827;
    }
}

@media (max-width: 480px) {
    .marker {
        width: 22px;
        height: 22px;
    }

    .stand-point {
        width: 18px;
        height: 18px;
    }
}
 
/* filtry test */ 
 
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 6px 10px;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s, transform 0.1s;
}

.filter-btn.active {
    background: #475569;
    border-color: #64748b;
    opacity: 1;
}

.filter-btn:not(.active) {
    opacity: 0.35;
}

.filter-btn:active {
    transform: scale(0.97);
}

/* lineupy */

#linesLayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

 

.stand-line {
    position: absolute;
    background: yellow;
    height: 2px;
    transform-origin: 0 50%;
}




#showAllLinesBtn {
    margin-left: 20px; /* odstęp od lewej */
    padding: 8px 16px;
    background: #1e88e5; /* niebieski */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#showAllLinesBtn:hover {
    background: #1565c0; /* ciemniejszy niebieski */
}

#showAllLinesBtn:active {
    transform: scale(0.97);
}


#showGrenadeListBtn {
    margin-left: 40px; /* odstęp od lewej */
    padding: 8px 16px;
    background: #1e88e5; /* niebieski */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#showGrenadeListBtn:hover {
    background: #1565c0; /* ciemniejszy niebieski */
}

#showGrenadeListBtn:active {
    transform: scale(0.97);
}


/*
.stand-pointline {
    position: absolute;
    width: 10px;
    height: 10px;
    background: yellow;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
*/


.stand-pointline {
    position: absolute;
    width: 12px;
    height: 12px;
    background: yellow;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    cursor: pointer;
    transition: 0.15s ease;
	pointer-events: auto;
}
 

.stand-pointline.pick-mode {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 0, 0.7);
    box-shadow: 0 0 10px yellow;
}

/* duplikaty wybuchu */

.marker-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #1e88e5;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    z-index: 20;
}

.stand-select-point {
    position: absolute;
    width: 20px;
    height: 20px;
    background: yellow;
    border-radius: 50%;
    box-shadow: 0 0 10px yellow;
    cursor: pointer;
    z-index: 9999;
}


/* lista granatow */

.grenade-list {
    position: absolute;
    top: 80px;
    left: 20px;
    width: 260px;
    max-height: 70vh;
    overflow-y: auto;
    background: rgba(20,20,20,0.95);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px;
    z-index: 99999;
}

.grenade-list.hidden {
    display: none;
}

.grenade-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    margin-bottom: 6px;
    background: #222;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.15s;
}

.grenade-item:hover {
    background: #2f2f2f;
}

.grenade-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}
