/* =========================================================
   RESET & BASICS
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.5;
    font-family: sans-serif;
    background-image: url("images/gallerybg.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
}

/* Versteckte Items (Tag-Suche / Inactive-Filter) */
.hidden-item {
    display: none;
}

p {
    color: #000;
}


/* =========================================================
   LAYOUT CONTAINER
========================================================= */

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
}

/* Allgemeine Bilder in Karten */
img {
    object-fit: contain;
    max-height: 300px;
    vertical-align: middle;
}


/* =========================================================
   TOP-SEPARATOR & TOP-PICKS (optional)
========================================================= */

.top-separator {
    border: none;
    border-top: 2px solid #ccc;
    margin: 120px 0;
    width: 100%;
}

#topPicksContainer {
    margin-bottom: 20px;
}

#topPicksHeadline {
    font-size: 24px;
    margin-bottom: 10px;
}


/* -------------------------------------------------
   Filter-Header (grauer Balken oben)
--------------------------------------------------*/

.filter-header {
    width: 100%;
    background: rgba(90,90,90,0.4);
    padding: 10px 0 0 0;  /* oben etwas Luft, unten übernimmt die Navi */
    box-sizing: border-box;
}

/* obere Reihe: Checkboxen + Suche, zentriert in max-width-Container */
.filter-main-row {
    max-width: 1400px;
    margin: 0 auto 8px auto;  /* unten etwas Abstand vor der Navi */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* einzelne Blöcke (Checkbox + Label / Suche / Checkbox + Label) */
.filter-block {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #fff;
}

/* der mittlere Block mit dem Suchfeld – 50px Abstand links/rechts zu den anderen Blöcken */
.filter-block--search {
    margin: 0 50px;
}

/* Suchfeld selbst */
#tagSearch {
    height: 32px;
    min-width: 240px;
    font-size: 14px;
    padding: 4px 8px;
    border: 1px solid #666;
    border-radius: 4px;
	background: #111;
	color: #fff;
}




/* -------------------------------------------------
   Kapseln als Navi im grauen Balken (nach Tiers getrennt)
--------------------------------------------------*/

.gallery-filter.filter-nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex; 
    flex-direction: column;
	/* background: rgba(229,229,229,0.5); */
}

/* eine Zeile (Tier-Gruppe) */
.filter-line {
    display: flex;
    flex-wrap: wrap;
	margin-bottom: 20px;
	border-top: 1px solid #777;
	border-bottom: 1px solid #777;
	border-right: 1px solid #777;  /* Trenner nach rechts */
}

/* dünner Trenner zwischen den Zeilen */
.filter-line + .filter-line {
    /* border-top: 1px solid #e0e0e0; */
}

/* Basis-Design für Navi-Items */
.gallery-filter.filter-nav .filter-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    font-size: 11px;
    text-transform: uppercase;
    color: #fff;    
	background: none;
    border: none;
    border-right: 1px solid #777;  /* Trenner nach rechts */
    cursor: pointer;
}

/* linker Rahmen für das erste Element jeder Zeile */
.filter-line .filter-item:first-child {
    border-left: 1px solid #777;
}

/* aktive Items leicht hinterlegt */
.gallery-filter.filter-nav .filter-item.active {
    background: #d4d4d4;
	color:#000;
}

/* leichte Gewichtung für "bold"-Items */
.gallery-filter.filter-nav .filter-item.bold {
    font-weight: 600;
}

.tier1 {
	font-weight: bold;
	font-size: 16px !important;
}

.tier2 {
	font-weight: bold;
	font-size: 13px !important;
}

.tier3 {
	font-size: 11px !important;
}

.filter-nav .filter-item:hover {
    background: #888;          /* oder ein bisschen dunkler: #bbb */
    transition: background 0.15s ease-in-out;
}



/* -------------------------------------------------
   Galerie-Bereich
--------------------------------------------------*/

