/**
 * NoCopium Public Journal — inherits the active WordPress theme palette.
 */

/* ─── CSS Variables ─────────────────────────────────────────────────── */
.tlj-wrap {
	/* These fallbacks are replaced with the active theme's computed colors in JS. */
	--tlj-bg:          #ffffff;
	--tlj-bg-card:     #ffffff;
	--tlj-bg-row:      #ffffff;
	--tlj-bg-row-alt:  #f7f7f7;
	--tlj-bg-row-hover:#f0f0f0;
	--tlj-border:      #d9d9d9;
	--tlj-border-light:#c5c5c5;
	--tlj-text:        #1a1a1a;
	--tlj-text-muted:  #5c5c5c;
	--tlj-text-dim:    #858585;
	--tlj-green:       #047857;
	--tlj-red:         #b91c1c;
	--tlj-blue:        #58a6ff;
	--tlj-yellow:      #d29922;
	--tlj-accent:      #1a1a1a;
	--tlj-radius:      8px;
	--tlj-font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	font-family: var(--tlj-font);
	background: var(--tlj-bg);
	color: var(--tlj-text);
	border-radius: 12px;
	overflow: hidden;
	margin: 0;
}

/* ─── Top Bar ───────────────────────────────────────────────────────── */
.tlj-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	padding: 20px 24px 16px;
	border-bottom: 1px solid var(--tlj-border);
	background: var(--tlj-bg-card);
}

.tlj-title-group {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tlj-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tlj-text-muted);
}

.tlj-title {
	font-size: 22px;
	font-weight: 700;
	color: var(--tlj-text);
	margin: 0;
	line-height: 1.2;
}

.tlj-topbar-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.tlj-scheme-switcher {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--tlj-border);
	border-radius: 999px;
	background: var(--tlj-bg);
}

.tlj-scheme-btn {
	border: 0;
	background: transparent;
	color: var(--tlj-text-muted);
	font-family: var(--tlj-font);
	font-size: 13px;
	font-weight: 700;
	padding: 10px 14px;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.tlj-scheme-btn.active {
	background: var(--tlj-bg-card);
	color: var(--tlj-text);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tlj-view-switcher {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px;
	border: 1px solid var(--tlj-border);
	border-radius: 999px;
	background: var(--tlj-bg);
}

.tlj-view-btn {
	border: 0;
	background: transparent;
	color: var(--tlj-text-muted);
	font-family: var(--tlj-font);
	font-size: 13px;
	font-weight: 700;
	padding: 10px 18px;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.tlj-view-btn.active {
	background: var(--tlj-bg-card);
	color: var(--tlj-text);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ─── Stats Row ─────────────────────────────────────────────────────── */
.tlj-stats-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	background: var(--tlj-border);
	border-bottom: 1px solid var(--tlj-border);
}

.tlj-stat-card {
	background: var(--tlj-bg-card);
	padding: 18px 24px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tlj-stat-label {
	font-size: 12px;
	color: var(--tlj-text-muted);
	font-weight: 500;
}

.tlj-stat-value {
	font-size: 28px;
	font-weight: 700;
	color: var(--tlj-text);
	line-height: 1.1;
}

.tlj-stat-value.tlj-win  { color: var(--tlj-green); }
.tlj-stat-value.tlj-loss { color: var(--tlj-red); }

.tlj-stat-sublabel {
	font-size: 11px;
	color: var(--tlj-text-dim);
	font-weight: 500;
}

/* ─── Filter chips ──────────────────────────────────────────────────── */
.tlj-filter-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: var(--tlj-bg-card);
	border-bottom: 1px solid var(--tlj-border);
}

.tlj-filter-chips[hidden] {
	display: none !important;
}

.tlj-filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border-radius: 999px;
	border: 1px solid var(--tlj-border);
	background: var(--tlj-bg);
	color: var(--tlj-text);
	font-family: var(--tlj-font);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
}

.tlj-filter-chip:hover {
	border-color: var(--tlj-accent);
	color: var(--tlj-blue);
}

.tlj-filter-chip-x {
	font-size: 14px;
	line-height: 1;
	opacity: 0.6;
}

.tlj-filter-chip-clear {
	border-style: dashed;
	color: var(--tlj-text-muted);
	font-weight: 500;
}

.tlj-filters-backdrop {
	display: none !important;
}

/* ─── Body Layout (filters + table) ────────────────────────────────── */
.tlj-body {
	display: flex;
	align-items: flex-start;
	background: var(--tlj-bg);
}

/* ─── Filters Sidebar ───────────────────────────────────────────────── */
.tlj-filters-sidebar {
	width: 44px;
	min-height: 400px;
	background: var(--tlj-bg-card);
	border-right: 1px solid var(--tlj-border);
	transition: width 0.2s ease;
	overflow: hidden;
	flex-shrink: 0;
}

.tlj-filters-sidebar.open {
	width: 272px;
	position: relative;
	z-index: 3;
}

.tlj-filters-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-height: 110px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: var(--tlj-text-muted);
	writing-mode: vertical-rl;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	gap: 6px;
	font-family: var(--tlj-font);
	padding: 14px 0;
	width: 100%;
	white-space: nowrap;
	line-height: 1.2;
	transition: color 0.15s;
}

.tlj-filters-toggle:hover {
	color: var(--tlj-text);
}

.tlj-filters-toggle .tlj-toggle-arrow {
	writing-mode: horizontal-tb;
	font-size: 10px;
}

.tlj-filters-panel {
	display: none;
	padding: 0 16px 16px;
	width: 100%;
	box-sizing: border-box;
}

.tlj-filters-sidebar.open .tlj-filters-panel {
	display: block;
}

.tlj-filters-sidebar.open .tlj-filters-toggle {
	writing-mode: horizontal-tb;
	justify-content: space-between;
	padding: 12px 16px;
	width: 100%;
	height: auto;
	border-bottom: 1px solid var(--tlj-border);
	margin-bottom: 12px;
}

.tlj-filters-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
}

