/* ══════════════════════════════════════════════════════════════
   TICKCLIP AI Affiliate Post Generator — Admin Styles
   ══════════════════════════════════════════════════════════════ */

.tc-pg { max-width: 960px; margin: 20px auto 40px; }
.tc-pg__title {
	font-size: 1.7rem; font-weight: 800; color: #0f172a;
	margin-bottom: 2px; letter-spacing: -0.3px;
}
.tc-pg__sub { color: #64748b; font-size: 0.92rem; margin-bottom: 1.6rem; line-height: 1.5; }

/* ── Panel ─────────────────────────────────────────────────── */
.tc-pg__panel {
	background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
	padding: 28px 28px 24px; margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ── Input Area ────────────────────────────────────────────── */
.tc-pg__input-area {
	display: grid; grid-template-columns: 1fr auto 1fr;
	gap: 20px; align-items: stretch;
}
.tc-pg__input-grid {
	display: grid; grid-template-columns: 1fr;
	gap: 14px; align-items: stretch;
}
.tc-pg__input-grid .tc-pg__paste { grid-column: 1 / -1; }
.tc-pg__camera-zone { display: none !important; }
.tc-pg__url-asin-row {
	grid-column: 1 / -1;
	display: grid; grid-template-columns: 1fr auto;
	gap: 14px; align-items: end;
}
@media (max-width: 600px) {
	.tc-pg__camera-zone { display: flex !important; }
	.tc-pg__url-asin-row { grid-template-columns: 1fr; }
}
.tc-pg__or {
	display: flex; align-items: center; justify-content: center;
	color: #94a3b8; font-size: 0.72rem; font-weight: 800;
	letter-spacing: 2px; text-transform: uppercase;
}

/* ── Dropzone (screenshot) ────────────────────────────────── */
.tc-pg__dropzone,
.tc-pg__camera-zone {
	border: 2px dashed #cbd5e1; border-radius: 14px;
	padding: 28px 18px; text-align: center; cursor: pointer;
	transition: all 0.25s ease; background: #fafbfc;
	min-height: 160px; display: flex; flex-direction: column;
	align-items: center; justify-content: center; position: relative;
	overflow: hidden;
}
.tc-pg__dropzone:hover,
.tc-pg__dropzone--active {
	border-color: #3b82f6; background: #eff6ff;
	box-shadow: 0 0 0 4px rgba(59,130,246,0.08);
}
.tc-pg__camera-zone:hover {
	border-color: #059669; background: #ecfdf5;
	box-shadow: 0 0 0 4px rgba(5,150,105,0.08);
}
.tc-pg__camera-zone--active {
	border-color: #059669; border-style: solid; background: #000;
}
.tc-pg__dz-icon { font-size: 2.4rem; margin-bottom: 8px; filter: grayscale(0.3); }
.tc-pg__dz-text {
	font-size: 0.82rem; color: #475569; line-height: 1.5;
}
.tc-pg__dz-text strong { color: #0f172a; display: block; font-size: 0.88rem; margin-bottom: 2px; }

#tc-pg-thumb, #tc-pg-photo-thumb {
	max-width: 100%; max-height: 200px; border-radius: 10px;
	object-fit: contain; margin-top: 8px;
}

/* ── Camera Actions ───────────────────────────────────────── */
.tc-pg__cam-actions {
	display: flex; gap: 8px; margin-top: 10px; justify-content: center;
}
.tc-pg__camera-btn {
	padding: 8px 18px; border-radius: 10px; border: 1px solid #e2e8f0;
	background: #fff; font-size: 0.82rem; font-weight: 700; cursor: pointer;
	transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px;
}
.tc-pg__camera-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.tc-pg__camera-btn--snap {
	background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
	color: #fff !important; border: none !important; padding: 10px 28px;
	font-size: 0.92rem; border-radius: 50px; animation: tc-pulse 1.5s infinite;
}
.tc-pg__camera-btn--snap:hover { opacity: 0.9; }
.tc-pg__camera-btn--cancel {
	background: #f1f5f9; border-color: #cbd5e1; font-size: 0.92rem;
	width: 36px; height: 36px; padding: 0; display: flex;
	align-items: center; justify-content: center; border-radius: 50%;
}
@keyframes tc-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
	50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* ── Paste ─────────────────────────────────────────────────── */
.tc-pg__paste {
	width: 100%; border: 1px solid #e2e8f0; border-radius: 12px;
	padding: 16px 18px; font-family: 'SF Mono', Monaco, Consolas, monospace;
	font-size: 0.82rem; color: #334155; background: #f8fafc;
	resize: vertical; transition: border-color 0.2s, box-shadow 0.2s;
	min-height: 200px; line-height: 1.6;
}
.tc-pg__paste:focus {
	border-color: #3b82f6; outline: none;
	box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.tc-pg__paste::placeholder { color: #94a3b8; }

/* ── Actions ───────────────────────────────────────────────── */
.tc-pg__actions {
	display: flex; gap: 12px; align-items: center;
	justify-content: flex-end; margin-top: 20px;
}
.tc-pg__select {
	padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 10px;
	font-size: 0.88rem; color: #1e293b; background: #fff; font-weight: 600;
}
.tc-pg__actions .button-hero {
	font-size: 0.95rem !important; padding: 10px 32px !important;
	border-radius: 12px !important; font-weight: 700 !important;
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
	border: none !important; color: #fff !important;
	box-shadow: 0 4px 14px rgba(37,99,235,0.3) !important;
	transition: all 0.2s ease !important; text-transform: none !important;
	height: auto !important; line-height: 1.4 !important;
}
.tc-pg__actions .button-hero:hover {
	transform: translateY(-1px) !important;
	box-shadow: 0 6px 20px rgba(37,99,235,0.4) !important;
}
.tc-pg__actions .button-hero:disabled {
	opacity: 0.6 !important; cursor: not-allowed !important;
	transform: none !important;
}

/* ── Status ────────────────────────────────────────────────── */
.tc-pg__status {
	margin-top: 16px; padding: 14px 18px; border-radius: 12px;
	font-size: 0.88rem; font-weight: 500; display: flex;
	align-items: center; gap: 10px;
}
.tc-pg__status--loading { background: #eff6ff; color: #1d4ed8; }
.tc-pg__status--error { background: #fef2f2; color: #991b1b; }

/* ── Spinner ───────────────────────────────────────────────── */
.tc-pg__spinner-wrap {
	position: relative; width: 20px; height: 20px; flex-shrink: 0;
}
.tc-pg__spinner {
	display: block; width: 20px; height: 20px;
	border: 2.5px solid #bfdbfe; border-top-color: #2563eb;
	border-radius: 50%; animation: tc-pg-spin 0.7s linear infinite;
}
.tc-pg__spinner-ring {
	position: absolute; top: 3px; left: 3px;
	width: 14px; height: 14px;
	border: 2px solid transparent; border-bottom-color: #60a5fa;
	border-radius: 50%; animation: tc-pg-spin 1.2s linear infinite reverse;
}
@keyframes tc-pg-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   RESULTS
   ══════════════════════════════════════════════════════════════ */

/* ── Product Card ──────────────────────────────────────────── */
.tc-pg__product { overflow: hidden; }
.tc-pg__prod-inner { display: flex; gap: 24px; align-items: flex-start; }
.tc-pg__prod-img {
	width: 140px; height: 140px; object-fit: contain; border-radius: 12px;
	background: #f8fafc; border: 1px solid #f1f5f9; flex-shrink: 0;
}
.tc-pg__prod-info { flex: 1; min-width: 0; }
.tc-pg__prod-name { margin: 0 0 10px; font-size: 1.2rem; font-weight: 700; color: #0f172a; }

.tc-pg__prod-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tc-pg__tag {
	background: #dbeafe; color: #1e40af; border-radius: 6px;
	padding: 3px 10px; font-size: 0.72rem; font-weight: 700;
	letter-spacing: 0.3px;
}
.tc-pg__tag--cat { background: #e0e7ff; color: #3730a3; }
.tc-pg__tag--deal { background: #fef3c7; color: #92400e; }
.tc-pg__tag--verified { background: #d1fae5; color: #065f46; }

.tc-pg__prod-pricing {
	display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.tc-pg__price { font-weight: 800; color: #059669; font-size: 1.3rem; }
.tc-pg__price-orig { text-decoration: line-through; color: #94a3b8; font-size: 0.95rem; }
.tc-pg__discount {
	background: #dc2626; color: #fff; border-radius: 6px;
	padding: 2px 10px; font-size: 0.75rem; font-weight: 800;
}

.tc-pg__features { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tc-pg__feature {
	background: #f1f5f9; color: #475569; border-radius: 6px;
	padding: 3px 10px; font-size: 0.72rem;
}

/* ── Promo Code Banner ─────────────────────────────────────── */
.tc-pg__promo {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	border: 2px dashed #f59e0b; border-radius: 10px;
	padding: 10px 16px; margin: 10px 0 6px;
}
.tc-pg__promo-label {
	font-size: 0.65rem; font-weight: 800; color: #92400e;
	letter-spacing: 1.5px; text-transform: uppercase;
}
.tc-pg__promo-code {
	font-family: 'SF Mono', Monaco, Consolas, monospace;
	font-size: 1.1rem; font-weight: 900; color: #92400e;
	background: #fff; border-radius: 6px; padding: 3px 14px;
	border: 1px solid #f59e0b; letter-spacing: 1px;
}
.tc-pg__promo-value {
	font-size: 0.82rem; font-weight: 700; color: #059669;
	background: #d1fae5; border-radius: 6px; padding: 2px 10px;
}
.tc-pg__promo-copy {
	margin-left: auto !important; border-radius: 6px !important;
	font-weight: 700 !important; font-size: 0.72rem !important;
}

/* ── Instructions ──────────────────────────────────────────── */
.tc-pg__instructions {
	background: #eff6ff; color: #1d4ed8; padding: 8px 14px;
	border-radius: 8px; font-size: 0.82rem; font-weight: 600;
	margin-bottom: 6px; border-left: 3px solid #3b82f6;
}

/* ── Discount Breakdown ────────────────────────────────────── */
.tc-pg__discount-details {
	background: #f0fdf4; color: #065f46; padding: 8px 14px;
	border-radius: 8px; font-size: 0.82rem; font-weight: 600;
	margin-bottom: 6px; border-left: 3px solid #059669;
}

/* ── Stacking Info ─────────────────────────────────────────── */
.tc-pg__stacking {
	background: #faf5ff; color: #6b21a8; padding: 8px 14px;
	border-radius: 8px; font-size: 0.82rem; font-weight: 600;
	margin-bottom: 6px; border-left: 3px solid #9333ea;
}

/* ── Conditions ────────────────────────────────────────────── */
.tc-pg__conditions {
	background: #fff7ed; color: #9a3412; padding: 8px 14px;
	border-radius: 8px; font-size: 0.82rem; font-weight: 500;
	margin-bottom: 6px; border-left: 3px solid #f97316;
}

/* ── Free Extras ───────────────────────────────────────────── */
.tc-pg__free-extras {
	background: #ecfdf5; color: #065f46; padding: 8px 14px;
	border-radius: 8px; font-size: 0.82rem; font-weight: 600;
	margin-bottom: 6px; border-left: 3px solid #10b981;
}

/* ── Source Credit ──────────────────────────────────────────── */
.tc-pg__source-credit {
	background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
	color: #4338ca; padding: 10px 16px; border-radius: 10px;
	font-size: 0.85rem; font-weight: 500; margin-top: 10px;
	border: 1px solid #c7d2fe; display: flex; align-items: center; gap: 6px;
}
.tc-pg__source-credit strong { font-weight: 800; color: #3730a3; }
.tc-pg__source-icon { font-size: 1rem; }

.tc-pg__urgency {
	background: #fef3c7; color: #92400e; padding: 6px 12px;
	border-radius: 8px; font-size: 0.82rem; font-weight: 600;
	display: inline-block; margin-top: 4px;
}

.tc-pg__asin-bar {
	margin-top: 16px; padding-top: 14px; border-top: 1px solid #f1f5f9;
	font-size: 0.78rem; color: #64748b;
}
.tc-pg__asin-bar code {
	background: #f1f5f9; padding: 2px 8px; border-radius: 4px;
	font-weight: 700; color: #334155; font-size: 0.82rem;
}

/* ── Links ─────────────────────────────────────────────────── */
.tc-pg__links h3 {
	margin: 0 0 16px; font-size: 1rem; font-weight: 700; color: #0f172a;
}
.tc-pg__link-row { margin-bottom: 14px; }
.tc-pg__link-row:last-child { margin-bottom: 0; }
.tc-pg__link-row label {
	display: block; font-size: 0.72rem; font-weight: 700;
	color: #64748b; text-transform: uppercase; letter-spacing: 0.8px;
	margin-bottom: 6px;
}
.tc-pg__link-box { display: flex; gap: 8px; }
.tc-pg__link-input {
	flex: 1; padding: 11px 14px; border: 1px solid #e2e8f0; border-radius: 10px;
	font-family: 'SF Mono', Monaco, Consolas, monospace;
	font-size: 0.82rem; color: #1e293b; background: #f8fafc;
}
.tc-pg__link-input--short {
	background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
	border-color: #86efac; color: #065f46; font-weight: 700;
}

.tc-pg__copy {
	border-radius: 10px !important; font-weight: 600 !important;
	min-width: 72px; transition: all 0.2s;
}
.tc-pg__copy--done { color: #059669 !important; border-color: #059669 !important; }

/* ── Social Posts ──────────────────────────────────────────── */
.tc-pg__posts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.tc-pg__post-card {
	border: 1px solid #e2e8f0; border-radius: 12px;
	overflow: hidden; background: #fff;
	transition: box-shadow 0.2s, transform 0.2s;
}
.tc-pg__post-card:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,0.06);
	transform: translateY(-1px);
}

.tc-pg__post-header {
	display: flex; align-items: center; gap: 8px;
	padding: 10px 14px; background: #f8fafc;
	border-bottom: 1px solid #f1f5f9;
}
.tc-pg__post-icon { font-size: 1.1rem; }
.tc-pg__post-platform { font-weight: 700; font-size: 0.82rem; color: #0f172a; flex: 1; }
.tc-pg__post-copy {
	font-size: 0.72rem !important; border-radius: 6px !important;
	font-weight: 600 !important; transition: all 0.2s;
}
.tc-pg__post-copy--done { color: #059669 !important; }

.tc-pg__post-body {
	padding: 16px; font-size: 0.85rem; color: #334155; line-height: 1.65;
	white-space: pre-wrap; word-break: break-word;
	max-height: 220px; overflow-y: auto;
}

/* ── Reset ─────────────────────────────────────────────────── */
#tc-pg-reset {
	border-radius: 10px !important; padding: 8px 28px !important;
	font-weight: 600 !important;
}

/* ── Extra Inputs (URL + ASIN) ─────────────────────────────── */
.tc-pg__extra-inputs {
	grid-column: 1 / -1; margin-top: 16px;
	padding-top: 16px; border-top: 1px dashed #e2e8f0;
}
.tc-pg__input-row label {
	font-size: 0.72rem; font-weight: 700; color: #64748b;
	text-transform: uppercase; letter-spacing: 0.8px;
}

/* ── AI-Generated Image ───────────────────────────────────── */
.tc-pg__ai-img-loading {
	display: flex; align-items: center; gap: 12px;
	padding: 16px; color: #64748b; font-size: 0.9rem;
}
.tc-pg__ai-img-result { text-align: center; }
.tc-pg__ai-img-badge {
	display: inline-block; background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
	color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 0.68rem;
	font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 14px;
}
.tc-pg__ai-img {
	width: 100%; max-width: 480px; border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.1);
	margin: 0 auto 14px; display: block;
}
.tc-pg__ai-img-actions {
	display: flex; justify-content: center; gap: 10px; margin-bottom: 10px;
}
.tc-pg__ai-img-btn {
	display: inline-block; padding: 8px 20px; border-radius: 10px;
	font-weight: 700; font-size: 0.82rem; text-decoration: none;
	cursor: pointer; transition: all 0.2s;
	background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
	color: #fff; border: none;
}
.tc-pg__ai-img-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(99,102,241,0.3); }
.tc-pg__ai-img-btn--copy {
	background: #fff; color: #6366f1; border: 1px solid #c7d2fe;
}
.tc-pg__ai-img-btn--copy:hover { background: #f5f3ff; }
.tc-pg__ai-img-note {
	font-size: 0.78rem; color: #8b5cf6; margin: 0;
	font-weight: 500; font-style: italic;
}

/* ── Sample Post Preview ──────────────────────────────────── */
.tc-pg__sample-post {
	margin-top: 24px; border: 1px solid #e2e8f0; border-radius: 14px;
	overflow: hidden; background: #f8fafc;
}
.tc-pg__sample-post-header {
	display: flex; align-items: center; gap: 8px;
	padding: 12px 16px; background: #fff;
	border-bottom: 1px solid #f1f5f9;
}
.tc-pg__sample-post-preview { }
.tc-pg__sample-post-img {
	width: 100%; display: block;
	border-bottom: 1px solid #f1f5f9;
}
.tc-pg__sample-post-text {
	padding: 16px; font-size: 0.88rem; color: #334155;
	line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.tc-pg__sample-copy {
	font-size: 0.72rem !important; border-radius: 6px !important;
	font-weight: 600 !important;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 782px) {
	.tc-pg { margin: 10px; }
	.tc-pg__input-area { grid-template-columns: 1fr; }
	.tc-pg__or { margin: 4px 0; }
	.tc-pg__posts { grid-template-columns: 1fr; }
	.tc-pg__actions { flex-direction: column; align-items: stretch; }
	.tc-pg__prod-inner { flex-direction: column; }
	.tc-pg__prod-img { width: 100%; height: auto; max-height: 200px; }
	.tc-pg__link-box { flex-direction: column; }
	.tc-pg__extra-inputs { grid-column: 1; }
	.tc-pg__ai-img { max-width: 100%; }
	.tc-pg__ai-img-actions { flex-direction: column; align-items: center; }
	.tc-pg__feed-grid { grid-template-columns: 1fr !important; }
}

/* ── Community Feed ── */
.tc-pg__feed-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
}
.tc-pg__feed-card {
	display: flex; align-items: center; gap: 12px;
	padding: 10px 14px; background: #f8fafc; border: 1px solid #e2e8f0;
	border-radius: 12px; transition: box-shadow 0.2s;
}
.tc-pg__feed-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.tc-pg__feed-img {
	width: 56px; height: 56px; object-fit: contain; border-radius: 8px;
	background: #fff; flex-shrink: 0;
}
.tc-pg__feed-body { flex: 1; min-width: 0; }
.tc-pg__feed-name {
	font-weight: 700; font-size: 0.82rem; color: #0f172a;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tc-pg__feed-caption {
	font-size: 0.75rem; color: #64748b; margin-top: 2px;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tc-pg__feed-link {
	flex-shrink: 0; width: 32px; height: 32px; display: flex;
	align-items: center; justify-content: center; border-radius: 50%;
	background: #e0f2fe; color: #0369a1; font-weight: 700; font-size: 1rem;
	text-decoration: none; transition: background 0.2s;
}
.tc-pg__feed-link:hover { background: #bae6fd; }

/* ── Screenshot (FB-safe) Button ── */
.tc-pg__ai-img-btn--screenshot {
	background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
	color: #fff !important; border: none !important;
}
.tc-pg__ai-img-btn--screenshot:hover { opacity: 0.9; }
.tc-pg__ai-img-btn--screenshot:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Regenerate Image Button ── */
.tc-pg__ai-img-btn--regen {
	background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%) !important;
	color: #fff !important; border: none !important;
}
.tc-pg__ai-img-btn--regen:hover { opacity: 0.9; }