.gallery {
    width: 100%;
    display: block;
    min-height: 100vh;
    padding: 30px 0;
}

.gallery .gallery-item {
    border: 1px solid #ddd;
    background-color: #fff;
    min-height: 500px;
    width: 250px;
    padding: 10px;
    margin: 10px;
    box-shadow: 0 8px 8px #000;
}

/* Top-Items Container – bleibt wie gehabt */
.top-items-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.top-items-container .gallery-item {
    width: 420px;
}




/* Bilder in Karten */
.gallery .gallery-item-inner img {
    width: 100%;
    height: 200px;
    border: 1px solid #cbcbcb;
    padding: 5px;
}

.top-items-container .gallery-item-inner img {
    height: 240px;
}

/* Inaktive Items optisch abdunkeln */
.gallery .gallery-item.inactive {
    opacity: 0.2;
}

/* Show/Hide für JS-Filter */
.gallery .gallery-item.show {
    animation: fadeIn 0.5s ease;
}

.gallery .gallery-item.hide {
    display: none;
}


/* =========================================================
   TEXT & BADGES IN DEN KARTEN
========================================================= */

p.title {
    font-weight: bold;
    font-size: 24px;
    line-height: 24px;
    padding: 5px 0 0;
}

p.manufacturer {
    line-height: 12px;
    font-size: 10px;
    padding: 5px 0 0;
}

p.license {
    font-size: 10px;
    line-height: 12px;
    padding: 5px 0 0;
}

/* Lizenz-Tags */
span.owned {
    font-weight: bold;
    color: #0a0;
}

span.fls {
    font-weight: bold;
    color: #66d;
}

span.free {
    font-weight: bold;
    color: #aaa;
}

span.xxx {
    font-weight: bold;
    color: #f00;
}

span.ableton {
    font-weight: bold;
    color: #f60;
}

/* Tag-Liste im Plugin */
div.tags {
    font-size: 10px;
    padding: 10px 0;
}

span.tag {
    font-size: 9px;
    background: #ddd;
    border-radius: 15px;
    padding: 3px 8px;
    margin-right: 5px;
}

/* Beschreibungstext */
p.description {
    font-size: 11px;
    padding-top: 10px;
}


/* =========================================================
   RATING-STARS
========================================================= */

div.star,
div.starX {
    display: inline-block;
    width: 16px;
    height: 16px;
}

div.star {
    background: url("img/star.png");
}

div.starX {
    background: url("img/starX.png");
}

div.x0stars,
div.x1stars,
div.x2stars,
div.x3stars,
div.x4stars,
div.x5stars {
    display: inline-block;
    width: 80px;
    height: 16px;
    background-size: contain;
}

div.x0stars { background-image: url("img/0stars.png"); }
div.x1stars { background-image: url("img/1stars.png"); }
div.x2stars { background-image: url("img/2stars.png"); }
div.x3stars { background-image: url("img/3stars.png"); }
div.x4stars { background-image: url("img/4stars.png"); }
div.x5stars { background-image: url("img/5stars.png"); }


/* =========================================================
   ADMIN-KONTROLLEN
========================================================= */

div.controlSection {
    text-align: right;
}

a.editBtn {
    font-size: 10px;
    text-decoration: none;
    color: #777;
}

.admin-controls {
    text-align: right;
    padding: 0 15px 10px;
}


/* =========================================================
   SPEZIAL-FILTER FÜR BESTIMMTE KLASSEN (wie gehabt)
========================================================= */

.gallery-item.abletonfx,
.gallery-item.abletongen {
    display: none;
}

.gallery-item.flstudio,
.gallery-item.flstudiogen,
.gallery-item.flstudiofx {
    display: none !important;
}


/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes fadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}


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

@media (max-width: 991px) {
    .gallery .gallery-item {
        width: 45%;
    }

    .top-items-container .gallery-item {
        width: 90%;
    }
}

