/* ================================================================
   Author Profile Pro — myCred Premium Module CSS
   ================================================================ */

/* ── Badges ──────────────────────────────────────────────────── */
.app-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .4px;
	line-height: 1.6;
	vertical-align: middle;
	margin-right: 6px;
	text-transform: uppercase;
}

.app-badge-top {
	background: #e53935;
	color: #fff;
}

.app-badge-featured {
	background: linear-gradient(135deg, #f9a825, #fb8c00);
	color: #fff;
}

/* ── Featured banner in single post ─────────────────────────── */
.app-featured-banner {
	margin-bottom: 14px;
}

/* ── Post class: sticky + featured styles ───────────────────── */
.app-post-featured {
	outline: 3px solid #fb8c00 !important;
	outline-offset: 3px;
	box-shadow: 0 0 0 6px rgba(251,140,0,.14), 0 4px 24px rgba(251,140,0,.28) !important;
	border-radius: 6px;
	position: relative;
}

/* Яркая полоска сверху поста */
.app-post-featured::before {
	content: '';
	display: block;
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: linear-gradient(90deg, #f9a825, #fb8c00);
	border-radius: 6px 6px 0 0;
	z-index: 2;
	pointer-events: none;
}

/* Внутренний элемент — article или .post зависит от темы */
.app-post-featured article,
.app-post-featured .post,
.app-post-featured .hentry,
.app-post-featured .type-post {
	border: 2px solid #fb8c00 !important;
	border-radius: 6px;
}

.app-post-sticky {
	outline: 3px solid #e53935 !important;
	outline-offset: 3px;
	box-shadow: 0 0 0 6px rgba(229,57,53,.12) !important;
}

.app-post-sticky article,
.app-post-sticky .post,
.app-post-sticky .hentry,
.app-post-sticky .type-post {
	border-left: 4px solid #e53935 !important;
}


/* ── Promotion panel (expands below each fp-row) ──────────────── */
.fp-promo-panel {
	background: #f8f9ff;
	border: 1px solid #d4d8f0;
	border-top: none;
	border-radius: 0 0 8px 8px;
	overflow: hidden;
	margin-bottom: 8px;
}

.fp-promo-inner {
	padding: 16px 18px 18px;
}

.fp-promo-balance {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
	font-size: 13px;
	color: #555;
}

.fp-promo-bal-val strong {
	color: #764ba2;
	font-size: 15px;
}

/* ── Promotion grid ──────────────────────────────────────────── */
.fp-promo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}

@media (max-width: 600px) {
	.fp-promo-grid { grid-template-columns: 1fr; }
}

/* ── Single promotion card ───────────────────────────────────── */
.fp-promo-card {
	background: #fff;
	border: 1px solid #e0e4f0;
	border-radius: 10px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	transition: box-shadow .2s, border-color .2s;
}

.fp-promo-card:hover {
	box-shadow: 0 2px 14px rgba(102,126,234,.14);
	border-color: #c5caee;
}

.fp-promo-card.fp-promo-active {
	border-color: #43a047;
	background: #f1f8f1;
}

.fp-promo-card-head {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.fp-promo-card-icon { font-size: 18px; }

.fp-promo-card-title {
	font-weight: 700;
	font-size: 13px;
	color: #333;
}

.fp-promo-tag {
	display: inline-block;
	background: #e8f5e9;
	color: #388e3c;
	border-radius: 20px;
	padding: 1px 8px;
	font-size: 11px;
	font-weight: 600;
	margin-left: auto;
}

.fp-promo-card-desc {
	font-size: 12px;
	color: #777;
	margin: 0;
	line-height: 1.5;
}

/* Duration buttons row */
.fp-promo-durations {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.fp-promo-dur-btn {
	flex: 1 1 60px;
	min-width: 60px;
	padding: 6px 4px;
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: #fff !important;
	border: none;
	border-radius: 7px;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	line-height: 1.3;
	transition: opacity .2s;
}
.fp-promo-dur-btn:hover { opacity: .88; }
.fp-promo-dur-btn small { display: block; font-weight: 400; font-size: 10px; opacity: .85; }

/* Remove promo button */
.fp-promo-rm {
	padding: 4px 10px;
	background: transparent;
	color: #c62828;
	border: 1px solid #ef9a9a;
	border-radius: 6px;
	font-size: 11px;
	cursor: pointer;
	transition: background .2s;
	align-self: flex-start;
}
.fp-promo-rm:hover { background: #ffebee; }

/* Paid content card specifics */
.fp-paid-settings { display: flex; flex-direction: column; gap: 8px; }

.fp-paid-label {
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: 12px;
	color: #555;
}

.fp-paid-label input[type="number"] {
	padding: 5px 8px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 13px;
	width: 100%;
	box-sizing: border-box;
}

.fp-paid-check {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #555;
	cursor: pointer;
}

.fp-paid-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.fp-promo-save-paid {
	padding: 6px 12px;
	background: #2196f3;
	color: #fff;
	border: none;
	border-radius: 7px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}
.fp-promo-save-paid:hover { background: #1976d2; }

/* ── Promotion notice / toast ─────────────────────────────────── */
.fp-promo-notice {
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	margin-top: 8px;
	display: none;
}
.fp-promo-notice.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.fp-promo-notice.error   { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* ── Paywall ──────────────────────────────────────────────────── */
.app-paywall {
	position: relative;
	margin-top: 4px;
}

.app-paywall-fade {
	height: 80px;
	background: linear-gradient(to bottom, transparent, #fff);
	margin-top: -80px;
	position: relative;
	z-index: 1;
}

.app-paywall-box {
	background: #fff;
	border: 1.5px solid #e0e4f0;
	border-radius: 14px;
	padding: 28px 24px;
	text-align: center;
	box-shadow: 0 4px 24px rgba(0,0,0,.07);
	position: relative;
	z-index: 2;
	max-width: 520px;
	margin: 0 auto;
}

.app-paywall-icon {
	font-size: 36px;
	margin-bottom: 10px;
}

.app-paywall-title {
	font-size: 18px;
	font-weight: 700;
	color: #222;
	margin: 0 0 18px;
}

/* CTA buttons in paywall */
.app-paywall-cta {
	display: block;
	width: 100%;
	max-width: 340px;
	margin: 8px auto;
	padding: 12px 20px;
	border-radius: 9px;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	border: none;
	transition: opacity .2s, transform .1s;
	text-decoration: none;
}
.app-paywall-cta:hover { opacity: .88; transform: translateY(-1px); }

.app-paywall-buy {
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: #fff !important;
}

.app-paywall-sub {
	background: #f1f3ff;
	color: #5c35d3;
	border: 1.5px solid #c5caee !important;
}

.app-paywall-premium {
	background: linear-gradient(135deg, #f9a825, #fb8c00);
	color: #fff !important;
}

.app-paywall-login {
	background: #f5f5f5;
	color: #333 !important;
	border: 1.5px solid #ddd !important;
}

.app-paywall-or {
	display: block;
	color: #999;
	font-size: 13px;
	margin: 4px 0;
}

/* Buy myCred link in paywall */
.app-paywall-buy-mc {
	display: inline-block;
	margin-top: 10px;
	font-size: 13px;
	color: #764ba2;
	text-decoration: underline;
}

/* ── Premium subscription button (author page) ─────────────── */
.app-premium-sub-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 18px;
	background: linear-gradient(135deg, #f9a825, #fb8c00);
	color: #fff !important;
	border: none;
	border-radius: 9px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	margin-left: 8px;
	transition: opacity .2s;
	vertical-align: middle;
}
.app-premium-sub-btn:hover { opacity: .88; }
.app-premium-sub-btn.app-premium-sub-active {
	background: linear-gradient(135deg, #66bb6a, #43a047);
	cursor: default;
}

/* ── Recommended widget ───────────────────────────────────────── */
.app-recommended-list,
.app-featured-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.app-rec-item {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.app-rec-thumb {
	flex: 0 0 64px;
}
.app-rec-thumb img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 7px;
	display: block;
}

.app-rec-body {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.app-rec-title {
	font-size: 13px;
	font-weight: 600;
	color: #222;
	text-decoration: none;
	line-height: 1.4;
}
.app-rec-title:hover { color: #764ba2; }

.app-rec-author {
	font-size: 11px;
	color: #888;
}

.app-feat-item {
	margin-bottom: 8px;
}

.app-feat-title {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #222;
	text-decoration: none;
	margin-bottom: 4px;
}
.app-feat-title:hover { color: #764ba2; }

/* ── Balance insufficient modal ──────────────────────────────── */
.app-mc-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.45);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.app-mc-modal {
	background: #fff;
	border-radius: 14px;
	padding: 28px 28px 22px;
	max-width: 400px;
	width: 90%;
	text-align: center;
	box-shadow: 0 8px 40px rgba(0,0,0,.18);
}

.app-mc-modal-icon { font-size: 40px; margin-bottom: 10px; }

.app-mc-modal-title {
	font-size: 18px;
	font-weight: 700;
	color: #222;
	margin: 0 0 10px;
}

.app-mc-modal-msg {
	font-size: 14px;
	color: #555;
	margin: 0 0 20px;
	line-height: 1.5;
}

.app-mc-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

.app-mc-modal-buy {
	padding: 10px 20px;
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

.app-mc-modal-close {
	padding: 10px 20px;
	background: #f0f0f0;
	color: #444;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	cursor: pointer;
}

/* ── Confirmation modal ──────────────────────────────────────── */
.app-mc-confirm-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.4);
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
}

.app-mc-confirm {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	max-width: 360px;
	width: 90%;
	text-align: center;
	box-shadow: 0 6px 30px rgba(0,0,0,.16);
}

.app-mc-confirm p {
	font-size: 15px;
	color: #333;
	margin: 0 0 18px;
	line-height: 1.5;
}

.app-mc-confirm-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
}

.app-mc-confirm-ok {
	padding: 9px 22px;
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.app-mc-confirm-cancel {
	padding: 9px 22px;
	background: #f0f0f0;
	color: #444;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	cursor: pointer;
}

/* ── Comments locked notice ──────────────────────────────────── */
.app-comments-locked {
	background: #fff8e1;
	border: 1px solid #ffe082;
	border-radius: 8px;
	padding: 14px 18px;
	font-size: 14px;
	color: #795548;
	text-align: center;
	margin: 16px 0;
}
