/* MTGBrew Builder — front-end styles (dark, matching mtgbrew.ai). */

.mtgbrew-builder {
	background: #141419;
	color: #d8dbe0;
	border: 1px solid #26262e;
	border-radius: 12px;
	padding: 20px;
	max-width: 720px;
}

.mtgbrew-builder a {
	color: #a78bfa;
}

.mtgbrew-builder-wallet {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	font-size: 0.9em;
	border-bottom: 1px solid #26262e;
	padding-bottom: 12px;
	margin-bottom: 16px;
}

.mtgbrew-builder-form .mtgbrew-field {
	margin-bottom: 16px;
}

.mtgbrew-builder-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: #f2f3f5;
}

.mtgbrew-builder-form select,
.mtgbrew-builder-form input[type="text"],
.mtgbrew-builder-form input[type="number"] {
	width: 100%;
	background: #0b0b0e;
	color: #f2f3f5;
	border: 1px solid #34343e;
	border-radius: 8px;
	padding: 10px 12px;
}

.mtgbrew-builder-form input[type="range"] {
	width: 100%;
	accent-color: #7c3aed;
}

.mtgbrew-field-note {
	font-size: 0.85em;
	color: #9a9ea8;
	margin: 6px 0 0;
}

.mtgbrew-btn {
	display: inline-block;
	background: #7c3aed;
	color: #ffffff;
	border: 0;
	border-radius: 8px;
	padding: 12px 22px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
}

.mtgbrew-btn:hover {
	background: #8b4cf0;
	color: #ffffff;
}

.mtgbrew-btn[disabled] {
	opacity: 0.55;
	cursor: wait;
}

.mtgbrew-btn-alt {
	background: #26262e;
	color: #f2f3f5;
}

.mtgbrew-progress {
	margin-top: 20px;
	border-top: 1px solid #26262e;
	padding-top: 16px;
}

.mtgbrew-progress-stage {
	font-weight: 600;
	color: #f2f3f5;
	margin: 0 0 8px;
}

.mtgbrew-progress-bar {
	background: #0b0b0e;
	border: 1px solid #34343e;
	border-radius: 999px;
	height: 14px;
	overflow: hidden;
}

.mtgbrew-progress-fill {
	background: #7c3aed;
	height: 100%;
	transition: width 0.6s ease;
}

.mtgbrew-progress-meta {
	font-size: 0.9em;
	color: #9a9ea8;
	margin: 8px 0 0;
}

.mtgbrew-progress-note,
.mtgbrew-result-text {
	font-size: 0.9em;
	color: #9a9ea8;
}

/* v0.5.0: rolled-parameters / collection lines + form extras. */
.mtgbrew-progress-rolled,
.mtgbrew-rolled-line {
	font-size: 0.9em;
	color: #c4b5fd;
	margin: 6px 0 0;
}

.mtgbrew-form-note {
	font-size: 0.95em;
	color: #9a9ea8;
	margin: 0 0 14px;
}

.mtgbrew-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	color: #f2f3f5;
	cursor: pointer;
}

.mtgbrew-error {
	margin-top: 16px;
	background: #3a1420;
	border: 1px solid #7c2d43;
	color: #fda4af;
	border-radius: 8px;
	padding: 12px 14px;
}

.mtgbrew-brew-banner {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	align-items: center;
	background: #141419;
	border: 1px solid #7c3aed;
	color: #f2f3f5;
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 0.9em;
	margin: 10px 0;
}

.mtgbrew-brew-banner a {
	color: #a78bfa;
	font-weight: 600;
}

.mtgbrew-decks-table {
	width: 100%;
	border-collapse: collapse;
}

.mtgbrew-decks-table th,
.mtgbrew-decks-table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid #26262e;
}

.mtgbrew-decklist {
	list-style: none;
	padding-left: 0;
}

.mtgbrew-card-price {
	color: #9a9ea8;
	font-size: 0.85em;
}

/* ---- Deck page: buy panel + collection ownership (v0.3.0) ---- */

.mtgbrew-buy-panel {
	background: #141419;
	border: 1px solid #26262e;
	border-radius: 12px;
	padding: 16px 20px;
	margin: 18px 0;
}

.mtgbrew-buy-stats {
	font-weight: 600;
	color: #f2f3f5;
	margin: 0 0 10px;
}

.mtgbrew-buy-actions {
	margin: 0;
}

.mtgbrew-decklist li {
	padding: 4px 8px;
	border-radius: 6px;
}

