/* ==========================================================================
   Donatico — Admin styles
   Brand: Primary #10b981 (emerald-500) / Secondary #059669 (emerald-600)
   ========================================================================== */

/* ---- Custom properties ---- */
:root {
	--donatico-primary:    #10b981;
	--donatico-primary-dk: #059669;
	--donatico-primary-lt: #d1fae5;
	--donatico-text:       #1e293b;
	--donatico-muted:      #64748b;
	--donatico-border:     #e2e8f0;
	--donatico-bg:         #f8fafc;
	--donatico-radius:     6px;
	--donatico-shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}

/* ==========================================================================
   Wrap
   ========================================================================== */

.donatico-wrap {
	max-width: 1200px;
}

.donatico-wrap h1.wp-heading-inline {
	margin-bottom: 0;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.donatico-card {
	background: #fff;
	border: 1px solid var(--donatico-border);
	border-radius: var(--donatico-radius);
	box-shadow: var(--donatico-shadow);
	margin-top: 20px;
	padding: 20px 24px;
}

.donatico-card-title {
	align-items: center;
	border-bottom: 1px solid var(--donatico-border);
	display: flex;
	font-size: 14px;
	font-weight: 600;
	justify-content: space-between;
	margin: 0 0 16px;
	padding-bottom: 12px;
}

.donatico-card-link {
	color: var(--donatico-primary);
	font-size: 13px;
	font-weight: 400;
	text-decoration: none;
}

.donatico-card-link:hover {
	color: var(--donatico-primary-dk);
}

/* ==========================================================================
   Dashboard — Stat cards grid
   ========================================================================== */

.donatico-stats-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	margin-top: 20px;
}

.donatico-stat-card {
	align-items: center;
	background: #fff;
	border: 1px solid var(--donatico-border);
	border-left: 4px solid var(--donatico-primary);
	border-radius: var(--donatico-radius);
	box-shadow: var(--donatico-shadow);
	display: flex;
	gap: 16px;
	padding: 18px 20px;
}

.donatico-stat-icon {
	color: var(--donatico-primary);
	font-size: 28px;
	flex-shrink: 0;
}

.donatico-stat-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.donatico-stat-value {
	color: var(--donatico-text);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.donatico-stat-label {
	color: var(--donatico-muted);
	font-size: 12px;
	margin-top: 2px;
	text-transform: uppercase;
	letter-spacing: .04em;
}

/* ==========================================================================
   Goal progress bar
   ========================================================================== */

.donatico-goal-card {}

.donatico-progress-track {
	background: var(--donatico-border);
	border-radius: 100px;
	height: 12px;
	overflow: hidden;
}

.donatico-progress-bar {
	background: linear-gradient(90deg, var(--donatico-primary), var(--donatico-primary-dk));
	border-radius: 100px;
	height: 100%;
	transition: width .4s ease;
}

.donatico-goal-meta {
	color: var(--donatico-muted);
	font-size: 13px;
	margin: 8px 0 0;
}

/* ==========================================================================
   Recent donations table
   ========================================================================== */

.donatico-recent-table {
	border-collapse: collapse;
	width: 100%;
}

.donatico-recent-table th {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--donatico-muted);
}

/* ==========================================================================
   Shortcode reference card
   ========================================================================== */

.donatico-shortcode-table code {
	background: var(--donatico-bg);
	border: 1px solid var(--donatico-border);
	border-radius: 4px;
	font-size: 12px;
	padding: 2px 6px;
	white-space: nowrap;
}

/* ==========================================================================
   Donations list — Status badges
   ========================================================================== */

.donatico-status {
	border-radius: 100px;
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .04em;
	padding: 2px 10px;
	text-transform: uppercase;
}

.donatico-status--completed {
	background: var(--donatico-primary-lt);
	color: var(--donatico-primary-dk);
}

.donatico-status--pending {
	background: #fef9c3;
	color: #854d0e;
}

.donatico-status--failed {
	background: #fee2e2;
	color: #991b1b;
}

.donatico-status--refunded {
	background: #e0e7ff;
	color: #3730a3;
}

/* ==========================================================================
   Subscriptions list — Status badges
   ========================================================================== */

.donatico-status--active {
	background: var(--donatico-primary-lt);
	color: var(--donatico-primary-dk);
}

.donatico-status--past_due {
	background: #ffedd5;
	color: #9a3412;
}

.donatico-status--cancelled {
	background: #f3f4f6;
	color: #4b5563;
}

.donatico-status--pending_payment {
	background: #fef9c3;
	color: #854d0e;
}

/* ==========================================================================
   Settings page — Tab content wrapper
   ========================================================================== */

.donatico-tab-content {
	background: #fff;
	border: 1px solid var(--donatico-border);
	border-top: none;
	border-radius: 0 0 var(--donatico-radius) var(--donatico-radius);
	padding: 24px;
}

.donatico-tabs {
	margin-bottom: 0;
}

/* Highlight the active tab with the brand colour. */
.donatico-tabs .nav-tab-active {
	border-bottom-color: #fff;
	border-top: 3px solid var(--donatico-primary);
	color: var(--donatico-primary-dk);
}

/* Key fields — slightly wider than regular-text for long Stripe keys. */
.donatico-key-field {
	font-family: monospace;
	font-size: 13px;
	width: 100%;
	max-width: 520px;
}

/* ==========================================================================
   Form Designer — two-column layout
   ========================================================================== */

.donatico-designer-layout {
	display: grid;
	gap: 20px;
	grid-template-columns: 340px 1fr;
	margin-top: 20px;
}

@media (max-width: 900px) {
	.donatico-designer-layout {
		grid-template-columns: 1fr;
	}
}

.donatico-designer-controls .donatico-card {
	margin-top: 0;
	margin-bottom: 16px;
}

.donatico-designer-preview-wrap {
	background: var(--donatico-bg);
	border: 1px solid var(--donatico-border);
	border-radius: var(--donatico-radius);
	padding: 20px 24px;
}

.donatico-designer-preview {
	background: #fff;
	border: 1px dashed var(--donatico-border);
	border-radius: var(--donatico-radius);
	margin-top: 12px;
	min-height: 200px;
	padding: 24px;
}

.donatico-designer-preview .description {
	color: var(--donatico-muted);
	font-style: italic;
}

/* Layout picker radio group. */
.donatico-layout-picker {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.donatico-layout-option {
	align-items: flex-start;
	border: 2px solid var(--donatico-border);
	border-radius: var(--donatico-radius);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 12px 10px 36px;
	position: relative;
	transition: border-color .15s;
}

.donatico-layout-option:hover {
	border-color: var(--donatico-primary);
}

.donatico-layout-option--active {
	border-color: var(--donatico-primary);
	background: var(--donatico-primary-lt);
}

.donatico-layout-radio {
	left: 10px;
	position: absolute;
	top: 13px;
}

.donatico-layout-label {
	font-weight: 600;
	font-size: 13px;
}

.donatico-layout-desc {
	color: var(--donatico-muted);
	font-size: 12px;
}

.donatico-designer-actions {
	display: flex;
	gap: 8px;
	margin-top: 4px;
}

/* ==========================================================================
   Utility
   ========================================================================== */

.donatico-delete-link {
	color: #d63638;
}

.donatico-delete-link:hover {
	color: #b91c1c;
}