.tlj-filters-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--tlj-text);
}

.tlj-filters-count {
	font-size: 11px;
	color: var(--tlj-text-muted);
}

.tlj-filter-group {
	margin-bottom: 16px;
}

.tlj-filter-group-inline {
	display: flex;
	gap: 10px;
}

.tlj-filter-col {
	flex: 1;
	min-width: 0;
}

.tlj-filter-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--tlj-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 6px;
	display: block;
}

.tlj-filter-input,
.tlj-filter-select {
	width: 100%;
	box-sizing: border-box;
	background: var(--tlj-bg);
	border: 1px solid var(--tlj-border);
	border-radius: 6px;
	color: var(--tlj-text);
	padding: 8px 10px;
	font-size: 13px;
	font-family: var(--tlj-font);
}

.tlj-filter-input {
	padding: 8px 10px;
}

.tlj-filter-select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237d8590' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	padding-right: 28px;
	cursor: pointer;
}

.tlj-filter-select:focus {
	outline: none;
	border-color: var(--tlj-accent);
}

.tlj-filter-reset {
	width: 100%;
	background: transparent;
	border: 1px solid var(--tlj-border);
	border-radius: 6px;
	color: var(--tlj-text-muted);
	padding: 8px;
	font-size: 12px;
	cursor: pointer;
	font-family: var(--tlj-font);
	margin-top: 8px;
	transition: all 0.15s;
}

.tlj-filter-reset:hover {
	border-color: var(--tlj-text-muted);
	color: var(--tlj-text);
}

.tlj-filter-reset:focus-visible,
.tlj-filter-chip:focus-visible,
.tlj-page-btn:focus-visible,
.tlj-info-btn:focus-visible,
.tlj-view-btn:focus-visible,
.tlj-scheme-btn:focus-visible,
.tlj-filters-toggle:focus-visible,
.tlj-pnl-cal-nav-btn:focus-visible,
.tlj-lightbox-close:focus-visible,
.tlj-scroll-top:focus-visible {
	outline: 2px solid var(--tlj-blue);
	outline-offset: 2px;
}