.mtgbrew-decklist li.mtgbrew-card-owned {
	background: rgba(34, 197, 94, 0.14);
	border-left: 3px solid #22c55e;
}

.mtgbrew-owned-label {
	color: #4ade80;
	font-size: 0.85em;
	font-weight: 600;
	margin-left: 6px;
}

.mtgbrew-own-toggle {
	background: #26262e;
	color: #f2f3f5;
	border: 1px solid #34343e;
	border-radius: 999px;
	padding: 2px 12px;
	font-size: 0.8em;
	font-weight: 600;
	cursor: pointer;
	margin-left: 8px;
	vertical-align: middle;
}

.mtgbrew-own-toggle:hover {
	border-color: #22c55e;
	color: #4ade80;
}

.mtgbrew-own-toggle.is-owned {
	background: rgba(34, 197, 94, 0.2);
	border-color: #22c55e;
	color: #4ade80;
}

.mtgbrew-own-toggle[disabled] {
	opacity: 0.55;
	cursor: wait;
}

/* Inline fallback forms (progressive enhancement): the deck-page
   "Own it" form and the collection quantity forms must not break
   the line they sit in. */
.mtgbrew-own-form,
.mtgbrew-qty-form {
	display: inline;
}


/* ---- My Decks: ownership line ---- */

.mtgbrew-deck-own {
	font-size: 0.85em;
	color: #9a9ea8;
	margin-top: 2px;
}

.mtgbrew-deck-own a {
	color: #a78bfa;
}

/* ---- Collection page ---- */

.mtgbrew-collection {
	background: #141419;
	color: #d8dbe0;
	border: 1px solid #26262e;
	border-radius: 12px;
	padding: 20px;
	max-width: 720px;
}

.mtgbrew-collection a {
	color: #a78bfa;
}

.mtgbrew-collection-add {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 14px 0 18px;
}

.mtgbrew-collection-add label {
	width: 100%;
	font-weight: 600;
	color: #f2f3f5;
}

.mtgbrew-collection-add input[type="text"] {
	flex: 1 1 220px;
	background: #0b0b0e;
	color: #f2f3f5;
	border: 1px solid #34343e;
	border-radius: 8px;
	padding: 10px 12px;
}

.mtgbrew-collection-add input[type="number"] {
	width: 80px;
	background: #0b0b0e;
	color: #f2f3f5;
	border: 1px solid #34343e;
	border-radius: 8px;
	padding: 10px 12px;
}

.mtgbrew-btn-small {
	padding: 8px 16px;
}

.mtgbrew-qty-btn {
	background: #26262e;
	color: #f2f3f5;
	border: 1px solid #34343e;
	border-radius: 6px;
	padding: 2px 10px;
	font-weight: 700;
	cursor: pointer;
}

.mtgbrew-qty-btn:hover {
	border-color: #7c3aed;
}

.mtgbrew-collection-qty {
	display: inline-block;
	min-width: 2ch;
	text-align: center;
	font-weight: 600;
}

.mtgbrew-remove-btn {
	font-size: 0.8em;
	font-weight: 600;
}

/* ---- Collection page: search-and-add + photo upload (v0.5.1) ---- */

.mtgbrew-collection-search,
.mtgbrew-collection-photo {
	border-bottom: 1px solid #26262e;
	padding-bottom: 16px;
	margin-bottom: 16px;
}

.mtgbrew-collection-search label,
.mtgbrew-collection-photo label {
	display: block;
	font-weight: 600;
	color: #f2f3f5;
	margin-bottom: 6px;
}

.mtgbrew-collection-search input[type="search"] {
	width: 100%;
	background: #0b0b0e;
	color: #f2f3f5;
	border: 1px solid #34343e;
	border-radius: 8px;
	padding: 10px 12px;
}

.mtgbrew-collection-photo input[type="file"] {
	color: #d8dbe0;
	margin: 4px 10px 4px 0;
}

.mtgbrew-collection-search-results {
	margin-top: 10px;
}

.mtgbrew-search-message {
	color: #9a9ea8;
	font-size: 0.9em;
	margin: 4px 0;
}

.mtgbrew-search-result {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border: 1px solid #26262e;
	border-radius: 8px;
	margin-bottom: 8px;
	background: #101014;
}

.mtgbrew-search-thumb {
	width: 42px;
	height: auto;
	border-radius: 4px;
	flex: 0 0 auto;
}