@media (max-width: 600px) {
    .gallery .gallery-item {
        width: 100%;
    }

    .top-items-container .gallery-item {
        width: 100%;
    }

    .gallery .gallery-filter .filter-item {
        margin-bottom: 10px;
    }
}


/* ================================================
   CUSTOM CHECKBOX (Modern, Rounded, Animated)
================================================ */

/* Grundzustand der Label-Optik */
.filter-block label {
    color: #777;
    font-weight: normal;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

/* Aktive Checkbox → fetter + weiß */
.filter-block input[type="checkbox"]:checked + label {
    color: #fff;
    font-weight: 700;
}



.filter-block input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #666;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: all 0.25s ease;
}

.filter-block input[type="checkbox"]:hover {
    border-color: #000;
}

.filter-block input[type="checkbox"]::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: #333;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.2);
    transition: 0.2s ease;
}

.filter-block input[type="checkbox"]:checked {
    border-color: #333;
    background: #fff;
}

.filter-block input[type="checkbox"]:checked::after {
    opacity: 1;
    transform: scale(1);
}



a.lb-next, a.lb-prev {
	display: none !important;
}



/* ==========================================
Styling der Edit-page
===========================================*/

body {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	margin: 0;
	padding: 40px 0;
	background-image: url("images/gallerybg.jpg");
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
	background-position: center;
}

.edit-wrapper {
	max-width: 800px;
	margin: 0 auto;
	background: #fff;
	border-radius: 10px;
	padding: 25px 30px 30px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.edit-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 20px;
}

.edit-header h1 {
	font-size: 22px;
	margin: 0;
}

.edit-header a.back-link {
	font-size: 12px;
	text-decoration: none;
	color: #666;
}

.edit-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 24px;
}

.edit-grid-full {
	grid-column: 1 / -1;
}

label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	margin-bottom: 4px;
	color: #555;
}

input[type="text"],
textarea,
select {
	width: 100%;
	font-size: 14px;
	padding: 6px 8px;
	border-radius: 4px;
	border: 1px solid #ccc;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	background: #fafafa;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
	border-color: #3a7bd5;
	box-shadow: 0 0 0 2px rgba(58,123,213,0.15);
	background: #fff;
}

textarea {
	min-height: 120px;
	resize: vertical;
}

.tag-row {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
}

.tag-row input[type="text"] {
	font-size: 12px;
}

.tag-row small {
	display: block;
	font-size: 10px;
	color: #999;
}

/* Checkbox-Pills für Tags 6–8 */
.flag-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 4px;
}

.checkbox-pill {
	position: relative;
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	font-size: 12px;
	user-select: none;
}

.checkbox-pill input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.checkbox-pill span {
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid #bbb;
	background: #f5f5f5;
	color: #555;
	transition: all 0.15s ease;
}

.checkbox-pill input:checked + span {
	background: #3a7bd5;
	color: #fff;
	border-color: #3a7bd5;
	box-shadow: 0 0 0 2px rgba(58,123,213,0.25);
}

.checkbox-pill span::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 3px;
	border: 1px solid currentColor;
	margin-right: 6px;
	background: transparent;
}

.checkbox-pill input:checked + span::before {
	background: #fff;
}

.form-footer {
	margin-top: 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.btn-primary {
	border: none;
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, #3a7bd5, #00d2ff);
	cursor: pointer;
	box-shadow: 0 6px 12px rgba(58,123,213,0.35);
	transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.15s ease;
}

.btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(58,123,213,0.45);
}

.btn-primary:active {
	transform: translateY(0);
	box-shadow: 0 4px 8px rgba(58,123,213,0.35);
	opacity: 0.9;
}

.small-hint {
	font-size: 11px;
	color: #888;
}

@media (max-width: 700px) {
	.edit-grid {
		grid-template-columns: 1fr;
	}

	.tag-row {
		grid-template-columns: 1fr 1fr;
	}
}