/* ─── Table Section ─────────────────────────────────────────────────── */
.tlj-table-section {
	flex: 1;
	overflow: hidden;
}

.tlj-table-view,
.tlj-calendar-view {
	width: 100%;
}

.tlj-calendar-view.is-hidden,
.tlj-table-view.is-hidden,
.is-hidden {
	display: none !important;
}

.tlj-calendar-view {
	width: 100%;
	box-sizing: border-box;
}

.tlj-pnl-cal {
	padding: 16px 20px 12px;
	width: 100%;
	max-width: none;
	margin: 0;
	box-sizing: border-box;
}

.tlj-pnl-cal-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 4px 10px;
	gap: 8px;
}

.tlj-pnl-cal-month {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--tlj-text);
}

.tlj-pnl-cal-nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 6px;
	border: 1px solid var(--tlj-border);
	background: var(--tlj-bg-card);
	color: var(--tlj-text);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.tlj-pnl-cal-nav-btn:hover {
	border-color: var(--tlj-border-light);
	background: var(--tlj-bg-row);
}

.tlj-pnl-cal-weekdays,
.tlj-pnl-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 6px;
}

.tlj-pnl-cal-weekdays {
	margin-bottom: 6px;
	color: var(--tlj-text-muted);
	font-size: 12px;
	font-weight: 700;
	text-align: center;
}

.tlj-pnl-cal-cell {
	min-height: 88px;
	border-radius: 8px;
	border: 1px solid var(--tlj-border);
	background: var(--tlj-bg-card);
	padding: 8px;
	display: flex;
	flex-direction: column;
	min-width: 0;
	box-sizing: border-box;
}

.tlj-pnl-cal-cell.is-pad {
	visibility: hidden;
	border: none;
	background: transparent;
}

.tlj-pnl-cal-cell.is-win {
	background: #d1fae5;
	border-color: #6ee7b7;
	color: #065f46;
}

.tlj-pnl-cal-cell.is-loss {
	background: #fee2e2;
	border-color: #fca5a5;
	color: #991b1b;
}

.tlj-pnl-cal-cell.is-today {
	box-shadow: inset 0 0 0 2px var(--tlj-blue);
}

.tlj-pnl-cal-cell.is-click {
	cursor: pointer;
}

.tlj-pnl-cal-cell.is-click:hover,
.tlj-pnl-cal-cell.is-click:focus {
	outline: none;
	filter: brightness(0.97);
}

.tlj-pnl-cal-num {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	color: inherit;
}

.tlj-pnl-cal-meta {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 100%;
	text-align: center;
}

.tlj-pnl-cal-count {
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	color: inherit;
}

.tlj-pnl-cal-amt {
	font-size: 13px;
	font-weight: 800;
	line-height: 1.15;
	text-align: center;
	word-break: break-word;
}

.tlj-pnl-cal-cell.is-win .tlj-pnl-cal-num,
.tlj-pnl-cal-cell.is-win .tlj-pnl-cal-count,
.tlj-pnl-cal-cell.is-win .tlj-pnl-cal-amt {
	color: #064e3b;
}

.tlj-pnl-cal-cell.is-loss .tlj-pnl-cal-num,
.tlj-pnl-cal-cell.is-loss .tlj-pnl-cal-count,
.tlj-pnl-cal-cell.is-loss .tlj-pnl-cal-amt {
	color: #7f1d1d;
}

.tlj-pnl-cal-foot {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 12px;
	padding: 12px 4px 8px;
	border-top: 1px solid var(--tlj-border);
	font-size: 13px;
}

.tlj-pnl-cal-foot-label {
	display: block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tlj-text-dim);
	margin-bottom: 2px;
}

.tlj-text-win { color: var(--tlj-green); }
.tlj-text-loss { color: var(--tlj-red); }
.tlj-text-muted { color: var(--tlj-text-muted); }
.tlj-text-right { text-align: right; }

.tlj-day-trades-modal {
	--tlj-green: #047857;
	--tlj-red: #b91c1c;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(4px);
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
}

.tlj-day-trades-modal[hidden] {
	display: none !important;
}