.mtgbrew-search-main {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mtgbrew-search-name {
	font-weight: 600;
	color: #f2f3f5;
}

.mtgbrew-search-set {
	font-size: 0.85em;
	color: #9a9ea8;
}

.mtgbrew-search-add {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}

.mtgbrew-search-add input[type="number"] {
	width: 64px;
	background: #0b0b0e;
	color: #f2f3f5;
	border: 1px solid #34343e;
	border-radius: 8px;
	padding: 8px 10px;
}

.mtgbrew-search-confirm {
	color: #4ade80;
	font-size: 0.9em;
	font-weight: 600;
}

.mtgbrew-photo-result {
	background: rgba(34, 197, 94, 0.1);
	border: 1px solid #22c55e;
	border-radius: 8px;
	padding: 12px 14px;
	margin: 14px 0;
}

.mtgbrew-photo-result p {
	margin: 0 0 8px;
}

.mtgbrew-photo-result p:last-child {
	margin-bottom: 0;
}

.mtgbrew-photo-added {
	margin: 0 0 8px;
	padding-left: 20px;
}

.mtgbrew-photo-result-empty {
	background: #101014;
	border-color: #34343e;
	color: #d8dbe0;
}

.mtgbrew-photo-result-error {
	background: #3a1420;
	border-color: #7c2d43;
	color: #fda4af;
}

.mtgbrew-photo-result-slot .mtgbrew-photo-result {
	margin-bottom: 0;
}


/* Affiliate program (v0.6.0) — account tab + [mtgbrew_affiliate]. */

.mtgbrew-affiliate h3 {
	margin-top: 0;
	color: #f2f3f5;
}

.mtgbrew-affiliate-status {
	color: #4ade80;
}

.mtgbrew-affiliate-field label {
	font-weight: 600;
	color: #f2f3f5;
}

.mtgbrew-affiliate input[type="text"] {
	width: 100%;
	max-width: 420px;
	background: #0b0b0e;
	color: #f2f3f5;
	border: 1px solid #34343e;
	border-radius: 8px;
	padding: 10px 12px;
	margin-top: 6px;
}

.mtgbrew-hoplink-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.mtgbrew-hoplink-row input[type="text"] {
	flex: 1 1 320px;
	max-width: none;
	margin-top: 0;
}

.mtgbrew-affiliate-flash {
	border-radius: 8px;
	padding: 12px 14px;
	margin: 0 0 14px;
}

.mtgbrew-affiliate-flash p {
	margin: 0;
}

.mtgbrew-affiliate-flash-success {
	background: rgba(34, 197, 94, 0.1);
	border: 1px solid #22c55e;
	color: #d8dbe0;
}

.mtgbrew-affiliate-flash-error {
	background: #3a1420;
	border: 1px solid #7c2d43;
	color: #fda4af;
}

/* Registration opt-in (rendered inside the Ultimate Member form). */

.um-field-mtgbrew-affiliate-join .um-field-checkbox-option {
	cursor: pointer;
}

.um-field-mtgbrew-clickbank-nickname .mtgbrew-field-note {
	font-size: 0.85em;
	opacity: 0.75;
	margin: 6px 0 0;
}

/* Affiliate earnings (v0.6.1) — profile dashboard block under the hoplink. */

.mtgbrew-affiliate-earnings {
	margin-top: 18px;
	border-top: 1px solid #34343e;
	padding-top: 14px;
}

.mtgbrew-affiliate-earnings h4 {
	margin: 0 0 8px;
	color: #f2f3f5;
}

.mtgbrew-earnings-totals {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
	margin: 8px 0 12px;
}

.mtgbrew-earnings-total {
	display: flex;
	flex-direction: column;
}

.mtgbrew-earnings-label {
	font-size: 0.85em;
	opacity: 0.75;
}

.mtgbrew-earnings-value {
	font-size: 1.25em;
	font-weight: 700;
	color: #f2f3f5;
}

.mtgbrew-earnings-table {
	width: 100%;
	border-collapse: collapse;
	margin: 8px 0 12px;
}

.mtgbrew-earnings-table th,
.mtgbrew-earnings-table td {
	text-align: left;
	padding: 6px 8px;
	border-bottom: 1px solid #34343e;
}

.mtgbrew-earnings-negative {
	color: #fda4af;
}

.mtgbrew-earnings-note,
.mtgbrew-earnings-updated,
.mtgbrew-earnings-empty {
	font-size: 0.85em;
	opacity: 0.75;
}
