/* ==========================================================================
   KatCanDo Quotes — Quote Sponsorships (Frontend, Studio Modal, Account & Admin)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. "Sponsor this quote" CTA Button Variants
   -------------------------------------------------------------------------- */
.kcd-sponsor-cta-wrap {
	display: flex;
	justify-content: center;
	margin: 12px 0 4px;
}

.kcd-sponsor-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 18px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
	border: 1px solid rgba(246, 173, 85, 0.55);
	background: linear-gradient(135deg, rgba(246, 173, 85, 0.2), rgba(237, 137, 54, 0.12));
	color: inherit;
	backdrop-filter: blur(8px);
}

.kcd-sponsor-trigger:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(246, 173, 85, 0.25);
}

.kcd-sponsor-trigger-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.kcd-sponsor-trigger.is-style-pill-gold {
	background: linear-gradient(135deg, #f6ad55 0%, #dd6b20 100%);
	color: #1a1206;
	border-color: rgba(255, 235, 200, 0.65);
	box-shadow: 0 4px 14px rgba(221, 107, 32, 0.35);
}

.kcd-sponsor-trigger.is-style-pill-glass {
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.28);
	color: inherit;
	backdrop-filter: blur(10px);
}

.kcd-sponsor-trigger.is-style-solid-accent {
	background: var(--kcd-accent, #c7923e);
	color: #ffffff;
	border-color: transparent;
}

.kcd-sponsor-trigger.is-style-outline {
	background: transparent;
	border: 1.5px solid currentColor;
	color: inherit;
}

.kcd-sponsor-trigger.is-style-minimal {
	background: transparent;
	border: none;
	padding: 4px 10px;
	text-decoration: underline;
	text-underline-offset: 3px;
	opacity: 0.85;
}

/* --------------------------------------------------------------------------
   2. Placement Slots & Corner / Inline Containers
   -------------------------------------------------------------------------- */
.kcd-stage {
	position: relative;
}

.kcd-sponsor-slot:empty,
.kcd-sponsor-slot[hidden] {
	display: none !important;
}

.kcd-sponsor-corner {
	position: absolute;
	z-index: 6;
	max-width: min(320px, 86vw);
	pointer-events: auto;
}

.kcd-sponsor-corner.is-top-left {
	top: 14px;
	left: 16px;
}
.kcd-sponsor-corner.is-top-right {
	top: 14px;
	right: 16px;
}
.kcd-sponsor-corner.is-bottom-left {
	bottom: 14px;
	left: 16px;
}
.kcd-sponsor-corner.is-bottom-right {
	bottom: 14px;
	right: 16px;
}

@media (max-width: 720px) {
	.kcd-sponsor-corner {
		position: relative;
		top: auto !important;
		left: auto !important;
		right: auto !important;
		bottom: auto !important;
		margin: 8px auto;
		display: flex;
		justify-content: center;
	}
}

.kcd-sponsor-inline {
	display: flex;
	justify-content: center;
	margin: 12px auto 6px;
	max-width: 680px;
}

/* --------------------------------------------------------------------------
   3. Sponsorship Badge Shapes & Icon Framing
   -------------------------------------------------------------------------- */
.kcd-sponsor-badge {
	--kcd-sp-icon-color: #fbbf24;
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 9px 16px;
	font-size: 13px;
	line-height: 1.35;
	background: rgba(15, 23, 42, 0.82);
	color: #f8fafc;
	border: 1px solid rgba(251, 191, 36, 0.45);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(10px);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kcd-sponsor-badge:hover {
	transform: translateY(-1px);
}

/* Shape: Speech Bubble */
.kcd-sponsor-badge.is-shape-speech {
	border-radius: 18px 18px 18px 4px;
}
.kcd-sponsor-badge.is-shape-speech::after {
	content: '';
	position: absolute;
	bottom: -6px;
	left: 18px;
	width: 10px;
	height: 10px;
	background: rgba(15, 23, 42, 0.86);
	border-bottom: 1px solid rgba(251, 191, 36, 0.45);
	border-right: 1px solid rgba(251, 191, 36, 0.45);
	transform: rotate(45deg);
}

/* Shape: Thought Cloud */
.kcd-sponsor-badge.is-shape-thought {
	border-radius: 26px;
	padding: 10px 18px;
}
.kcd-sponsor-badge.is-shape-thought::after {
	content: '';
	position: absolute;
	width: 9px;
	height: 9px;
	bottom: -8px;
	left: 22px;
	background: rgba(15, 23, 42, 0.85);
	border: 1px solid rgba(251, 191, 36, 0.45);
	border-radius: 50%;
}

/* Shape: Heart Bubble */
.kcd-sponsor-badge.is-shape-heart {
	border-radius: 999px;
	border-color: rgba(244, 114, 182, 0.65);
	background: linear-gradient(135deg, rgba(131, 24, 67, 0.88), rgba(30, 27, 75, 0.88));
	box-shadow: 0 8px 24px rgba(236, 72, 153, 0.25);
}

/* Shape: Frosted Pill */
.kcd-sponsor-badge.is-shape-pill {
	border-radius: 999px;
}

/* Shape: Ribbon Banner */
.kcd-sponsor-badge.is-shape-banner {
	border-radius: 6px;
	border-left: 4px solid var(--kcd-sp-icon-color, #fbbf24);
	padding: 8px 16px;
}

/* Shape: Minimal Text Line */
.kcd-sponsor-badge.is-shape-minimal {
	background: transparent;
	border: none;
	box-shadow: none;
	backdrop-filter: none;
	color: inherit;
	padding: 4px 8px;
}

/* Icon Styling & Sizes */
.kcd-sp-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--kcd-sp-icon-color, #fbbf24);
	width: 28px;
	height: 28px;
}
.kcd-sp-icon svg {
	width: 16px;
	height: 16px;
}

.kcd-sp-icon.is-size-sm {
	width: 22px;
	height: 22px;
}
.kcd-sp-icon.is-size-sm svg {
	width: 13px;
	height: 13px;
}

.kcd-sp-icon.is-size-lg {
	width: 34px;
	height: 34px;
}
.kcd-sp-icon.is-size-lg svg {
	width: 20px;
	height: 20px;
}

.kcd-sp-icon.is-style-circle {
	border-radius: 50%;
	background: rgba(251, 191, 36, 0.16);
	border: 1px solid rgba(251, 191, 36, 0.4);
}
.kcd-sp-icon.is-style-rounded {
	border-radius: 8px;
	background: rgba(251, 191, 36, 0.16);
	border: 1px solid rgba(251, 191, 36, 0.4);
}
.kcd-sp-icon.is-style-glow {
	border-radius: 50%;
	background: rgba(251, 191, 36, 0.22);
	box-shadow: 0 0 14px var(--kcd-sp-icon-color, #fbbf24);
}
.kcd-sp-icon.is-style-outline {
	border-radius: 50%;
	border: 1.5px solid var(--kcd-sp-icon-color, #fbbf24);
	background: transparent;
}
.kcd-sp-icon.is-style-none {
	width: auto;
	height: auto;
	background: transparent;
	border: none;
}

.kcd-sp-text,
.kcd-sp-byline {
	display: inline;
}
.kcd-sp-prefix,
.kcd-sponsor-prefix {
	opacity: 0.85;
	margin-right: 0;
}
.kcd-sp-credit,
.kcd-sponsor-credit {
	font-weight: 700;
}
.kcd-sp-link,
.kcd-sponsor-link {
	color: var(--kcd-sp-icon-color, #fbbf24);
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 700;
}
.kcd-sp-link:hover,
.kcd-sponsor-link:hover {
	opacity: 0.9;
}

.kcd-sp-prev-ad[hidden],
.kcd-sp-contrast-alert[hidden],
.kcd-sp-color-controls[hidden],
.kcd-sp-days-row[hidden],
.kcd-sp-bundles-row[hidden],
.kcd-sp-form-status[hidden] {
	display: none !important;
}

/* --------------------------------------------------------------------------
   4. Interactive Sponsorship Studio Modal (<dialog>)
   -------------------------------------------------------------------------- */
.kcd-sp-dialog {
	width: min(1020px, 95vw);
	max-height: 92vh;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 18px;
	background: #0f172a;
	color: #f8fafc;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
	overflow: hidden;
}
.kcd-sp-dialog::backdrop {
	background: rgba(6, 10, 20, 0.72);
	backdrop-filter: blur(5px);
}

.kcd-sp-studio {
	display: flex;
	flex-direction: column;
	max-height: 92vh;
}

.kcd-sp-studio-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	padding: 16px 24px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(15, 23, 42, 0.96);
}
.kcd-sp-studio-head h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: #ffffff;
}
.kcd-sp-studio-sub {
	margin: 4px 0 0;
	font-size: 13px;
	color: #94a3b8;
}
.kcd-sp-close {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	color: #f8fafc;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 15px;
}

.kcd-sp-studio-body {
	display: grid;
	grid-template-columns: 1fr 1.25fr;
	gap: 22px;
	padding: 20px 24px;
	overflow-y: auto;
}
@media (max-width: 860px) {
	.kcd-sp-studio-body {
		grid-template-columns: 1fr;
	}
}

.kcd-sp-preview-col {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.kcd-sp-preview-label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	font-weight: 600;
	color: #cbd5e1;
}
.kcd-sp-contrast-pill {
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}
.kcd-sp-contrast-pill.is-pass {
	background: rgba(34, 197, 94, 0.18);
	color: #4ade80;
}
.kcd-sp-contrast-pill.is-fail {
	background: rgba(239, 68, 68, 0.22);
	color: #fca5a5;
}

.kcd-sp-preview-stage {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.kcd-sp-prev-card {
	position: relative;
	min-height: 230px;
	padding: 46px 22px 38px;
	border-radius: 14px;
	background: #1e293b;
	color: #f8fafc;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.25);
	transition: background 0.2s ease, color 0.2s ease;
}
.kcd-sp-prev-corner {
	position: absolute;
	z-index: 3;
}
.kcd-sp-prev-corner.is-top-left {
	top: 10px;
	left: 10px;
}
.kcd-sp-prev-corner.is-top-right {
	top: 10px;
	right: 10px;
}
.kcd-sp-prev-corner.is-bottom-left {
	bottom: 10px;
	left: 10px;
}
.kcd-sp-prev-corner.is-bottom-right {
	bottom: 10px;
	right: 10px;
}
.kcd-sp-prev-quote {
	margin: 8px 0 6px;
	font-size: 16px;
	line-height: 1.45;
	font-family: Georgia, serif;
}
.kcd-sp-prev-author {
	margin: 0;
	font-size: 13px;
	opacity: 0.85;
	font-weight: 600;
}
.kcd-sp-prev-inline {
	margin-top: 8px;
	display: flex;
	justify-content: center;
}
.kcd-sp-prev-share-bar {
	display: flex;
	justify-content: center;
	gap: 12px;
	font-size: 11px;
	color: #94a3b8;
	opacity: 0.75;
}
.kcd-sp-prev-ad {
	padding: 8px;
	border-radius: 8px;
	border: 1px dashed rgba(251, 191, 36, 0.4);
	display: flex;
	justify-content: center;
}

.kcd-sp-contrast-alert {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 12px;
	border-radius: 10px;
	background: rgba(239, 68, 68, 0.16);
	border: 1px solid rgba(239, 68, 68, 0.4);
	color: #fecaca;
	font-size: 12px;
}
.kcd-sp-autofix-btn {
	background: #fbbf24;
	color: #1a1206;
	border: none;
	border-radius: 6px;
	padding: 5px 10px;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	flex-shrink: 0;
}

.kcd-sp-fieldset {
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	padding: 12px 14px;
	margin: 0 0 12px;
}
.kcd-sp-fieldset legend {
	padding: 0 6px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fbbf24;
}

.kcd-sp-tier-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
	gap: 8px;
}
.kcd-sp-tier-card {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 10px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.03);
	cursor: pointer;
	font-size: 12px;
}
.kcd-sp-tier-card:has(input:checked) {
	border-color: #fbbf24;
	background: rgba(251, 191, 36, 0.14);
}
.kcd-sp-tier-title {
	font-weight: 700;
	color: #ffffff;
}
.kcd-sp-tier-price {
	color: #fbbf24;
	font-weight: 600;
	font-size: 11px;
}
.kcd-sp-tier-desc {
	color: #94a3b8;
	font-size: 11px;
}

.kcd-sp-days-row,
.kcd-sp-bundles-row {
	margin-top: 10px;
	font-size: 12px;
}
.kcd-sp-days-inputs {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 4px;
}
.kcd-sp-days-inputs input[type='range'] {
	flex: 1;
}
.kcd-sp-days-inputs input[type='number'] {
	width: 68px;
}

.kcd-sp-row-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.kcd-sp-row-3 {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 10px;
	margin-top: 8px;
}
.kcd-sp-form-col label {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 4px;
	color: #cbd5e1;
}
.kcd-sp-form-col input[type='text'],
.kcd-sp-form-col input[type='number'],
.kcd-sp-form-col select {
	width: 100%;
	padding: 7px 10px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: #1e293b;
	color: #f8fafc;
	font-size: 13px;
}
.kcd-sp-hint {
	margin: 6px 0 0;
	font-size: 11px;
	color: #94a3b8;
}

.kcd-sp-icon-section,
.kcd-sp-color-section {
	margin-top: 10px;
}
.kcd-sp-icon-picker {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 6px;
}
.kcd-sp-icon-choice {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 34px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.04);
	color: #e2e8f0;
	cursor: pointer;
}
.kcd-sp-icon-choice svg {
	width: 16px;
	height: 16px;
}
.kcd-sp-icon-choice.is-selected {
	border-color: #fbbf24;
	background: rgba(251, 191, 36, 0.22);
	color: #fbbf24;
}

.kcd-sp-color-input-wrap {
	display: flex;
	gap: 6px;
	align-items: center;
}
.kcd-sp-color-input-wrap input[type='color'] {
	width: 40px;
	height: 34px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	background: transparent;
	cursor: pointer;
}
.kcd-sp-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 6px;
}
.kcd-sp-swatch {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.3);
	cursor: pointer;
}