.tlj-day-trades-dialog {
	background: var(--tlj-bg-card);
	color: var(--tlj-text);
	border-radius: 12px;
	width: 100%;
	max-width: 760px;
	margin: 40px auto;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
	overflow: hidden;
}

.tlj-day-trades-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px 8px;
}

.tlj-day-trades-header h3 {
	margin: 0;
	font-size: 16px;
}

.tlj-day-trades-close {
	border: 0;
	background: transparent;
	color: var(--tlj-text-muted);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.tlj-day-trades-sub {
	margin: 0 20px 12px;
	color: var(--tlj-text-muted);
	font-size: 13px;
}

.tlj-day-trades-table-wrap {
	overflow-x: auto;
	padding: 0 8px 16px;
}

.tlj-day-trades-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.tlj-day-trades-table th {
	text-align: left;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--tlj-text-muted);
	padding: 8px 12px;
	border-bottom: 1px solid var(--tlj-border);
}

.tlj-day-trades-table td {
	padding: 12px;
	border-bottom: 1px solid var(--tlj-border);
	vertical-align: middle;
}

.tlj-day-trades-table .tlj-text-win,
.tlj-day-trades-table .tlj-text-loss {
	font-weight: 800;
}

.tlj-wrap.tlj-scheme-dark,
.tlj-day-trades-modal.tlj-scheme-dark {
	--tlj-bg: #0d1117;
	--tlj-bg-card: #161b22;
	--tlj-bg-row: #161b22;
	--tlj-bg-row-alt: #1c2330;
	--tlj-bg-row-hover: #21262d;
	--tlj-border: #30363d;
	--tlj-border-light: #484f58;
	--tlj-text: #f0f6fc;
	--tlj-text-muted: #c9d1d9;
	--tlj-text-dim: #8b949e;
	--tlj-green: #3fb950;
	--tlj-red: #f85149;
	--tlj-blue: #58a6ff;
	--tlj-accent: #f0f6fc;
}

.tlj-wrap.tlj-scheme-light,
.tlj-day-trades-modal.tlj-scheme-light {
	--tlj-green: #047857;
	--tlj-red: #b91c1c;
}

.tlj-wrap.tlj-is-dark,
.tlj-day-trades-modal.tlj-is-dark {
	--tlj-green: #4ade80;
	--tlj-red: #f87171;
}

.tlj-wrap.tlj-is-light,
.tlj-day-trades-modal.tlj-is-light {
	--tlj-green: #047857;
	--tlj-red: #b91c1c;
}

@media (prefers-color-scheme: dark) {
	.tlj-wrap.tlj-scheme-auto:not(.tlj-is-light),
	.tlj-day-trades-modal.tlj-scheme-auto:not(.tlj-is-light) {
		--tlj-green: #4ade80;
		--tlj-red: #f87171;
	}
}

.tlj-filter-mobile-btn {
	display: none;
	align-items: center;
	gap: 6px;
	background: var(--tlj-bg);
	border: 1px solid var(--tlj-border);
	border-radius: 6px;
	color: var(--tlj-text);
	padding: 6px 12px;
	font-size: 13px;
	font-weight: 600;
	font-family: var(--tlj-font);
	cursor: pointer;
	margin-right: auto;
}

.tlj-pagination-bar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	padding: 10px 20px;
	border-bottom: 1px solid var(--tlj-border);
	font-size: 13px;
	color: var(--tlj-text-muted);
	background: var(--tlj-bg-card);
}

.tlj-pagination-bar-bottom {
	border-bottom: 0;
	border-top: 1px solid var(--tlj-border);
}

.tlj-rows-label {
	display: flex;
	align-items: center;
	gap: 6px;
}

.tlj-rows-select {
	background: var(--tlj-bg);
	border: 1px solid var(--tlj-border);
	border-radius: 4px;
	color: var(--tlj-text);
	padding: 4px 6px;
	font-size: 13px;
	font-family: var(--tlj-font);
	cursor: pointer;
}

.tlj-page-info {
	color: var(--tlj-text-muted);
}

