/**
 * Amazing Feature Requests for EDD – front-end styles.
 *
 * Colours are driven entirely by CSS custom properties so the plugin can adapt
 * to light or dark websites. The active palette is selected by the skin class
 * on each block root: .fredd-skin-light, .fredd-skin-dark or .fredd-skin-auto
 * (auto follows the visitor's prefers-color-scheme).
 */

/* ---- Skins / palettes -------------------------------------------------- */

.fredd-skin { color: var(--fredd-text); }

/* Light palette (also the base for auto). */
.fredd-skin-light,
.fredd-skin-auto {
	--fredd-bg:#f8fafc;
	--fredd-card:#ffffff;
	--fredd-text:#1e293b;
	--fredd-muted:#64748b;
	--fredd-border:#e2e8f0;
	--fredd-accent:#2563eb;
	--fredd-accent-contrast:#ffffff;
	--fredd-accent-soft:rgba(37,99,235,.08);
	--fredd-danger:#dc2626;
	--fredd-success-bg:#ecfdf5; --fredd-success-text:#065f46; --fredd-success-border:#a7f3d0;
	--fredd-error-bg:#fef2f2;   --fredd-error-text:#991b1b;   --fredd-error-border:#fecaca;
	--fredd-info-bg:#eff6ff;    --fredd-info-text:#1e40af;    --fredd-info-border:#bfdbfe;
	color-scheme: light;
}

/* Dark palette. */
.fredd-skin-dark {
	--fredd-bg:#0f172a;
	--fredd-card:#1e293b;
	--fredd-text:#e2e8f0;
	--fredd-muted:#94a3b8;
	--fredd-border:#334155;
	--fredd-accent:#3b82f6;
	--fredd-accent-contrast:#ffffff;
	--fredd-accent-soft:rgba(59,130,246,.16);
	--fredd-danger:#f87171;
	--fredd-success-bg:#064e3b; --fredd-success-text:#6ee7b7; --fredd-success-border:#065f46;
	--fredd-error-bg:#450a0a;   --fredd-error-text:#fca5a5;   --fredd-error-border:#7f1d1d;
	--fredd-info-bg:#172554;    --fredd-info-text:#93c5fd;    --fredd-info-border:#1e40af;
	color-scheme: dark;
}

/* Auto: adopt the dark palette when the OS/browser prefers dark. */
.fredd-skin-auto { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
	.fredd-skin-auto {
		--fredd-bg:#0f172a;
		--fredd-card:#1e293b;
		--fredd-text:#e2e8f0;
		--fredd-muted:#94a3b8;
		--fredd-border:#334155;
		--fredd-accent:#3b82f6;
		--fredd-accent-soft:rgba(59,130,246,.16);
		--fredd-danger:#f87171;
		--fredd-success-bg:#064e3b; --fredd-success-text:#6ee7b7; --fredd-success-border:#065f46;
		--fredd-error-bg:#450a0a;   --fredd-error-text:#fca5a5;   --fredd-error-border:#7f1d1d;
		--fredd-info-bg:#172554;    --fredd-info-text:#93c5fd;    --fredd-info-border:#1e40af;
	}
}

/* ---- Notices ----------------------------------------------------------- */
.fredd-notice { padding:12px 16px; border-radius:6px; margin:0 0 16px; font-size:14px; }
.fredd-notice-success { background:var(--fredd-success-bg); color:var(--fredd-success-text); border:1px solid var(--fredd-success-border); }
.fredd-notice-error { background:var(--fredd-error-bg); color:var(--fredd-error-text); border:1px solid var(--fredd-error-border); }
.fredd-notice-info { background:var(--fredd-info-bg); color:var(--fredd-info-text); border:1px solid var(--fredd-info-border); }
.fredd-notice ul { margin:0; padding-left:18px; }

/* ---- Toolbar ----------------------------------------------------------- */
.fredd-toolbar { display:flex; justify-content:flex-end; margin:0 0 16px; }
.fredd-toolbar-top { margin:0 0 16px; }
.fredd-filters { display:flex; gap:16px; flex-wrap:wrap; }
.fredd-filter { display:flex; align-items:center; gap:6px; font-size:13px; color:var(--fredd-muted); }
.fredd-filter select { padding:4px 8px; background:var(--fredd-card); color:var(--fredd-text); border:1px solid var(--fredd-border); border-radius:6px; }

