@import url('./reset.css');
@import url('./config.css');
@import url('./hero.css');
@import url('./hook.css');

/* ── BUTTONS ──────────────────────────────────────────────────── */
.wr-btn-small {
	display: inline-block;
	width: auto;
	margin-top: 6px;
	background: var(--wr-gold);
	color: #000;
	padding: 5px 13px;
	border-radius: var(--wr-radius-sm);
	font-size: 0.75rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease, transform 0.15s ease;
	border: none;
	line-height: 1.2;
}

.wr-btn-small:hover {
	background: var(--wr-gold-dark);
	transform: scale(1.04);
	color: #000;
}

.wr-btn-pdf {
	display: inline-block;
	margin-top: var(--wr-spacing-md);
	background: var(--wr-error-bg);
	color: var(--wr-error-text);
	padding: 12px 28px;
	border-radius: var(--wr-radius-sm);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.2s ease;
	border: none;
	line-height: 1.2;
}

.wr-btn-pdf:hover {
	background: #fee2e2;
	color: var(--wr-error-text);
}

.wr-back {
	display: inline-block;
	margin-bottom: 20px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--wr-deep);
	text-decoration: none;
}

.wr-back:hover {
	text-decoration: underline;
	color: var(--wr-deep);
}

/* ── DASHBOARD — STAT CARDS ───────────────────────────────────── */
.wr-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
	margin-bottom: var(--wr-spacing-md);
}

.wr-stat-card {
	background: var(--wr-white);
	border: 1px solid var(--wr-border);
	border-radius: var(--wr-radius-lg);
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.wr-stat-label {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wr-muted);
	line-height: 1.2;
}

.wr-stat-value {
	font-size: 2.2rem;
	font-weight: 800;
	color: var(--wr-deep);
	line-height: 1;
	letter-spacing: -0.03em;
}

.wr-stat-sub {
	font-size: 0.78rem;
	color: var(--wr-muted);
	line-height: 1.3;
}

/* ── DASHBOARD — ACTION CARD ──────────────────────────────────── */
.wr-action-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	background: var(--wr-white);
	border: 1px solid var(--wr-border);
	border-radius: var(--wr-radius-lg);
	padding: 20px 24px;
	margin-bottom: var(--wr-spacing-md);
}

.wr-action-card-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.wr-action-card-text strong {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--wr-text);
	line-height: 1.3;
}

.wr-action-card-text span {
	font-size: 0.82rem;
	color: var(--wr-muted);
	line-height: 1.4;
}

/* ── DASHBOARD — HISTORY LIST ─────────────────────────────────── */
.wr-list {
	background: var(--wr-white);
	border: 1px solid var(--wr-border);
	border-radius: var(--wr-radius-lg);
	overflow: hidden;
}

.wr-list-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	border-bottom: 1px solid var(--wr-border);
}

.wr-list-count {
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--wr-muted);
	background: var(--wr-bg);
	padding: 3px 10px;
	border-radius: 20px;
	border: 1px solid var(--wr-border);
	line-height: 1.2;
}

.wr-empty {
	padding: 56px 24px;
	text-align: center;
	color: var(--wr-muted);
	font-size: 0.95rem;
	line-height: 1.6;
}

.wr-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	border-bottom: 1px solid var(--wr-border);
	gap: 20px;
	transition: background 0.15s ease;
}

.wr-row:hover {
	background: var(--wr-bg);
}

.wr-row:last-child {
	border-bottom: none;
}

.wr-row-left {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	flex: 1;
}

.wr-row-icon {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: #eeedfe;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.wr-row-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	flex: 1;
}

.wr-row-title {
	font-size: 0.92rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.wr-row-title a {
	color: var(--wr-text);
	text-decoration: none;
}

.wr-row-title a:hover {
	color: var(--wr-deep);
}

.wr-row-meta {
	font-size: 0.75rem;
	color: var(--wr-muted);
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	line-height: 1.3;
}

.wr-meta-dot {
	display: inline-block;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #cbd5e1;
	flex-shrink: 0;
}

.wr-row-actions {
	display: grid;
	grid-template-columns: auto auto auto auto;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.wr-row-action-col {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 70px;
}

.wr-link-view {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border-radius: 8px;
	background: #f8fafc;
	border: 1px solid var(--wr-border);
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease;
	color: var(--wr-text);
	line-height: 1.2;
}

.wr-link-view:hover {
	background: #eef2ff;
	border-color: #c7d2fe;
	color: var(--wr-text);
}

.wr-link-delete {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 12px;
	border-radius: 8px;
	background: transparent;
	border: 1px solid var(--wr-border);
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.2;
	color: var(--wr-error-text);
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
	font-family: inherit;
}

.wr-link-delete:hover {
	background: var(--wr-error-bg);
	color: var(--wr-error-text);
}

.wr-delete-form {
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
}

/* ── BADGES ───────────────────────────────────────────────────── */
.wr-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 6px;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: all 0.15s ease;
	line-height: 1.2;
}

.wr-badge-done {
	background: var(--wr-done-bg);
	color: var(--wr-done-text);
}

.wr-badge-pending,
.wr-badge- {
	background: var(--wr-pending-bg);
	color: var(--wr-pending-text);
}

/* ── ACTION LINKS ─────────────────────────────────────────────── */
.wr-link {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--wr-deep);
	text-decoration: none;
	transition: text-decoration 0.15s ease;
}