.kcd-sp-summary-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding-top: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.kcd-sp-summary-cost {
	font-size: 13px;
}
.kcd-sp-summary-actions {
	display: flex;
	gap: 8px;
}
.kcd-sp-btn-primary,
.kcd-sp-btn-secondary {
	padding: 9px 18px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	border: 1px solid transparent;
}
.kcd-sp-btn-primary {
	background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
	color: #1a1206;
}
.kcd-sp-btn-secondary {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.24);
	color: #e2e8f0;
}
.kcd-sp-form-status {
	margin: 10px 0 0;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 13px;
}
.kcd-sp-form-status.is-success {
	background: rgba(34, 197, 94, 0.16);
	border: 1px solid rgba(34, 197, 94, 0.4);
	color: #86efac;
}
.kcd-sp-form-status.is-error {
	background: rgba(239, 68, 68, 0.16);
	border: 1px solid rgba(239, 68, 68, 0.4);
	color: #fca5a5;
}

/* --------------------------------------------------------------------------
   5. Member Account Page — "Sponsor a Quote" Section
   -------------------------------------------------------------------------- */
.kcd-acc-sponsorships {
	margin-top: 28px;
}
.kcd-acc-sp-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 14px;
}
.kcd-acc-sp-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 14px;
}
.kcd-acc-sp-item {
	padding: 14px 16px;
	border-radius: 12px;
	border: 1px solid rgba(148, 163, 184, 0.28);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.kcd-acc-sp-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
}
.kcd-sp-status-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}
.kcd-sp-status-badge.is-active,
.kcd-sp-status-badge.is-change_pending {
	background: rgba(34, 197, 94, 0.18);
	color: #16a34a;
}
.kcd-sp-status-badge.is-pending {
	background: rgba(245, 158, 11, 0.2);
	color: #d97706;
}
.kcd-sp-status-badge.is-expired,
.kcd-sp-status-badge.is-rejected {
	background: rgba(148, 163, 184, 0.2);
	color: #64748b;
}
.kcd-sp-mini-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.85);
	color: #f8fafc;
	font-size: 12px;
}
.kcd-acc-sp-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

