/* QuickList Classifieds: theme-agnostic, scoped styles. Override the variables in your theme to rebrand. */
:root {
	--qlc-accent: #5b2bd9;
	--qlc-accent-ink: #fff;
	--qlc-gold: #f5b301;
	--qlc-ink: #16161d;
	--qlc-muted: #6b6b78;
	--qlc-line: #e4e4ea;
	--qlc-bg: #fff;
	--qlc-soft: #f6f5fb;
	--qlc-ok: #0f7b4b;
	--qlc-warn: #9a6400;
	--qlc-error: #b3261e;
	--qlc-radius: 14px;
}

.qlc, .qlc-form, .qlc-card, .qlc-topbar { box-sizing: border-box; color: var(--qlc-ink); font-size: 16px; line-height: 1.5; }
.qlc *, .qlc-form *, .qlc-card * { box-sizing: border-box; }

/* Buttons */
.qlc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	padding: .65em 1.1em; border-radius: 999px; border: 1px solid var(--qlc-line);
	background: var(--qlc-bg); color: var(--qlc-ink); font: inherit; font-weight: 600;
	text-decoration: none; cursor: pointer; line-height: 1.2; white-space: nowrap;
	transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.qlc-btn:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.qlc-btn:active { transform: translateY(1px); }
.qlc-btn-primary { background: var(--qlc-accent); border-color: var(--qlc-accent); color: var(--qlc-accent-ink); }
.qlc-btn-primary:hover { color: var(--qlc-accent-ink); filter: brightness(1.08); }
.qlc-btn-accent { background: var(--qlc-gold); border-color: var(--qlc-gold); color: #241a00; }
.qlc-btn-danger { color: var(--qlc-error); }
.qlc-btn-lg { padding: .9em 1.6em; font-size: 1.1em; width: 100%; }
.qlc-btn[disabled] { opacity: .6; cursor: progress; }

/* Top bar */
.qlc-topbar { display: flex; gap: 10px; align-items: center; margin: 0 0 20px; flex-wrap: wrap; }
.qlc-search { display: flex; flex: 1 1 280px; gap: 6px; margin: 0; }
.qlc-search input {
	flex: 1; min-width: 0; padding: .7em 1em; border: 1px solid var(--qlc-line); border-radius: 999px; font: inherit; background: var(--qlc-bg);
}

/* Notices */
.qlc-notice { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; font-weight: 500; }
.qlc-notice-ok { background: #e7f6ee; color: var(--qlc-ok); }
.qlc-notice-warn { background: #fff4dc; color: var(--qlc-warn); }
.qlc-notice-error { background: #fdecea; color: var(--qlc-error); }

/* Home directory */
.qlc-areas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.qlc-areas a { padding: .35em .9em; border-radius: 999px; background: var(--qlc-soft); text-decoration: none; color: var(--qlc-ink); font-size: .92em; }
.qlc-directory { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 24px; margin: 8px 0 32px; }
.qlc-section h3 { font-size: 1.05em; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--qlc-accent); }
.qlc-section h3 a { color: var(--qlc-ink); text-decoration: none; }
.qlc-section ul { list-style: none; margin: 0; padding: 0; }
.qlc-section li { margin: 2px 0; font-size: .95em; }
.qlc-section li a { color: var(--qlc-accent); text-decoration: none; }
.qlc-section li a:hover { text-decoration: underline; }
.qlc-count { color: var(--qlc-muted); font-size: .85em; }
.qlc-heading { font-size: 1.3em; margin: 8px 0 14px; }
.qlc-more, .qlc-empty { text-align: center; margin: 20px 0; }
.qlc-empty { padding: 32px 16px; background: var(--qlc-soft); border-radius: var(--qlc-radius); }

/* Cards */
.qlc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.qlc-card-item { background: var(--qlc-bg); border: 1px solid var(--qlc-line); border-radius: var(--qlc-radius); overflow: hidden; transition: box-shadow .15s ease, transform .15s ease; }
.qlc-card-item:hover { box-shadow: 0 6px 24px rgba(20,10,60,.10); transform: translateY(-2px); }
.qlc-card-item.is-featured { border-color: var(--qlc-gold); box-shadow: 0 0 0 2px rgba(245,179,1,.35); }
.qlc-card-link { display: block; color: inherit; text-decoration: none; }
.qlc-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--qlc-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.qlc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qlc-thumb-empty { font-size: 42px; opacity: .5; }
.qlc-pill { display: inline-block; padding: .2em .6em; border-radius: 999px; font-size: .75em; font-weight: 700; }
.qlc-thumb .qlc-pill { position: absolute; top: 8px; }
.qlc-pill-video { left: 8px; background: rgba(0,0,0,.72); color: #fff; }
.qlc-pill-featured { right: 8px; background: var(--qlc-gold); color: #241a00; }
.qlc-card-body { padding: 10px 12px 12px; }
.qlc-price { font-weight: 800; font-size: 1.05em; }
.qlc-price-lg { font-size: 1.6em; }
.qlc-card-title { font-size: .98em; font-weight: 500; margin: 2px 0 4px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qlc-card-meta { color: var(--qlc-muted); font-size: .85em; margin: 0; }
.qlc-featured { background: linear-gradient(180deg, #fff8e1, transparent); border-radius: var(--qlc-radius); padding: 12px; margin: 0 0 20px; }

/* Results */
.qlc-results-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.qlc-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.qlc-count-total { color: var(--qlc-muted); }
.qlc-filters { position: sticky; top: 16px; background: var(--qlc-soft); border-radius: var(--qlc-radius); padding: 14px; }
.qlc-filters summary { font-weight: 700; cursor: pointer; margin-bottom: 8px; }
.qlc-filters label { display: block; font-size: .9em; font-weight: 600; margin: 0 0 10px; }
.qlc-filters input:not([type=checkbox]), .qlc-filters select { display: block; width: 100%; margin-top: 4px; padding: .5em .6em; border: 1px solid var(--qlc-line); border-radius: 8px; font: inherit; font-weight: 400; background: var(--qlc-bg); }
.qlc-filters .qlc-check { font-weight: 500; }
.qlc-price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qlc-filters .qlc-btn { width: 100%; margin-top: 4px; }
.qlc-reset { display: block; text-align: center; margin-top: 8px; font-size: .85em; color: var(--qlc-muted); }
.qlc-pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 24px 0; }
.qlc-ad { grid-column: 1 / -1; text-align: center; padding: 8px; }
.qlc-ad-listing { margin: 24px 0; }

/* Forms */
.qlc-form { max-width: 680px; }
.qlc-field { margin: 0 0 18px; }
.qlc-field > label, .qlc-label { display: block; font-weight: 700; margin-bottom: 6px; }
.qlc-price-tag { display: inline-block; margin-left: 4px; padding: .1em .55em; border-radius: 999px; background: var(--qlc-gold); color: #241a00; font-size: .8em; font-weight: 700; }
.qlc-optional { font-weight: 400; color: var(--qlc-muted); font-size: .88em; }
.qlc-form input[type=text], .qlc-form input[type=email], .qlc-form input[type=url], .qlc-form input:not([type]), .qlc-form select, .qlc-form textarea, .qlc-inline-form input {
	width: 100%; padding: .75em .9em; border: 1.5px solid var(--qlc-line); border-radius: 10px; font: inherit; background: var(--qlc-bg); color: var(--qlc-ink);
}
.qlc-form input:focus, .qlc-form select:focus, .qlc-form textarea:focus { outline: none; border-color: var(--qlc-accent); box-shadow: 0 0 0 3px rgba(91,43,217,.15); }
.qlc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qlc-field-price { max-width: 100%; }
.qlc-help { color: var(--qlc-muted); font-size: .88em; margin: 6px 0 0; }
.qlc-error { color: var(--qlc-error); font-size: .9em; font-weight: 600; margin: 6px 0 0; }
.qlc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.qlc-drop {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	border: 2px dashed var(--qlc-line); border-radius: var(--qlc-radius); padding: 22px; text-align: center; cursor: pointer;
	background: var(--qlc-soft); color: var(--qlc-muted); font-weight: 600; transition: border-color .15s ease;
}
.qlc-drop:hover, .qlc-drop.is-over { border-color: var(--qlc-accent); color: var(--qlc-accent); }
.qlc-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.qlc-drop-icon { font-size: 28px; }
.qlc-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.qlc-previews img, .qlc-previews video { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--qlc-line); }
.qlc-previews video { width: 160px; }
.qlc-tabs { display: inline-flex; background: var(--qlc-soft); border-radius: 999px; padding: 3px; margin-bottom: 10px; }
.qlc-tab { border: 0; background: transparent; padding: .45em 1em; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; color: var(--qlc-muted); }
.qlc-tab.is-active { background: var(--qlc-bg); color: var(--qlc-ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.qlc-upsell {
	display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 6px 0 20px; cursor: pointer;
	border: 2px solid var(--qlc-gold); border-radius: var(--qlc-radius); background: #fffaeb;
}
.qlc-upsell input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--qlc-accent); }
.qlc-upsell span span { display: block; color: var(--qlc-muted); font-size: .9em; }
.qlc-total { font-weight: 700; text-align: center; margin: 0 0 8px; }
.qlc-submit .qlc-help { text-align: center; }

/* Verified members */
.qlc-verified { display: inline-flex; align-items: center; gap: .3em; padding: .2em .65em; border-radius: 999px; background: #e3f1ff; color: #0b5cad; font-weight: 700; font-size: .85em; white-space: nowrap; }
.qlc-verified-sm { font-size: .72em; padding: .1em .5em; margin: 0 0 4px; }
.qlc-perks { padding-left: 1.2em; margin: 10px 0 16px; }
.qlc-perks li { margin: 4px 0; }
.qlc-plans { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.qlc-plan { padding: 10px 14px; border: 1.5px solid var(--qlc-line); border-radius: 12px; }
.qlc-steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0; }
.qlc-steps li { counter-increment: step; position: relative; padding: 0 0 18px 42px; }
.qlc-steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--qlc-soft); color: var(--qlc-muted); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.qlc-steps li.is-current::before { background: var(--qlc-accent); color: #fff; }
.qlc-steps li.is-done::before { content: "✔"; background: #e7f6ee; color: var(--qlc-ok); }
.qlc-steps li > span:not(.qlc-verified) { display: block; color: var(--qlc-muted); }
.qlc-steps form { margin-top: 8px; }
.qlc-verify-upsell { margin: 10px 0 0; font-size: .92em; }

/* Photo editing */
.qlc-photo-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 10px; }
.qlc-photo-tile { border: 1px solid var(--qlc-line); border-radius: 10px; padding: 6px; background: var(--qlc-bg); font-size: .85em; }
.qlc-photo-tile img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; display: block; margin-bottom: 4px; }
.qlc-photo-tile label { display: flex; align-items: center; gap: 4px; font-weight: 500; }
.qlc-photo-tile:has(.qlc-photo-remove input:checked) { opacity: .45; border-color: var(--qlc-error); }
.qlc-photo-remove { color: var(--qlc-error); }
.qlc-drop-sm { padding: 12px; }

/* Messaging */
.qlc-inbox { margin: 16px 0; }
.qlc-inbox h3 { margin: 0 0 8px; }
.qlc-inbox ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--qlc-line); border-radius: 12px; overflow: hidden; }
.qlc-inbox li + li { border-top: 1px solid var(--qlc-line); }
.qlc-inbox a { display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px; align-items: center; padding: 10px 14px; color: inherit; text-decoration: none; }
.qlc-inbox a:hover { background: var(--qlc-soft); }
.qlc-inbox .is-unread { background: #f3efff; }
.qlc-unread { background: var(--qlc-accent); color: #fff; border-radius: 999px; padding: 0 .5em; font-size: .78em; font-weight: 700; }
.qlc-snippet { color: var(--qlc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qlc-chat { max-width: 720px; }
.qlc-chat-head { display: flex; gap: 12px; align-items: center; }
.qlc-chat-head h2 { margin: 0 0 2px; font-size: 1.2em; }
.qlc-chat-head h2 a { color: inherit; }
.qlc-chat-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.qlc-chat-label { margin: 0; color: var(--qlc-muted); font-size: .88em; }
.qlc-chat-safety { background: var(--qlc-soft); border-radius: 10px; padding: 8px 12px; font-size: .88em; margin: 14px 0; }
.qlc-chat-log { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }
.qlc-msg { max-width: 80%; }
.qlc-msg-body { padding: 10px 14px; border-radius: 16px; background: var(--qlc-soft); overflow-wrap: anywhere; }
.qlc-msg.is-mine { align-self: flex-end; }
.qlc-msg.is-mine .qlc-msg-body { background: var(--qlc-accent); color: #fff; border-bottom-right-radius: 4px; }
.qlc-msg.is-theirs .qlc-msg-body { border-bottom-left-radius: 4px; }
.qlc-msg-meta { font-size: .75em; color: var(--qlc-muted); margin-top: 3px; }
.qlc-msg.is-mine .qlc-msg-meta { text-align: right; }
.qlc-chat-form { display: flex; gap: 8px; align-items: flex-end; max-width: none; }
.qlc-chat-form textarea { flex: 1; }
.qlc-chat-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.qlc-chat-tools form { margin: 0; }

/* Manage page */
.qlc-card { background: var(--qlc-bg); border: 1px solid var(--qlc-line); border-radius: var(--qlc-radius); padding: 20px; margin: 0 0 20px; }
.qlc-card h2 { margin: 4px 0 6px; }
.qlc-status { display: inline-block; font-size: .8em; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .25em .7em; border-radius: 999px; background: var(--qlc-soft); margin: 0; }
.qlc-status-publish { background: #e7f6ee; color: var(--qlc-ok); }
.qlc-status-qlc_unpaid, .qlc-status-pending { background: #fff4dc; color: var(--qlc-warn); }
.qlc-status-qlc_expired { background: #fdecea; color: var(--qlc-error); }
.qlc-badge { background: var(--qlc-gold); color: #241a00; padding: .1em .5em; border-radius: 6px; font-weight: 700; }
.qlc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.qlc-actions form { margin: 0; }
.qlc-edit summary { cursor: pointer; font-weight: 600; color: var(--qlc-accent); margin: 8px 0; }
.qlc-inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.qlc-inline-form input { flex: 1 1 220px; }

/* Single listing */
.qlc-listing { margin-top: 8px; }
.qlc-crumbs { font-size: .9em; color: var(--qlc-muted); margin: 0 0 10px; }
.qlc-crumbs a { color: var(--qlc-accent); text-decoration: none; }
.qlc-listing-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.qlc-video { margin: 0 0 16px; border-radius: var(--qlc-radius); overflow: hidden; background: #000; }
.qlc-video .wp-video { width: 100% !important; }
.qlc-video video { width: 100%; max-height: 70vh; display: block; }
.qlc-video-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; display: block; border: 0; }
.qlc-gallery-main img { width: 100%; max-height: 70vh; object-fit: contain; background: var(--qlc-soft); border-radius: var(--qlc-radius); display: block; }
.qlc-gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; }
.qlc-thumb-btn { padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; flex: 0 0 auto; }
.qlc-thumb-btn.is-active { border-color: var(--qlc-accent); }
.qlc-thumb-btn img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.qlc-description { font-size: 1.05em; margin: 20px 0; white-space: normal; }
.qlc-contact h3 { margin-top: 0; }
.qlc-report { font-size: .9em; color: var(--qlc-muted); margin: 8px 0 24px; }
.qlc-report summary { cursor: pointer; }
.qlc-report form { display: flex; gap: 8px; margin-top: 8px; }

@media (max-width: 760px) {
	.qlc-results-layout { grid-template-columns: 1fr; }
	.qlc-filters { position: static; }
	.qlc-filters details:not([open]) summary { margin: 0; }
	.qlc-row { grid-template-columns: 1fr; gap: 0; }
	.qlc-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.qlc-directory { grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
	.qlc-section li { font-size: .9em; }
	.qlc-topbar .qlc-btn-primary { width: 100%; }
	.qlc-search { flex: 1 1 100%; min-width: 0; }
	.qlc-search input { width: auto; }
	.qlc-msg { max-width: 92%; }
}