.wr-link:hover {
	text-decoration: underline;
	color: var(--wr-deep);
}

.wr-link-pdf {
	color: var(--wr-error-text);
	background: var(--wr-error-bg);
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 0.78rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	text-decoration: none;
	transition: background 0.2s ease;
}

.wr-link-pdf:hover {
	background: #fee2e2;
	text-decoration: none;
	color: var(--wr-error-text);
}

/* ── SINGLE VIEW ──────────────────────────────────────────────── */
.wr-submission-meta {
	font-size: 0.85rem;
	color: var(--wr-muted);
	margin-bottom: var(--wr-spacing-lg);
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	line-height: 1.4;
}

.wr-critique-body,
.wr-original-body {
	font-size: 0.95rem;
	line-height: 1.8;
	color: var(--wr-text);
}

.wr-processing-notice {
	background: var(--wr-pending-bg);
	color: var(--wr-pending-text);
	border-radius: var(--wr-radius-md);
	padding: 20px 24px;
	font-size: 0.9rem;
	font-weight: 500;
	margin-bottom: 20px;
	line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ══════════════════════════════════════════════════════════════ */
/* ── TABLET (768px and below) ─────────────────────────────────── */
@media (max-width: 768px) {
	.wr-stats {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}
	
	.wr-stat-card {
		padding: 18px 20px;
	}
	
	.wr-stat-value {
		font-size: 1.8rem;
	}
	
	.wr-action-card {
		padding: 18px 20px;
	}
	
	.wr-row {
		padding: 16px 20px;
	}
}

/* ── MOBILE (600px and below) ─────────────────────────────────── */
@media (max-width: 600px) {
	.wr-stats {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}
	
	.wr-stat-card {
		padding: 16px 18px;
	}
	
	.wr-stat-label {
		font-size: 0.68rem;
	}
	
	.wr-stat-value {
		font-size: 1.6rem;
	}
	
	.wr-stat-sub {
		font-size: 0.72rem;
	}

    .wr-link-view,
	.wr-link-delete {
		width: 100%;
		padding: 8px 10px;
		font-size: 0.75rem;
		justify-content: center;
	}
	
	.wr-link-pdf {
		width: 100%;
		font-size: 0.75rem;
	}
	
	/* Stack action card on mobile */
	.wr-action-card {
		flex-direction: column;
		align-items: flex-start;
		padding: 16px 18px;
		gap: 14px;
	}
	
	.wr-action-card .wr-btn-primary {
		width: 100%;
	}
	
	/* Stack rows on mobile */
	.wr-row {
		flex-direction: column;
		align-items: flex-start;
		padding: 14px 16px;
		gap: 12px;
	}
	
	.wr-row-left {
		width: 100%;
	}
	
	.wr-row-actions {
		width: 100%;
		margin-top: 8px;
		grid-template-columns: repeat(4, 1fr);
		justify-content: stretch;
		gap: 8px;
	}
	
	.wr-row-action-col {
		min-width: auto;
		width: 100%;
	}
	
	.wr-link-view,
	.wr-link-delete {
		width: 100%;
		padding: 8px 10px;
		font-size: 0.75rem;
		justify-content: center;
	}
	
	.wr-link-pdf {
		width: 100%;
		font-size: 0.75rem;
	}
}

/* ── EXTRA SMALL MOBILE (400px and below) ─────────────────────── */
@media (max-width: 400px) {
	.wr-stats {
		grid-template-columns: 1fr;
	}
	
	.wr-stat-value {
		font-size: 1.5rem;
	}
	
	.wr-row-actions {
		grid-template-columns: repeat(2, 1fr);
		gap: 6px;
	}
	
	.wr-row-meta {
		font-size: 0.72rem;
	}
	
	.wr-form-card {
		padding: 16px;
	}
}