/* ---- List -------------------------------------------------------------- */
.fredd-list { list-style:none; margin:0; padding:0; }
.fredd-item { position:relative; padding:16px 116px 16px 16px; border:1px solid var(--fredd-border); border-radius:8px; margin:0 0 12px; background:var(--fredd-card); }

/* ---- Vote widget (thumb up / count / thumb down, top-right) ------------- */
.fredd-vote { position:absolute; top:24px; right:24px; display:inline-flex; flex-direction:row; align-items:center; gap:4px; padding:4px 8px; border:1px solid var(--fredd-border); border-radius:999px; background:var(--fredd-bg); }
.fredd-vote-btn { width:22px; height:22px; padding:0; border:none; background-color:var(--fredd-muted); cursor:pointer; font-size:0; line-height:0; -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; -webkit-mask-position:center; mask-position:center; -webkit-mask-size:18px 18px; mask-size:18px 18px; transition:transform .15s, background-color .15s; }
.fredd-vote-up { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2z'/%3E%3C/svg%3E"); }
.fredd-vote-down { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z'/%3E%3C/svg%3E"); }
.fredd-vote-up:hover, .fredd-vote-up.is-active { background-color:var(--fredd-accent); }
.fredd-vote-down:hover, .fredd-vote-down.is-active { background-color:var(--fredd-danger); }
.fredd-score { font-weight:700; font-size:14px; min-width:1.4em; text-align:center; color:var(--fredd-text); }
.fredd-vote-disabled .fredd-vote-btn { cursor:not-allowed; opacity:.45; }
.fredd-vote.is-loading { opacity:.6; pointer-events:none; }
.fredd-pulse { transform:scale(1.25); }

/* ---- Item body --------------------------------------------------------- */
.fredd-item-body { min-width:0; }
.fredd-item-title { margin:0 0 6px; font-size:17px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; color:var(--fredd-text); }
.fredd-item-title a { text-decoration:none; color:var(--fredd-text); }
.fredd-item-title a:hover { color:var(--fredd-accent); }
.fredd-item-excerpt { color:var(--fredd-muted); font-size:14px; margin:0 0 8px; }
.fredd-item-meta { display:flex; gap:16px; font-size:13px; color:var(--fredd-muted); }
.fredd-item-meta a { color:var(--fredd-muted); text-decoration:none; }
.fredd-item-meta a:hover { color:var(--fredd-accent); }

/* ---- Status badge ------------------------------------------------------ */
.fredd-badge { display:inline-block; padding:2px 10px; border-radius:999px; color:#fff; font-size:12px; font-weight:600; line-height:1.6; }

/* ---- Empty / pagination ------------------------------------------------ */
.fredd-empty { color:var(--fredd-muted); padding:24px; text-align:center; border:1px dashed var(--fredd-border); border-radius:8px; }
.fredd-pagination { display:flex; gap:6px; justify-content:center; margin-top:16px; flex-wrap:wrap; }
.fredd-pagination .page-numbers { padding:6px 12px; border:1px solid var(--fredd-border); border-radius:6px; text-decoration:none; color:var(--fredd-text); background:var(--fredd-card); }
.fredd-pagination .current { background:var(--fredd-accent); color:var(--fredd-accent-contrast); border-color:var(--fredd-accent); }

/* ---- Form -------------------------------------------------------------- */
.fredd-form-title { margin:0 0 12px; color:var(--fredd-text); }
.fredd-form .fredd-field { margin:0 0 14px; display:flex; flex-direction:column; gap:4px; }
.fredd-form label { font-weight:600; font-size:14px; color:var(--fredd-text); }
.fredd-form input[type=text],
.fredd-form input[type=email],
.fredd-form textarea,
.fredd-form select { width:100%; max-width:520px; padding:8px 10px; border:1px solid var(--fredd-border); border-radius:6px; font-size:14px; background:var(--fredd-card); color:var(--fredd-text); }
.fredd-form input::placeholder, .fredd-form textarea::placeholder { color:var(--fredd-muted); }
.fredd-form input:focus, .fredd-form textarea:focus, .fredd-form select:focus { outline:2px solid var(--fredd-accent-soft); border-color:var(--fredd-accent); }
.fredd-req { color:var(--fredd-danger); }
.fredd-hint { font-size:12px; color:var(--fredd-muted); }
.fredd-button { display:inline-block; background:var(--fredd-btn-bg, var(--fredd-accent)); color:var(--fredd-btn-color, var(--fredd-accent-contrast)); border:none; padding:10px 20px; border-radius:var(--fredd-btn-radius, 6px); font-size:14px; font-weight:600; cursor:pointer; }
.fredd-button:hover { filter:brightness(.95); }
.fredd-button.is-loading { opacity:.7; cursor:progress; }
.fredd-button-full { display:block; width:100%; text-align:center; }

/* Label layout: inline variant (top is the default stacked layout). */
.fredd-labels-inline .fredd-field { flex-direction:row; align-items:center; gap:12px; flex-wrap:wrap; }
.fredd-labels-inline .fredd-field > label { flex:0 0 160px; margin:0; }
.fredd-labels-inline .fredd-field input[type=text],
.fredd-labels-inline .fredd-field input[type=email],
.fredd-labels-inline .fredd-field input[type=file],
.fredd-labels-inline .fredd-field textarea,
.fredd-labels-inline .fredd-field select { flex:1 1 220px; max-width:none; }
.fredd-labels-inline .fredd-submit { justify-content:flex-start; }
.fredd-form-collapse { padding:16px; border:1px solid var(--fredd-border); border-radius:8px; background:var(--fredd-bg); margin:0 0 16px; }

/* ---- Single ------------------------------------------------------------ */
.fredd-single-header { display:flex; align-items:flex-start; gap:16px; flex-wrap:wrap; margin:0 0 16px; }
.fredd-single-meta { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.fredd-single-product { font-size:13px; color:var(--fredd-muted); text-decoration:none; }
.fredd-single-product:hover { color:var(--fredd-accent); }
.fredd-single-author { font-size:13px; color:var(--fredd-muted); }
.fredd-single-author strong { color:var(--fredd-text); font-weight:600; }

/* ---- Roadmap ----------------------------------------------------------- */
.fredd-roadmap { display:grid; grid-template-columns:repeat(var(--fredd-cols,3),1fr); gap:16px; }
.fredd-roadmap-col { background:var(--fredd-bg); border:1px solid var(--fredd-border); border-radius:8px; overflow:hidden; }
.fredd-roadmap-head { margin:0; padding:12px 14px; font-size:15px; border-top:3px solid var(--fredd-muted); background:var(--fredd-card); color:var(--fredd-text); display:flex; justify-content:space-between; align-items:center; }
.fredd-roadmap-count { background:var(--fredd-bg); color:var(--fredd-muted); border-radius:999px; padding:1px 9px; font-size:12px; font-weight:600; }
.fredd-roadmap-list { list-style:none; margin:0; padding:10px; }
.fredd-roadmap-card { background:var(--fredd-card); border:1px solid var(--fredd-border); border-radius:6px; padding:10px 12px; margin:0 0 10px; }
.fredd-roadmap-title { display:block; font-weight:600; text-decoration:none; margin:0 0 6px; color:var(--fredd-text); }
.fredd-roadmap-title:hover { color:var(--fredd-accent); }
.fredd-roadmap-meta { display:flex; gap:12px; font-size:12px; color:var(--fredd-muted); }
.fredd-roadmap-empty { padding:12px 14px; color:var(--fredd-muted); font-size:13px; }

@media (max-width:782px) {
	.fredd-roadmap { grid-template-columns:1fr; }
	/* Keep the vote pill in the corner but reduce reserved space. */
	.fredd-item { padding-right:100px; }
}

/* ---- Archive page (bundled template) ----------------------------------- */
.fredd-archive-page { background:var(--fredd-bg); color:var(--fredd-text); padding:32px 16px; }
.fredd-archive-container { max-width:900px; margin:0 auto; }
.fredd-archive-title { color:var(--fredd-text); margin:0 0 8px; }
.fredd-archive-desc { color:var(--fredd-muted); margin:0 0 20px; }

/* ---- Single page (bundled template) ------------------------------------ */
.fredd-single-page { background:var(--fredd-bg); color:var(--fredd-text); padding:32px 16px; }
.fredd-single-container { max-width:820px; margin:0 auto; }
.fredd-single-back a { color:var(--fredd-muted); text-decoration:none; font-size:14px; }
.fredd-single-back a:hover { color:var(--fredd-accent); }
.fredd-single-title { color:var(--fredd-text); margin:8px 0 16px; }
.fredd-single-article { position:relative; background:var(--fredd-card); border:1px solid var(--fredd-border); border-radius:8px; padding:24px; }
.fredd-single-content { color:var(--fredd-text); }
.fredd-single-content a { color:var(--fredd-accent); }
.fredd-single-page .comments-area { margin-top:2rem; }

/* ---- Single actions: follow / edit / withdraw -------------------------- */
.fredd-single-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:8px; width:100%; }
.fredd-follow { background:var(--fredd-card); color:var(--fredd-accent); border:1px solid var(--fredd-accent); border-radius:999px; padding:4px 14px; font-size:13px; font-weight:600; cursor:pointer; }
.fredd-follow.is-following { background:var(--fredd-accent); color:var(--fredd-accent-contrast); }
.fredd-follow-email-input { padding:4px 8px; border:1px solid var(--fredd-border); border-radius:6px; background:var(--fredd-card); color:var(--fredd-text); }
.fredd-follow-email-go { padding:4px 10px; border:none; border-radius:6px; background:var(--fredd-accent); color:var(--fredd-accent-contrast); cursor:pointer; }
.fredd-edit-link { font-size:13px; color:var(--fredd-muted); text-decoration:none; }
.fredd-edit-link:hover { color:var(--fredd-accent); }
.fredd-withdraw-form { display:inline; }
.fredd-withdraw-btn { background:none; border:none; color:var(--fredd-danger); font-size:13px; cursor:pointer; padding:5px 15px; border-radius:999px; }

/* ---- Admin response ---------------------------------------------------- */
.fredd-admin-response { background:var(--fredd-accent-soft); border-left:3px solid var(--fredd-accent); border-radius:6px; padding:12px 16px; margin:0 0 16px; }
.fredd-admin-response-label { display:block; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--fredd-accent); margin-bottom:4px; }

/* ---- Duplicate suggestions --------------------------------------------- */
.fredd-dedupe { border:1px solid var(--fredd-border); border-radius:8px; background:var(--fredd-bg); padding:12px; margin:0 0 14px; }
.fredd-dedupe-label { margin:0 0 8px; font-size:13px; font-weight:600; color:var(--fredd-muted); }
.fredd-dedupe-list { list-style:none; margin:0; padding:0; }
.fredd-dedupe-item { display:flex; align-items:center; gap:12px; padding:6px 0; }
.fredd-dedupe-item .fredd-vote { position:static; top:auto; right:auto; flex-direction:row; min-width:0; gap:4px; padding:2px 6px; }
.fredd-dedupe-item .fredd-score { font-size:13px; }

/* ---- Search filter ----------------------------------------------------- */
.fredd-filter-search input { padding:6px 10px; border:1px solid var(--fredd-border); border-radius:6px; background:var(--fredd-card); color:var(--fredd-text); min-width:180px; }

/* ---- Changelog --------------------------------------------------------- */
.fredd-changelog-version { margin:0 0 20px; }
.fredd-changelog-heading { margin:0 0 8px; padding-bottom:6px; border-bottom:1px solid var(--fredd-border); color:var(--fredd-text); }
.fredd-changelog-list { list-style:none; margin:0; padding:0; }
.fredd-changelog-item { display:flex; justify-content:space-between; gap:12px; padding:6px 0; }
.fredd-changelog-item a { text-decoration:none; color:var(--fredd-text); }
.fredd-changelog-item a:hover { color:var(--fredd-accent); }
.fredd-changelog-votes { color:var(--fredd-muted); font-size:13px; white-space:nowrap; }

/* ---- Top requests (compact / widget) ----------------------------------- */
.fredd-top { list-style:none; margin:0; padding:0; }
.fredd-top-item { display:flex; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--fredd-border); }
.fredd-top-item:last-child { border-bottom:none; }
.fredd-top-score { min-width:34px; text-align:center; font-weight:700; font-size:13px; background:var(--fredd-bg); border:1px solid var(--fredd-border); border-radius:6px; padding:2px 6px; color:var(--fredd-text); }
.fredd-top-title { text-decoration:none; color:var(--fredd-text); font-size:14px; }
.fredd-top-title:hover { color:var(--fredd-accent); }

/* Honeypot – belt & braces (also hidden inline). */
.fredd-hp { position:absolute !important; left:-9999px !important; height:0 !important; overflow:hidden !important; }