.tlj-page-btn {
	background: var(--tlj-bg-card);
	border: 1px solid var(--tlj-border);
	border-radius: 4px;
	color: var(--tlj-text);
	padding: 5px 12px;
	font-size: 13px;
	font-family: var(--tlj-font);
	cursor: pointer;
	font-weight: 600;
	transition: all 0.15s;
}

.tlj-page-btn:hover:not(:disabled) {
	background: var(--tlj-bg-row-hover);
	border-color: var(--tlj-accent);
	color: var(--tlj-blue);
}

.tlj-page-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* Table */
.tlj-table-wrap {
	overflow-x: auto;
	max-height: none;
}

.tlj-table th {
	position: sticky;
	top: 0;
	z-index: 2;
	background: var(--tlj-bg-card);
	color: var(--tlj-text-muted);
	font-size: 12px;
	font-weight: 600;
	text-align: left;
	padding: 10px 16px;
	border-bottom: 1px solid var(--tlj-border);
	white-space: nowrap;
	user-select: none;
}

.tlj-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.tlj-table th.sortable {
	cursor: pointer;
}

.tlj-table th.sortable:hover {
	color: var(--tlj-text);
}

.tlj-sort-icon {
	margin-left: 4px;
	opacity: 0.5;
	font-size: 10px;
}

.tlj-table th.sort-asc .tlj-sort-icon::after  { content: '↑'; opacity: 1; }
.tlj-table th.sort-desc .tlj-sort-icon::after { content: '↓'; opacity: 1; }
.tlj-table th:not(.sort-asc):not(.sort-desc) .tlj-sort-icon::after { content: '↕'; }

.tlj-table td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--tlj-border);
	vertical-align: middle;
	color: var(--tlj-text);
}

.tlj-table tbody tr {
	background: var(--tlj-bg-row);
	transition: background 0.1s;
}

.tlj-table tbody tr:nth-child(even) {
	background: var(--tlj-bg-row-alt);
}

.tlj-table tbody tr:hover {
	background: var(--tlj-bg-row-hover);
}

.tlj-table tbody tr.tlj-row-win {
	border-left: 3px solid var(--tlj-green);
}

.tlj-table tbody tr.tlj-row-loss {
	border-left: 3px solid var(--tlj-red);
}

.tlj-table tbody tr.tlj-row-linked td:nth-child(3) strong {
	letter-spacing: 0.01em;
}

.tlj-table tbody tr.tlj-trade-row {
	cursor: pointer;
}

.tlj-pnl-pct {
	color: var(--tlj-text-muted);
	font-weight: 500;
}

/* Status badges */
.tlj-status-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 3px 10px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.tlj-status-win {
	background: rgba(63, 185, 80, 0.15);
	color: var(--tlj-green);
	border: 1px solid rgba(63, 185, 80, 0.3);
}

.tlj-status-loss {
	background: rgba(248, 81, 73, 0.15);
	color: var(--tlj-red);
	border: 1px solid rgba(248, 81, 73, 0.3);
}

.tlj-status-open {
	background: rgba(88, 166, 255, 0.12);
	color: var(--tlj-blue);
	border: 1px solid rgba(88, 166, 255, 0.25);
}

.tlj-status-closed {
	background: rgba(139, 148, 158, 0.15);
	color: var(--tlj-text-muted);
	border: 1px solid rgba(139, 148, 158, 0.3);
}

.tlj-status-breakeven {
	background: rgba(210, 153, 34, 0.15);
	color: var(--tlj-yellow);
	border: 1px solid rgba(210, 153, 34, 0.3);
}

/* Side pill */
.tlj-side-pill {
	font-size: 12px;
	font-weight: 700;
}

.tlj-side-credit,
.tlj-side-short { color: var(--tlj-red); }

.tlj-side-debit,
.tlj-side-long  { color: var(--tlj-green); }

/* PnL */
.tlj-pnl-win  { color: var(--tlj-green); font-weight: 700; }
.tlj-pnl-loss { color: var(--tlj-red);   font-weight: 700; }
.tlj-pnl-open { color: var(--tlj-text-muted); }

