/**
 * Plugin Name: DAF Marketplace
 * File Name: widget-categories.css
 * Location: /wp-content/plugins/daf-marketplace/assets/front/widgets/widget-categories.css
 *
 * Purpose:
 * - Styles the marketplace categories and filter-style sidebar widget.
 * - Matches the approved premium screenshot direction with clean compact spacing.
 * - Keeps the categories widget styling fully isolated from other widgets.
 *
 * Responsibilities:
 * - Style category rows, colored icons, counts, price block, apply button, and bottom filter rows.
 * - Keep the widget crisp, lightweight, and premium.
 * - Avoid blur, glow, lift, and heavy shadow effects.
 *
 * Related Files:
 * - /wp-content/plugins/daf-marketplace/templates/marketplace/sidebar/widgets/widget-categories.php
 * - /wp-content/plugins/daf-marketplace/assets/front/layout.css
 *
 * Notes:
 * - Scoped only to .dafmp-market-widget--categories.
 * - No blur effects.
 * - No box shadows.
 * - Hover states use slightly darker tones of the same palette only.
 */

/* ----------------------------------------
 * Widget Shell
 * ---------------------------------------- */
.dafmp-market-widget--categories{
	border:1px solid #E2E8F0;
	border-radius:18px;
	background:#FFFFFF;
	overflow:hidden;
}

.dafmp-market-widget--categories .dafmp-market-widget__head{
	padding:20px 18px 0;
}

.dafmp-market-widget--categories .dafmp-market-widget__title{
	margin:0;
	color:#0F172A;
	font-size:16px;
	font-weight:800;
	line-height:1.3;
	letter-spacing:-.02em;
}

.dafmp-market-widget--categories .dafmp-market-widget__body{
	padding:16px 18px 18px;
}

/* ----------------------------------------
 * Category List
 * ---------------------------------------- */
.dafmp-market-widget--categories .dafmp-market-category-list{
	display:flex;
	flex-direction:column;
	gap:12px;
	margin:0;
	padding:0 0 18px;
	list-style:none;
	border-bottom:1px solid #E2E8F0;
}

.dafmp-market-widget--categories .dafmp-market-category-list__item{
	margin:0;
	padding:0;
}

.dafmp-market-widget--categories .dafmp-market-category-list__link{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:12px;
	color:#0F172A;
	text-decoration:none;
	transition:color .2s ease;
}

.dafmp-market-widget--categories .dafmp-market-category-list__link:hover{
	color:#111827;
}

.dafmp-market-widget--categories .dafmp-market-category-list__label-wrap{
	display:flex;
	align-items:center;
	gap:10px;
	min-width:0;
}

.dafmp-market-widget--categories .dafmp-market-category-list__name{
	min-width:0;
	color:inherit;
	font-size:14px;
	font-weight:700;
	line-height:1.35;
}

.dafmp-market-widget--categories .dafmp-market-category-list__count{
	flex:0 0 auto;
	color:#6B7280;
	font-size:13px;
	font-weight:500;
	line-height:1;
}

.dafmp-market-widget--categories .dafmp-market-category-list__item--active .dafmp-market-category-list__name{
	color:#0F172A;
}

/* ----------------------------------------
 * Category Icons
 * ---------------------------------------- */
.dafmp-market-widget--categories .dafmp-market-category-list__icon{
	position:relative;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	flex:0 0 16px;
	width:16px;
	height:16px;
}

.dafmp-market-widget--categories .dafmp-market-category-list__icon-shape,
.dafmp-market-widget--categories .dafmp-market-category-list__icon::before,
.dafmp-market-widget--categories .dafmp-market-category-list__icon::after{
	box-sizing:border-box;
}

/* Book */
.dafmp-market-widget--categories .dafmp-market-category-list__icon--book::before,
.dafmp-market-widget--categories .dafmp-market-category-list__icon--book::after{
	content:"";
	position:absolute;
	top:2px;
	bottom:2px;
	width:6px;
	border-radius:2px;
}

.dafmp-market-widget--categories .dafmp-market-category-list__icon--book::before{
	left:1px;
	background:#38BDF8;
}

