/* ==========================================================================
   AudioDaily — Tile Component
   ========================================================================== */

:root {
	--ad-tile-radius:       4px;
	--ad-tile-bg:           #fff;
	--ad-tile-text:         #1a1a1a;
	--ad-tile-muted:        #666;
	--ad-tile-hook:         #c0000d;
	--ad-tile-shadow:       0 2px 8px rgba(0, 0, 0, .10);
	--ad-tile-shadow-hover: 0 8px 24px rgba(0, 0, 0, .18);
	--ad-tile-transition:   .25s ease;

	/* Shelf colours — swap these when site palette is established */
	--ad-shelf-upper-bg:    #b8b4cc;
	--ad-shelf-lower-bg:    #edeaf6;
	--ad-shelf-upper-text:  #1a1828;
	--ad-shelf-lower-text:  #3a3850;
}

/* --------------------------------------------------------------------------
   Base card
   -------------------------------------------------------------------------- */

.ad-tile {
	position: relative;
	background: var(--ad-tile-bg);
	border-radius: var(--ad-tile-radius);
	overflow: hidden;
	box-shadow: var(--ad-tile-shadow);
	transition:
		box-shadow var(--ad-tile-transition),
		transform var(--ad-tile-transition);
}

.ad-tile:hover {
	box-shadow: var(--ad-tile-shadow-hover);
	transform: translateY(-3px);
}

.ad-tile__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* --------------------------------------------------------------------------
   Album art
   -------------------------------------------------------------------------- */

.ad-tile__art-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #111;
}

.ad-tile__art {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .5s ease;
}

.ad-tile:hover .ad-tile__art {
	transform: scale(1.05);
}

.ad-tile__art--placeholder {
	background: linear-gradient(135deg, #222 0%, #3a3a3a 100%);
}

/* --------------------------------------------------------------------------
   Overlay badge (top-left corner of art)
   -------------------------------------------------------------------------- */

.ad-tile__overlay {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 8px;
	border-radius: 2px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: #fff;
	line-height: 1.5;
	pointer-events: none;
}

.ad-tile__overlay--external   { background: #1a1a1a; }
.ad-tile__overlay--editorial  { background: #b5000d; }
.ad-tile__overlay--contextual {
	background: rgba(0, 0, 0, .50);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

/* --------------------------------------------------------------------------
   Text body — two-tone shelf
   -------------------------------------------------------------------------- */

.ad-tile__body {
	padding: 0;
}

.ad-tile__composer {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--ad-shelf-upper-text);
	background: var(--ad-shelf-upper-bg);
	margin: 0;
	padding: 6px 9px 5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ad-tile__work-title {
	font-weight: 700;
}

.ad-tile__performers {
	font-size: 11px;
	color: var(--ad-shelf-lower-text);
	background: var(--ad-shelf-lower-bg);
	margin: 0;
	padding: 4px 9px 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ad-tile__title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	margin: 0 0 6px;
	color: var(--ad-tile-text);
	/* clamp to 2 lines */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ad-tile__hook {
	font-size: 12px;
	font-style: italic;
	color: var(--ad-tile-hook);
	background: var(--ad-shelf-lower-bg);
	margin: 0;
	padding: 0 9px 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Metadata badges
   -------------------------------------------------------------------------- */

.ad-tile__badges {
	display: flex;
	gap: 5px;
	flex-wrap: wrap;
	background: var(--ad-shelf-lower-bg);
	padding: 0 9px 8px;
	margin: 0;
}

.ad-tile__badge {
	display: inline-block;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #fff;
	padding: 2px 6px;
	border-radius: 2px;
	line-height: 1.6;
}

.ad-tile__badge--atmos { background: #0071e3; }
.ad-tile__badge--hires { background: #5856d6; }

/* --------------------------------------------------------------------------
   Size variants
   -------------------------------------------------------------------------- */

/* Small — carousels, tight strips */
.ad-tile--small .ad-tile__composer   { font-size: 10px; padding: 4px 7px 3px; }
.ad-tile--small .ad-tile__performers { font-size: 10px; padding: 3px 7px 5px; }
.ad-tile--small .ad-tile__hook,
.ad-tile--small .ad-tile__badges     { display: none; }

/* Large — hero grid slots */
.ad-tile--large .ad-tile__body       { padding: 16px 18px 18px; }
.ad-tile--large .ad-tile__composer   { font-size: 12px; }
.ad-tile--large .ad-tile__performers { font-size: 14px; }
.ad-tile--large .ad-tile__title      { font-size: 18px; -webkit-line-clamp: 3; }
.ad-tile--large .ad-tile__hook       { font-size: 14px; }

/* --------------------------------------------------------------------------
   Grid helper (used by [audiodaily_tile_grid] shortcode)
   -------------------------------------------------------------------------- */

.ad-tile-grid {
	display: grid;
	gap: 20px;
}

.ad-tile-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.ad-tile-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.ad-tile-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.ad-tile-grid--cols-5 { grid-template-columns: repeat(5, 1fr); }
.ad-tile-grid--cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 900px) {
	.ad-tile-grid--cols-4,
	.ad-tile-grid--cols-5,
	.ad-tile-grid--cols-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
	.ad-tile-grid--cols-3,
	.ad-tile-grid--cols-4,
	.ad-tile-grid--cols-5,
	.ad-tile-grid--cols-6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
	.ad-tile-grid { grid-template-columns: 1fr; }
}