.tlj-idea-cash {
	color: var(--tlj-text-muted);
	font-size: 12px;
	line-height: 1.35;
}

.tlj-idea-cash small {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
}

.tlj-idea-be {
	display: block;
	margin-top: 2px;
	font-size: 10px !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	font-weight: 500 !important;
}

/* Screenshot thumbnails */
.tlj-screenshots {
	display: flex;
	gap: 4px;
}

.tlj-screenshot-thumb {
	width: 44px;
	height: 30px;
	object-fit: cover;
	border-radius: 3px;
	border: 1px solid var(--tlj-border);
	cursor: pointer;
	transition: opacity 0.15s;
}

.tlj-screenshot-thumb:hover {
	opacity: 0.8;
}

/* Info icon button */
.tlj-info-btn {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid var(--tlj-border-light);
	background: var(--tlj-bg-card);
	color: var(--tlj-text-muted);
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
	font-family: var(--tlj-font);
}

.tlj-info-btn:hover {
	background: var(--tlj-accent);
	border-color: var(--tlj-accent);
	color: #fff;
}

/* ─── Detail Drawer ─────────────────────────────────────────────────── */
.tlj-detail-row {
	display: none;
}

.tlj-detail-row.open {
	display: table-row;
}

.tlj-detail-cell {
	padding: 0 !important;
	border-bottom: 1px solid var(--tlj-border) !important;
}

.tlj-detail-inner {
	padding: 16px 24px;
	background: rgba(31, 111, 235, 0.05);
	border-left: 3px solid var(--tlj-accent);
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 12px 24px;
}

.tlj-detail-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tlj-detail-item-label {
	font-size: 11px;
	color: var(--tlj-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.tlj-detail-item-value {
	font-size: 13px;
	color: var(--tlj-text);
	font-weight: 600;
}

.tlj-glossary-term {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.tlj-glossary-tip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--tlj-accent-soft, rgba(59, 130, 246, 0.15));
	color: var(--tlj-accent, #3b82f6);
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	cursor: help;
	vertical-align: middle;
}

.tlj-glossary-tip:hover,
.tlj-glossary-tip:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.tlj-detail-item-label .tlj-glossary-tip {
	flex-shrink: 0;
}

.tlj-detail-legs {
	grid-column: 1 / -1;
	border-top: 1px solid var(--tlj-border);
	padding-top: 12px;
	margin-top: 4px;
}

.tlj-detail-legs-title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--tlj-text-muted);
	margin-bottom: 10px;
}

.tlj-legs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px;
}

.tlj-leg-card {
	background: var(--tlj-surface, rgba(255, 255, 255, 0.06));
	border: 1px solid var(--tlj-border);
	border-radius: 8px;
	padding: 10px 12px;
}

.tlj-leg-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
}

.tlj-leg-num {
	font-size: 11px;
	font-weight: 700;
	color: var(--tlj-text-muted);
	text-transform: uppercase;
}

.tlj-leg-action {
	font-size: 10px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
}

.tlj-action-buy {
	background: rgba(59, 130, 246, 0.18);
	color: #60a5fa;
}

.tlj-action-sell {
	background: rgba(245, 158, 11, 0.18);
	color: #fbbf24;
}

.tlj-wrap.tlj-is-light .tlj-action-buy,
.tlj-wrap.tlj-scheme-light .tlj-action-buy {
	background: #dbeafe;
	color: #1e40af;
}

.tlj-wrap.tlj-is-light .tlj-action-sell,
.tlj-wrap.tlj-scheme-light .tlj-action-sell {
	background: #fef3c7;
	color: #92400e;
}

.tlj-wrap.tlj-is-light .tlj-leg-card,
.tlj-wrap.tlj-scheme-light .tlj-leg-card {
	background: #ffffff;
}

.tlj-leg-strike {
	font-size: 13px;
	margin-bottom: 4px;
	color: var(--tlj-text);
}

.tlj-leg-strike strong {
	color: var(--tlj-text);
}

.tlj-leg-exp {
	font-size: 12px;
	color: var(--tlj-text-muted);
	margin-left: 6px;
}

.tlj-leg-pricing {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--tlj-text-muted);
}