.dafmp-market-widget--categories .dafmp-market-category-list__icon--book::after{
	right:1px;
	background:#7DD3FC;
}

/* Grid */
.dafmp-market-widget--categories .dafmp-market-category-list__icon--grid::before,
.dafmp-market-widget--categories .dafmp-market-category-list__icon--grid::after,
.dafmp-market-widget--categories .dafmp-market-category-list__icon--grid .dafmp-market-category-list__icon-shape{
	content:"";
	position:absolute;
	width:6px;
	height:6px;
	border-radius:1px;
	background:#84CC16;
}

.dafmp-market-widget--categories .dafmp-market-category-list__icon--grid::before{top:1px;left:1px}
.dafmp-market-widget--categories .dafmp-market-category-list__icon--grid::after{top:1px;right:1px}
.dafmp-market-widget--categories .dafmp-market-category-list__icon--grid .dafmp-market-category-list__icon-shape{bottom:1px;left:1px;box-shadow:8px 0 0 #A3E635}

/* Stack */
.dafmp-market-widget--categories .dafmp-market-category-list__icon--stack::before,
.dafmp-market-widget--categories .dafmp-market-category-list__icon--stack::after,
.dafmp-market-widget--categories .dafmp-market-category-list__icon--stack .dafmp-market-category-list__icon-shape{
	content:"";
	position:absolute;
	left:2px;
	right:2px;
	height:3px;
	border-radius:2px;
	background:#A78BFA;
}

.dafmp-market-widget--categories .dafmp-market-category-list__icon--stack::before{top:3px}
.dafmp-market-widget--categories .dafmp-market-category-list__icon--stack .dafmp-market-category-list__icon-shape{top:7px}
.dafmp-market-widget--categories .dafmp-market-category-list__icon--stack::after{top:11px}

/* Box */
.dafmp-market-widget--categories .dafmp-market-category-list__icon--box::before{
	content:"";
	position:absolute;
	inset:2px;
	border-radius:3px;
	background:#F59EAB;
}

.dafmp-market-widget--categories .dafmp-market-category-list__icon--box::after{
	content:"";
	position:absolute;
	top:5px;
	left:5px;
	width:6px;
	height:6px;
	border:1.5px solid rgba(255,255,255,.9);
	border-top-left-radius:6px;
	border-bottom-right-radius:6px;
	transform:rotate(45deg);
}

/* File */
.dafmp-market-widget--categories .dafmp-market-category-list__icon--file::before{
	content:"";
	position:absolute;
	inset:1px 2px;
	border-radius:2px;
	background:#9CA3AF;
}

.dafmp-market-widget--categories .dafmp-market-category-list__icon--file::after{
	content:"";
	position:absolute;
	top:4px;
	left:5px;
	width:6px;
	height:1px;
	background:#FFFFFF;
	box-shadow:0 3px 0 #FFFFFF,0 6px 0 #FFFFFF;
}

/* ----------------------------------------
 * Price Filter Block
 * ---------------------------------------- */
.dafmp-market-widget--categories .dafmp-market-filter-block{
	padding:18px 0 18px;
	border-bottom:1px solid #E2E8F0;
}

.dafmp-market-widget--categories .dafmp-market-filter-block__head{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:12px;
	margin-bottom:14px;
}

.dafmp-market-widget--categories .dafmp-market-filter-block__title{
	margin:0;
	color:#0F172A;
	font-size:14px;
	font-weight:800;
	line-height:1.3;
}

.dafmp-market-widget--categories .dafmp-market-filter-block__clear{
	color:#9CA3AF;
	font-size:13px;
	font-weight:500;
	text-decoration:none;
	transition:color .2s ease;
}

.dafmp-market-widget--categories .dafmp-market-filter-block__clear:hover{
	color:#6B7280;
}

.dafmp-market-widget--categories .dafmp-market-price-boxes{
	display:flex;
	align-items:center;
	gap:8px;
	margin-bottom:16px;
}

.dafmp-market-widget--categories .dafmp-market-price-box{
	display:inline-flex;
	align-items:center;
	justify-content:flex-start;
	min-width:80px;
	height:38px;
	padding:0 14px;
	border:1px solid #E5E7EB;
	border-radius:8px;
	background:#FFFFFF;
	color:#6B7280;
	font-size:13px;
	font-weight:500;
	line-height:1;
}

.dafmp-market-widget--categories .dafmp-market-price-separator{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	width:12px;
	color:#9CA3AF;
	font-size:12px;
	font-weight:700;
	line-height:1;
}

.dafmp-market-widget--categories .dafmp-market-filter-block__actions{
	display:block;
}

.dafmp-market-widget--categories .dafmp-market-filter-block__button{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	width:100%;
	min-height:42px;
	padding:0 16px;
	border:1px solid #7FA949;
	border-radius:10px;
	background:#86B04B;
	color:#FFFFFF;
	font-size:14px;
	font-weight:700;
	line-height:1;
	text-decoration:none;
	transition:background-color .2s ease,border-color .2s ease,color .2s ease;
}

.dafmp-market-widget--categories .dafmp-market-filter-block__button:hover{
	background:#789E43;
	border-color:#789E43;
	color:#FFFFFF;
}

/* ----------------------------------------
 * Bottom Filter Rows
 * ---------------------------------------- */
.dafmp-market-widget--categories .dafmp-market-filter-groups{
	display:flex;
	flex-direction:column;
	padding-top:14px;
}

.dafmp-market-widget--categories .dafmp-market-filter-row{
	border-bottom:1px solid transparent;
}

.dafmp-market-widget--categories .dafmp-market-filter-row:last-child{
	border-bottom:0;
}

.dafmp-market-widget--categories .dafmp-market-filter-row__toggle{
	display:flex;
	align-items:center;
	justify-content:space-between;
	width:100%;
	padding:14px 0;
	border:0;
	background:transparent;
	color:#0F172A;
	font-size:14px;
	font-weight:700;
	line-height:1.3;
	text-align:left;
	cursor:pointer;
}

.dafmp-market-widget--categories .dafmp-market-filter-row__toggle:hover{
	color:#111827;
}

.dafmp-market-widget--categories .dafmp-market-filter-row__label{
	display:block;
}

.dafmp-market-widget--categories .dafmp-market-filter-row__chevron{
	position:relative;
	display:inline-flex;
	flex:0 0 12px;
	width:12px;
	height:12px;
}

.dafmp-market-widget--categories .dafmp-market-filter-row__chevron::before,
.dafmp-market-widget--categories .dafmp-market-filter-row__chevron::after{
	content:"";
	position:absolute;
	top:5px;
	width:7px;
	height:1.5px;
	background:#4B5563;
	border-radius:999px;
}

.dafmp-market-widget--categories .dafmp-market-filter-row__chevron::before{
	left:0;
	transform:rotate(45deg);
}

.dafmp-market-widget--categories .dafmp-market-filter-row__chevron::after{
	right:0;
	transform:rotate(-45deg);
}

/* ----------------------------------------
 * Responsive
 * ---------------------------------------- */
@media (max-width:767px){
	.dafmp-market-widget--categories .dafmp-market-widget__head{
		padding:18px 17px 0;
	}

	.dafmp-market-widget--categories .dafmp-market-widget__body{
		padding:15px 17px 17px;
	}

	.dafmp-market-widget--categories .dafmp-market-price-box{
		min-width:74px;
		padding:0 12px;
	}
}

@media (max-width:479px){
	.dafmp-market-widget--categories .dafmp-market-widget__title{
		font-size:15px;
	}

	.dafmp-market-widget--categories .dafmp-market-category-list__name,
	.dafmp-market-widget--categories .dafmp-market-filter-row__toggle{
		font-size:13px;
	}

	.dafmp-market-widget--categories .dafmp-market-category-list__count,
	.dafmp-market-widget--categories .dafmp-market-filter-block__clear,
	.dafmp-market-widget--categories .dafmp-market-price-box{
		font-size:12px;
	}
}