/**
 * Subscriber Manager - Admin Users Table Styles
 *
 * @since 2.0.0
 */

/* ── Tab Content Panels ────────────────────────────────── */

.wctlgm-content-tab {
	display: none;
}

.wctlgm-content-tab.wctlgm-tab-active {
	display: block;
}

/* ── Status Badges ─────────────────────────────────────── */

.wctlgm-status-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.6;
	margin: 1px 2px;
}

.wctlgm-status-pending {
	background: #fff3cd;
	color: #856404;
}

.wctlgm-status-active {
	background: #d4edda;
	color: #155724;
}

.wctlgm-status-left {
	background: #f8d7da;
	color: #721c24;
}

.wctlgm-status-removed {
	background: #e2e3e5;
	color: #383d41;
}

.wctlgm-status-banned {
	background: #f8d7da;
	color: #721c24;
	font-weight: 600;
}

.wctlgm-status-expired {
	background: #fde8d0;
	color: #7c4a03;
}

.wctlgm-status-unknown {
	background: #e2e3e5;
	color: #383d41;
}

/* ── Channel Badges ────────────────────────────────────── */

.wctlgm-channel-badge {
	display: inline-block;
	padding: 2px 8px;
	margin: 1px 2px;
	border-radius: 3px;
	font-size: 12px;
	background: #e8f0fe;
	color: #1a73e8;
}

/* ── Channel-Status Pairs (table column) ──────────────── */

.wctlgm-channel-status-pair {
	display: block;
	margin: 2px 0;
	white-space: nowrap;
}

.wctlgm-channel-status-pair .wctlgm-status-badge {
	font-size: 11px;
	padding: 1px 6px;
}

/* ── Table Enhancements ────────────────────────────────── */

.wp-list-table .wctlgm-view-user {
	cursor: pointer;
}

#wctlgm-subscriber-table-wrap {
	position: relative;
}

#wctlgm-subscriber-table-wrap.wctlgm-loading {
	opacity: 0.5;
	pointer-events: none;
}

/* ── Modal ─────────────────────────────────────────────── */

.wctlgm-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 100000;
	display: none;
}

.wctlgm-modal-overlay.wctlgm-modal-visible {
	display: flex;
	align-items: center;
	justify-content: center;
}

.wctlgm-modal {
	background: #fff;
	border-radius: 4px;
	max-width: 650px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.wctlgm-modal-header {
	padding: 15px 20px;
	border-bottom: 1px solid #ddd;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wctlgm-modal-header h3 {
	margin: 0;
	font-size: 16px;
}

.wctlgm-modal-close {
	cursor: pointer;
	font-size: 24px;
	color: #666;
	background: none;
	border: none;
	padding: 0;
	line-height: 1;
}

.wctlgm-modal-close:hover {
	color: #d63638;
}

.wctlgm-modal-body {
	padding: 20px;
}

/* ── Modal Detail Fields ───────────────────────────────── */

.wctlgm-detail-row {
	display: flex;
	padding: 6px 0;
	border-bottom: 1px solid #f0f0f0;
}

.wctlgm-detail-label {
	font-weight: 600;
	width: 120px;
	flex-shrink: 0;
	color: #1d2327;
}

.wctlgm-detail-value {
	flex: 1;
}

/* ── Modal Channel Rows ────────────────────────────────── */

.wctlgm-modal-channels-header {
	font-weight: 600;
	margin: 20px 0 10px;
	padding-top: 10px;
	border-top: 2px solid #ddd;
}

.wctlgm-channel-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f0;
}

.wctlgm-channel-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.wctlgm-channel-actions .button {
	margin-left: 5px;
}

.wctlgm-channel-actions .button-link-delete {
	color: #d63638;
}

.wctlgm-channel-actions .button-link-delete:hover {
	color: #a00;
}

/* ── Loading Spinner ───────────────────────────────────── */

.wctlgm-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid #ccc;
	border-top-color: #0073aa;
	border-radius: 50%;
	animation: wctlgm-spin 0.6s linear infinite;
	vertical-align: middle;
	margin-right: 8px;
}

@keyframes wctlgm-spin {
	to { transform: rotate(360deg); }
}

/* ── Multi-Access Warning ──────────────────────────────── */

.wctlgm-warning {
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 3px;
	padding: 8px 12px;
	margin: 10px 0;
	font-size: 13px;
}

/* ── Pending Invites Section ─────────────────────────────── */

#wctlgm-pending-invites-section {
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #ddd;
}

#wctlgm-pending-invites-section h3 {
	margin-bottom: 5px;
}

#wctlgm-pending-invites-section .description {
	margin-bottom: 12px;
	color: #646970;
}

#wctlgm-pending-invites-section .wctlgm-pending-revoke {
	color: #d63638;
	border-color: #d63638;
}

#wctlgm-pending-invites-section .wctlgm-pending-revoke:hover {
	background: #d63638;
	color: #fff;
	border-color: #d63638;
}