.tlj-leg-desc {
	font-size: 11px;
	color: var(--tlj-text-muted);
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px dashed var(--tlj-border);
}

/* ─── Empty State ───────────────────────────────────────────────────── */
.tlj-empty {
	text-align: center;
	padding: 60px 24px;
	color: var(--tlj-text-muted);
}

.tlj-empty-icon {
	margin-bottom: 12px;
	opacity: 0.45;
	color: var(--tlj-text-muted);
	display: flex;
	justify-content: center;
}

.tlj-empty-svg {
	display: block;
}

.tlj-empty h4 {
	margin: 0 0 6px;
	font-size: 16px;
	color: var(--tlj-text);
}

.tlj-empty p {
	margin: 0;
	font-size: 13px;
}

/* ─── Lightbox ──────────────────────────────────────────────────────── */
.tlj-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.85);
	z-index: 999999;
	align-items: center;
	justify-content: center;
}

.tlj-lightbox[hidden] {
	display: none !important;
}

.tlj-lightbox.open:not([hidden]) {
	display: flex;
}

.tlj-lightbox img {
	max-width: 90vw;
	max-height: 90vh;
	border-radius: 6px;
	box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}

.tlj-lightbox-close {
	position: fixed;
	top: 20px;
	right: 24px;
	background: none;
	border: none;
	color: #fff;
	font-size: 32px;
	cursor: pointer;
	line-height: 1;
	opacity: 0.7;
}

.tlj-lightbox-close:hover {
	opacity: 1;
}

/* ─── Scroll-to-top button ──────────────────────────────────────────── */
.tlj-scroll-top {
	position: fixed;
	bottom: 28px;
	right: 28px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--tlj-accent);
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(0,0,0,0.4);
	z-index: 9999;
	transition: opacity 0.2s;
}

.tlj-scroll-top.visible {
	display: flex;
}

/* ─── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.tlj-stats-row {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.tlj-stats-row {
		grid-template-columns: 1fr;
	}

	.tlj-topbar {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.tlj-filter-mobile-btn {
		display: inline-flex;
	}

	.tlj-filters-backdrop:not([hidden]) {
		display: block !important;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.45);
		z-index: 99998;
	}

	.tlj-filters-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: min(88vw, 300px);
		min-height: 0;
		z-index: 99999;
		transform: translateX(-105%);
		transition: transform 0.2s ease;
		box-shadow: 8px 0 24px rgba(0, 0, 0, 0.2);
	}

	.tlj-filters-sidebar:not(.open) {
		width: min(88vw, 300px);
	}

	.tlj-filters-toggle {
		writing-mode: horizontal-tb;
		min-height: auto;
		padding: 14px 16px;
		justify-content: space-between;
	}

	.tlj-filters-panel {
		display: block;
		opacity: 0;
		pointer-events: none;
	}

	.tlj-filters-sidebar.open {
		transform: translateX(0);
	}

	.tlj-filters-sidebar.open .tlj-filters-panel {
		opacity: 1;
		pointer-events: auto;
	}

	.tlj-table th,
	.tlj-table td {
		padding: 10px 10px;
	}

	.tlj-table th.tlj-col-context,
	.tlj-table td.tlj-col-context {
		display: none;
	}

	.tlj-stat-value {
		font-size: 22px;
	}

	.tlj-pnl-cal-cell {
		min-height: 64px;
		padding: 6px;
	}

	.tlj-pnl-cal-count {
		font-size: 10px;
	}

	.tlj-pnl-cal-amt {
		font-size: 11px;
	}
}

/* Login required message */
.tlj-login-required {
	padding: 32px 20px;
	text-align: center;
	background: var(--tlj-bg-card, #f8fafc);
	border: 1px solid var(--tlj-border, #e2e8f0);
	border-radius: 10px;
	color: var(--tlj-text, #374151);
	font-size: 15px;
}
.tlj-login-required a {
	color: var(--tlj-blue, #2563eb);
	font-weight: 600;
	text-decoration: none;
}
.tlj-login-required a:hover {
	text-decoration: underline;
}
