/* SMM Provider - front-end components (Klvn dark: black, logo blue, banner gold) */

/*
 * Every plugin screen brings its own dark surface, fonts and text colours, so it
 * stays readable under any theme. Under a light theme the page around it is
 * white; without this, light text sat on white and disappeared.
 */
.smmp-app,
.smmp-form,
.smmp-notice {
	font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
	line-height: 1.6;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

.smmp-app {
	background: #05070d;
	border: 1px solid #1c2434;
	border-radius: 20px;
	padding: 26px;
	box-sizing: border-box;
}

/* On the Klvn theme the page is already black, so the panel melts into it. */
body.wp-theme-smm-panel .smmp-app {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
}

/*
 * Zero-specificity :where() so these beat a theme's bare element rules (h2, p,
 * td...) yet still lose to this file's own classes that come later.
 */
.smmp-app :where(h1, h2, h3, h4, p, li, td, th, label, span, strong, small, em, div),
.smmp-form :where(h1, h2, h3, h4, p, label, span, strong) {
	color: inherit;
	font-family: inherit;
}

.smmp-app :where(h1, h2, h3, h4),
.smmp-form :where(h1, h2, h3, h4) {
	color: #fff;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.2;
	text-transform: none;
}

.smmp-app :where(td, th) { border-left: 0; border-right: 0; border-top: 0; }
.smmp-app :where(table) { border-spacing: 0; }

.smmp-app,
.smmp-form,
.smmp-notice,
.kd {
	--s-bg: #0b0f18;
	--s-bg2: #111726;
	--s-deep: #05070d;
	--s-line: #1c2434;
	--s-ink: #f2f3f8;
	--s-muted: #99a3b8;
	--s-dim: #6a7487;
	--s-accent: #0b5fff;
	--s-accent2: #1fa2ff;
	--s-gold: #ffd100;
	--s-green: #34d399;
	--s-red: #f87171;
	--s-amber: #fbbf24;
	--s-cyan: #22d3ee;
	color: var(--s-ink);
}

/* ------------------------------------------------------------ notices */

.smmp-notice {
	border-radius: 14px;
	padding: 16px 20px;
	margin: 0 0 22px;
	border: 1px solid var(--s-line);
	background: var(--s-bg2);
	line-height: 1.7;
}

/* Solid colours: a see-through tint over a white theme made the text unreadable. */
.smmp-notice-success { border-color: #1f6b4f; background: #0b2019; }
.smmp-notice-error   { border-color: #7a2b2f; background: #25100f; }
.smmp-notice-warn    { border-color: #7a5b16; background: #231b08; }
.smmp-notice-info    { border-color: #1d4596; background: #0a1631; }
.smmp-notice a       { color: #5fb4ff; }

/* ---------------------------------------------------- signup / sign in */

.smmp-form {
	max-width: 460px;
	margin: 0 auto;
	background: var(--s-bg);
	border: 1px solid var(--s-line);
	border-radius: 18px;
	padding: 34px;
}

.smmp-form h2 { margin: 0 0 8px; font-size: 25px; letter-spacing: -0.02em; }

.smmp-form label,
.kd-field {
	display: block;
	margin: 18px 0 0;
	font-weight: 600;
	font-size: 14px;
	color: var(--s-ink);
}

.smmp-form input,
.kd input,
.kd select {
	width: 100%;
	margin-top: 8px;
	padding: 12px 14px;
	border: 1px solid var(--s-line);
	border-radius: 11px;
	font-size: 15px;
	font-weight: 400;
	font-family: inherit;
	background: var(--s-deep);
	color: var(--s-ink);
	box-sizing: border-box;
}

.smmp-form input::placeholder,
.kd input::placeholder { color: var(--s-dim); }

.smmp-form input:focus,
.kd input:focus,
.kd select:focus {
	outline: none;
	border-color: var(--s-accent);
	box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.3);
}

.smmp-btn,
.kd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 11px;
	font-size: 15px;
	font-weight: 700;
	font-family: inherit;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	border: 1px solid transparent;
	transition: filter 0.15s, transform 0.15s, background 0.15s;
}

.smmp-btn,
.kd-btn-primary {
	margin-top: 22px;
	background: linear-gradient(135deg, var(--s-accent2), var(--s-accent));
	color: #fff !important;
	box-shadow: 0 8px 24px -10px rgba(11, 95, 255, 1);
}

.smmp-btn:hover,
.kd-btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }

.kd-btn-primary:disabled {
	filter: grayscale(0.7) brightness(0.7);
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.kd-btn-ghost {
	background: var(--s-bg2);
	border-color: var(--s-line);
	color: var(--s-ink) !important;
	padding: 9px 16px;
	font-size: 14px;
}

.kd-btn-ghost:hover { border-color: #2c3852; background: #151c2d; }

.smmp-muted { color: var(--s-muted); font-size: 14px; }
.smmp-muted a,
.kd a:not(.kd-btn) { color: #5fb4ff; }

/* ---------------------------------------------------------- dashboard */

/* color-scheme gives native controls (scrollbars, number spinners, select menus) their dark versions. */
.kd { display: grid; gap: 22px; color-scheme: dark; }

.kd-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 14px;
}

.kd-eyebrow {
	display: block;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--s-gold);
	margin-bottom: 4px;
}

.kd-title { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; color: #fff; }

.kd-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kd-signout { color: var(--s-red) !important; }

/* Balance gets its own full-width row; the four counters share the row below,
   so five cards never leave one orphan wrapped onto a line by itself. */
.kd-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.kd-stat {
	background: var(--s-bg);
	border: 1px solid var(--s-line);
	border-radius: 14px;
	padding: 18px 20px;
}

.kd-stat span { display: block; font-size: 13px; color: var(--s-dim); margin-bottom: 6px; }
.kd-stat strong { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.kd-stat small { font-size: 13px; font-weight: 600; color: var(--s-muted); }

.kd-stat-main {
	grid-column: 1 / -1;
	border-color: #1f5fc4;
	/* Opaque stops only: a transparent start let a white page bleed through. */
	background: linear-gradient(120deg, #0e2a63, #0b0f18 65%);
}

.kd-stat-main strong { font-size: 34px; }

.kd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 22px;
	align-items: start;
}

.kd-card {
	background: var(--s-bg);
	border: 1px solid var(--s-line);
	border-radius: 16px;
	padding: 24px;
	min-width: 0;
}

.kd-card h3 { margin: 0 0 6px; font-size: 19px; }
.kd-card h4 { margin: 0 0 4px; font-size: 16px; }

.kd-card-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

/* Order form */
.kd-range { color: var(--s-dim); font-weight: 500; }

/* One line per figure: fits any card width, unlike side-by-side columns. */
.kd-price {
	margin-top: 18px;
	background: var(--s-deep);
	border: 1px solid var(--s-line);
	border-radius: 12px;
	padding: 4px 16px;
}

.kd-price div {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 0;
}

.kd-price div + div { border-top: 1px solid var(--s-line); }
.kd-price span { font-size: 14px; color: var(--s-muted); }
.kd-price strong { font-size: 15px; white-space: nowrap; }
.kd-price .kd-total { color: var(--s-gold); font-size: 19px; }

.kd-hint { min-height: 1.4em; margin: 10px 0 0; color: var(--s-red); font-size: 14px; }

/* One-tap quantities */
.kd-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.kd-pick {
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid var(--s-line);
	background: var(--s-deep);
	color: var(--s-muted);
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
}

.kd-pick:hover { border-color: var(--s-accent); color: #fff; }
.kd-pick.active { background: #0b2a66; border-color: var(--s-accent); color: #fff; }
.kd-order .kd-btn-primary { width: 100%; margin-top: 8px; }

/* Copy rows */
/* Label sits above the value so the URL and key get the full width to themselves. */
.kd-copyrow {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 4px 10px;
	margin: 12px 0;
	padding: 10px 12px;
	background: var(--s-deep);
	border: 1px solid var(--s-line);
	border-radius: 11px;
}

.kd-copylabel { grid-column: 1 / -1; font-size: 11px; font-weight: 700; color: var(--s-dim); text-transform: uppercase; letter-spacing: 0.06em; }

.kd-copyrow code {
	font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
	font-size: 13px;
	color: var(--s-green);
	word-break: break-all;
	background: none;
	padding: 0;
}

.kd-copy {
	padding: 6px 12px;
	border-radius: 8px;
	border: 1px solid var(--s-line);
	background: var(--s-bg2);
	color: var(--s-ink);
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
}

.kd-copy:hover { border-color: var(--s-accent); }

.kd-topup { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--s-line); }
.kd-contacts { display: flex; gap: 8px; flex-wrap: wrap; }

/* Orders */
.kd-search { display: flex; gap: 8px; }
.kd-search input { margin: 0; min-width: 190px; padding: 9px 12px; }
.kd-search .kd-btn { margin: 0; }

.kd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.kd-chips a {
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid var(--s-line);
	background: var(--s-deep);
	color: var(--s-muted) !important;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.kd-chips a em { font-style: normal; color: var(--s-dim); margin-left: 3px; }
.kd-chips a.active { background: rgba(11, 95, 255, 0.18); border-color: var(--s-accent); color: #fff !important; }
.kd-chips a.active em { color: #9cc9ff; }

/* Tables scroll inside their card, never the page. */
.kd-tablewrap { overflow-x: auto; border-radius: 12px; scrollbar-color: #2c3852 transparent; }
.kd-nowrap { white-space: nowrap; }
.kd-empty { text-align: center !important; color: var(--s-muted); padding: 28px !important; }
.kd-new td { background: rgba(255, 209, 0, 0.07); }

.kd-pending { text-align: center; padding: 40px 28px; }
.kd-pending .kd-btn { margin: 6px 4px; }

/* Rates page */
.kd-rate-big { text-align: right; }
.kd-rate-big strong { display: block; font-size: 30px; font-weight: 800; color: var(--s-gold); line-height: 1.1; }
.kd-rate-big small { font-size: 15px; color: var(--s-muted); }
.kd-rate-big span { font-size: 13px; color: var(--s-dim); }

/* ------------------------------------------------------------- tables */

.smmp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	background: var(--s-bg);
	border: 1px solid var(--s-line);
	border-radius: 12px;
	overflow: hidden;
	margin: 12px 0 0;
}

.smmp-table th,
.smmp-table td {
	padding: 11px 14px;
	border-bottom: 1px solid var(--s-line);
	text-align: left;
	vertical-align: top;
}

.smmp-table thead th {
	background: var(--s-bg2);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--s-dim);
	white-space: nowrap;
}

.smmp-table tbody tr:last-child td,
.smmp-table tr:last-child th,
.smmp-table tr:last-child td { border-bottom: 0; }

.smmp-table-sm th { width: 32%; color: var(--s-muted); font-weight: 600; }

.smmp-truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------- badges */

.smmp-badge {
	display: inline-block;
	padding: 3px 11px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	background: var(--s-line);
	color: #b6bccd;
	white-space: nowrap;
}

.smmp-status-pending     { background: rgba(251, 191, 36, 0.15); color: var(--s-amber); }
.smmp-status-in-progress { background: rgba(34, 211, 238, 0.15); color: var(--s-cyan); }
.smmp-status-processing  { background: rgba(34, 211, 238, 0.15); color: var(--s-cyan); }
.smmp-status-completed   { background: rgba(52, 211, 153, 0.15); color: var(--s-green); }
.smmp-status-partial     { background: rgba(251, 191, 36, 0.15); color: var(--s-amber); }
.smmp-status-canceled    { background: rgba(248, 113, 113, 0.15); color: var(--s-red); }

.smmp-pos { color: var(--s-green); font-weight: 700; }
.smmp-neg { color: var(--s-red); font-weight: 700; }

/* ------------------------------------------------------------ API docs */

.kd-codehead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 18px 0 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--s-dim);
}

.smmp-code {
	background: var(--s-deep);
	border: 1px solid var(--s-line);
	color: #cfd4e8;
	padding: 14px 16px;
	border-radius: 12px;
	overflow-x: auto;
	font-size: 13px;
	line-height: 1.7;
	font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
	margin: 0;
	white-space: pre;
}

.smmp-code-out { color: var(--s-green); }

.smmp-docs code {
	font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
	background: var(--s-deep);
	padding: 2px 6px;
	border-radius: 5px;
	font-size: 13px;
}

@media (max-width: 640px) {
	.smmp-form { padding: 24px; }
	.kd-card { padding: 18px; }
	.kd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kd-stat strong { font-size: 20px; }
	.kd-stat-main strong { font-size: 28px; }
	.kd-search { width: 100%; }
	.kd-search input { min-width: 0; flex: 1; }
	.kd-rate-big { text-align: left; }
}