/* --------------------------------------------------------------------------
   6. Admin Sponsorships Spreadsheet Page (`admin.php?page=kcd-quotes-sponsorships`)
   -------------------------------------------------------------------------- */
.kcd-sp-admin-toolbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin: 14px 0;
	padding: 12px 14px;
	background: #ffffff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
}
.kcd-sp-admin-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.kcd-sp-admin-tab {
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid #dcdcde;
	background: #f6f7f7;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
}
.kcd-sp-admin-tab.is-active {
	background: #2271b1;
	border-color: #2271b1;
	color: #ffffff;
}
.kcd-sp-admin-table-wrap {
	background: #ffffff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	overflow-x: auto;
}
.kcd-sp-admin-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.kcd-sp-admin-table th,
.kcd-sp-admin-table td {
	padding: 10px 10px;
	border-bottom: 1px solid #f0f0f1;
	vertical-align: top;
	text-align: left;
}
.kcd-sp-admin-table th {
	background: #f6f7f7;
	font-weight: 600;
	font-size: 12px;
	color: #1d2327;
}
.kcd-sp-admin-table tr.is-dirty {
	background: #fffbeb;
}
.kcd-sp-admin-input,
.kcd-sp-admin-select {
	width: 100%;
	max-width: 190px;
	font-size: 12px;
	padding: 4px 6px;
}
.kcd-sp-admin-change-box {
	margin-top: 6px;
	padding: 6px 8px;
	border-radius: 6px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	font-size: 11px;
}
.kcd-sp-admin-timer {
	font-family: monospace;
	font-weight: 700;
	font-size: 12px;
	color: #0f766e;
}
.kcd-sp-admin-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
