/**
 * Clicks User Manager - Admin Stylesheet
 * Developer: Clicks - Digital Marketing & Software Agency | clicks.com.pk
 */

/* =========================================================================
   Pro Banner
   ========================================================================= */
.wpum-pro-banner {
	display: flex;
	align-items: center;
	gap: 10px;
	background: linear-gradient(135deg, #1d2327 0%, #2c3338 100%);
	color: #f0f0f1;
	border-left: 4px solid #2271b1;
	padding: 12px 16px;
	margin-bottom: 20px;
	border-radius: 3px;
	font-size: 13px;
	line-height: 1.5;
}

.wpum-pro-banner .wpum-pro-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.wpum-pro-banner .wpum-pro-text {
	flex: 1;
}

.wpum-pro-banner a {
	color: #72aee6;
	font-weight: 600;
}

.wpum-pro-banner a:hover {
	color: #a8d1ff;
}

/* =========================================================================
   Wrap & Headings
   ========================================================================= */
.wpum-wrap h1.wp-heading-inline {
	margin-right: 8px;
}

.wpum-total-badge {
	display: inline-block;
	background: #2271b1;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 10px;
	vertical-align: middle;
	margin-left: 4px;
}

/* =========================================================================
   Filter Bar
   ========================================================================= */
.wpum-filter-bar {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	padding: 14px 16px;
	margin-bottom: 12px;
}

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

.wpum-filter-group {
	flex-shrink: 0;
}

.wpum-filter-group.wpum-filter-search {
	flex: 1 1 220px;
	min-width: 180px;
}

.wpum-filter-group input[type="search"],
.wpum-filter-group select,
.wpum-filter-group input[type="date"] {
	height: 30px;
	line-height: 28px;
	padding: 0 8px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	font-size: 13px;
	color: #1d2327;
	background: #fff;
	box-sizing: border-box;
}

.wpum-filter-group input[type="search"] {
	width: 100%;
}

.wpum-filter-group input[type="date"] {
	width: 140px;
}

/* =========================================================================
   Bulk Actions Bar
   ========================================================================= */
.wpum-bulk-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 8px;
}

.wpum-bulk-left,
.wpum-bulk-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wpum-selected-count {
	font-size: 13px;
	color: #50575e;
	font-style: italic;
}

/* =========================================================================
   Users Table
   ========================================================================= */
.wpum-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

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

.wpum-users-table th,
.wpum-users-table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid #f0f0f1;
	vertical-align: middle;
}

.wpum-users-table thead th {
	background: #f6f7f7;
	font-weight: 600;
	white-space: nowrap;
	color: #1d2327;
}

.wpum-users-table thead th a {
	color: #1d2327;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 4px;
}

.wpum-users-table thead th a:hover {
	color: #2271b1;
}

.wpum-users-table thead th.sorted.asc a::after {
	content: ' ↑';
	font-size: 11px;
}

.wpum-users-table thead th.sorted.desc a::after {
	content: ' ↓';
	font-size: 11px;
}

.wpum-users-table tbody tr:nth-child(even) {
	background: #f9f9f9;
}

.wpum-users-table tbody tr:hover {
	background: #f0f6fc;
}

.wpum-users-table tbody tr.wpum-current-user {
	background: #fffbe6;
}

.wpum-col-cb {
	width: 30px;
	text-align: center !important;
}

.wpum-col-actions {
	white-space: nowrap;
	width: 100px;
}

.wpum-col-post-count {
	text-align: center !important;
	width: 60px;
}

.wpum-col-orders {
	text-align: center !important;
	width: 60px;
}

.wpum-display-name {
	color: #646970;
	font-size: 12px;
}

.wpum-you-badge {
	display: inline-block;
	background: #d63638;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 5px;
	border-radius: 3px;
	vertical-align: middle;
	margin-left: 4px;
}

.wpum-never {
	color: #a7aaad;
	font-style: italic;
}

.wpum-no-users {
	text-align: center;
	padding: 30px !important;
	color: #646970;
	font-style: italic;
}

/* Row action buttons */
.wpum-row-actions {
	display: flex;
	gap: 4px;
}

.wpum-row-actions .button-small {
	padding: 0 4px;
	height: 26px;
	line-height: 24px;
	min-width: 26px;
	text-align: center;
}

.wpum-row-actions .button-small .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	line-height: 1.8;
}

.wpum-delete-single {
	color: #d63638 !important;
	border-color: #d63638 !important;
}

.wpum-delete-single:hover {
	background: #d63638 !important;
	color: #fff !important;
}

/* =========================================================================
   Pagination
   ========================================================================= */
.wpum-pagination {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
	font-size: 13px;
	color: #646970;
}

.wpum-pagination .page-numbers {
	display: inline-block;
	padding: 4px 8px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	color: #2271b1;
	text-decoration: none;
	font-size: 13px;
	margin: 0 2px;
}

.wpum-pagination .page-numbers.current {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.wpum-pagination .page-numbers:hover:not(.current) {
	background: #f0f6fc;
}

/* =========================================================================
   Modals
   ========================================================================= */
.wpum-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999999;
}

.wpum-modal.is-open {
	display: flex;
	align-items: center;
	justify-content: center;
}

.wpum-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.wpum-modal-dialog {
	position: relative;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	width: 90%;
	max-width: 480px;
	z-index: 1;
	animation: wpumFadeIn 0.2s ease;
}

.wpum-modal-large {
	max-width: 640px;
}

@keyframes wpumFadeIn {
	from { opacity: 0; transform: translateY(-20px); }
	to   { opacity: 1; transform: translateY(0); }
}

.wpum-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #c3c4c7;
	background: #f6f7f7;
	border-radius: 4px 4px 0 0;
}

.wpum-modal-header h2 {
	margin: 0;
	font-size: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wpum-modal-header h2 .dashicons {
	color: #d63638;
	font-size: 20px;
	width: 20px;
	height: 20px;
}

#wpum-mail-modal .wpum-modal-header h2 .dashicons {
	color: #2271b1;
}

.wpum-modal-close {
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #646970;
	padding: 0;
	line-height: 1;
}

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

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

.wpum-modal-body p {
	margin: 0 0 12px;
}

.wpum-modal-warning {
	color: #d63638;
	font-weight: 600;
	font-size: 13px;
}

.wpum-modal-footer {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 20px;
	border-top: 1px solid #c3c4c7;
	background: #f6f7f7;
	border-radius: 0 0 4px 4px;
}

.button-delete-confirm {
	background: #d63638 !important;
	border-color: #d63638 !important;
	color: #fff !important;
}

.button-delete-confirm:hover {
	background: #b32d2e !important;
	border-color: #b32d2e !important;
}

/* Mail modal form */
#wpum-mail-modal .form-table th {
	width: 80px;
	padding-top: 12px;
}

#wpum-mail-modal .form-table td {
	padding: 6px 0;
}

.wpum-mail-result {
	padding: 10px 14px;
	border-radius: 3px;
	margin-top: 10px;
	font-size: 13px;
}

.wpum-mail-result.success {
	background: #d7edd2;
	border-left: 4px solid #00a32a;
	color: #1a5c1a;
}

.wpum-mail-result.error {
	background: #fbeaea;
	border-left: 4px solid #d63638;
	color: #6b0000;
}

/* =========================================================================
   Spinner
   ========================================================================= */
.wpum-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid #c3c4c7;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: wpumSpin 0.7s linear infinite;
	vertical-align: middle;
	visibility: hidden;
}

.wpum-spinner.is-active {
	visibility: visible;
}

@keyframes wpumSpin {
	to { transform: rotate(360deg); }
}

/* =========================================================================
   Notices
   ========================================================================= */
.wpum-notice {
	border-left: 4px solid #72aee6;
	background: #fff;
	padding: 10px 14px;
	margin-bottom: 12px;
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
	font-size: 13px;
	border-radius: 0 3px 3px 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wpum-notice.success {
	border-left-color: #00a32a;
	color: #1a5c1a;
}

.wpum-notice.error {
	border-left-color: #d63638;
	color: #6b0000;
}

.wpum-notice .wpum-notice-dismiss {
	margin-left: auto;
	cursor: pointer;
	background: none;
	border: none;
	font-size: 16px;
	color: #646970;
	padding: 0;
	line-height: 1;
}

/* =========================================================================
   Card / Form (Export page)
   ========================================================================= */
.wpum-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	padding: 20px 24px;
	margin-bottom: 20px;
	max-width: 860px;
}

.wpum-card h2 {
	margin-top: 0;
	border-bottom: 1px solid #f0f0f1;
	padding-bottom: 10px;
	margin-bottom: 16px;
	font-size: 15px;
}

.wpum-form-section {
	margin-bottom: 20px;
}

.wpum-form-section h3 {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #646970;
	margin: 0 0 10px;
	font-weight: 600;
}

.wpum-form-table th {
	width: 160px;
	padding: 8px 0;
}

.wpum-column-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
}

.wpum-col-check {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	cursor: pointer;
	min-width: 160px;
}

.wpum-form-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-top: 10px;
	border-top: 1px solid #f0f0f1;
}

.wpum-form-actions .button-primary .dashicons {
	font-size: 15px;
	width: 15px;
	height: 15px;
	line-height: 1.6;
	margin-right: 4px;
}

.wpum-action-status {
	font-size: 13px;
	color: #646970;
}

/* =========================================================================
   About Page
   ========================================================================= */
.wpum-about-box {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 24px;
	max-width: 720px;
	display: flex;
	gap: 28px;
	flex-wrap: wrap;
}

.wpum-about-logo {
	flex-shrink: 0;
	text-align: center;
	width: 120px;
}

.wpum-about-logo img {
	max-width: 100px;
}

.wpum-about-brand {
	font-size: 22px;
	font-weight: 800;
	color: #2271b1;
	letter-spacing: 1px;
	margin-top: 6px;
}

.wpum-about-content {
	flex: 1;
}

.wpum-about-content h2 {
	margin-top: 0;
	font-size: 20px;
}

.wpum-version {
	font-size: 13px;
	font-weight: 400;
	color: #646970;
	vertical-align: middle;
}

.wpum-feature-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wpum-feature-list li {
	padding: 4px 0;
	font-size: 13px;
}

.wpum-about-table th {
	width: 120px;
	text-align: left;
	color: #646970;
}

/* =========================================================================
   Dashboard Widget
   ========================================================================= */
.wpum-widget {
	font-size: 13px;
}

.wpum-widget-stat {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 0;
	border-bottom: 1px solid #f0f0f1;
}

.wpum-widget-stat:last-of-type {
	border-bottom: none;
}

.wpum-stat-label {
	color: #50575e;
}

.wpum-stat-value {
	font-weight: 700;
	font-size: 16px;
	color: #1d2327;
}

.wpum-stat-value.wpum-green  { color: #00a32a; }
.wpum-stat-value.wpum-orange { color: #d67d00; }
.wpum-stat-value.wpum-red    { color: #d63638; }

.wpum-widget-roles {
	margin-top: 12px;
}

.wpum-widget-roles h4 {
	margin: 0 0 8px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #646970;
}

.wpum-role-bar-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 5px;
	font-size: 12px;
}

.wpum-role-name {
	width: 80px;
	color: #50575e;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex-shrink: 0;
}

.wpum-role-bar-wrap {
	flex: 1;
	height: 8px;
	background: #f0f0f1;
	border-radius: 4px;
	overflow: hidden;
}

.wpum-role-bar {
	height: 100%;
	background: #2271b1;
	border-radius: 4px;
	min-width: 4px;
	transition: width 0.3s ease;
}

.wpum-role-count {
	width: 30px;
	text-align: right;
	font-weight: 600;
	color: #1d2327;
	flex-shrink: 0;
}

.wpum-widget-link {
	margin-top: 12px;
	margin-bottom: 0;
	text-align: right;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media screen and (max-width: 782px) {
	.wpum-filter-row {
		flex-direction: column;
		align-items: stretch;
	}

	.wpum-filter-group,
	.wpum-filter-group.wpum-filter-search {
		width: 100%;
	}

	.wpum-filter-group select,
	.wpum-filter-group input[type="date"],
	.wpum-filter-group input[type="search"] {
		width: 100%;
	}

	.wpum-bulk-bar {
		flex-direction: column;
		align-items: flex-start;
	}

	.wpum-about-box {
		flex-direction: column;
	}

	.wpum-about-logo {
		width: 100%;
	}

	.wpum-modal-dialog {
		margin: 0 10px;
		width: calc(100% - 20px);
	}

	.wpum-pagination {
		flex-direction: column;
		text-align: center;
	}

	.wpum-users-table thead {
		display: none;
	}

	.wpum-users-table tbody tr {
		display: block;
		margin-bottom: 10px;
		border: 1px solid #c3c4c7;
		border-radius: 3px;
	}

	.wpum-users-table tbody td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom: 1px solid #f0f0f1;
	}

	.wpum-users-table tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #646970;
		font-size: 12px;
		min-width: 100px;
	}

	.wpum-col-cb {
		display: none !important;
	}
}

/* =========================================================================
   Quick Edit Drawer
   ========================================================================= */
.wpum-drawer {
	display: flex;
	position: fixed;
	top: 0;
	right: -400px;
	width: 380px;
	height: 100vh;
	background: #fff;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
	z-index: 999999;
	transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	flex-direction: column;
	box-sizing: border-box;
}

.wpum-drawer.is-open {
	right: 0;
}

.wpum-drawer * {
	box-sizing: border-box;
}

.wpum-drawer-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999998;
	animation: wpumFadeInBackdrop 0.2s ease;
}

.wpum-drawer-backdrop.is-open {
	display: block;
}

@keyframes wpumFadeInBackdrop {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.wpum-drawer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid #c3c4c7;
	background: #f6f7f7;
}

.wpum-drawer-header h2 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wpum-drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
}

.wpum-drawer-body h3 {
	margin-top: 20px;
	margin-bottom: 10px;
	font-size: 14px;
	border-bottom: 1px solid #c3c4c7;
	padding-bottom: 5px;
}

.wpum-drawer-body h3:first-of-type {
	margin-top: 0;
}

.wpum-drawer-footer {
	padding: 14px 20px;
	border-top: 1px solid #c3c4c7;
	background: #f6f7f7;
	display: flex;
	gap: 10px;
	align-items: center;
}

.wpum-drawer-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #646970;
	line-height: 1;
}

.wpum-drawer-close:hover {
	color: #d63638;
}

.wpum-drawer-field-group {
	margin-bottom: 12px;
}

.wpum-drawer-field-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 12px;
}

.wpum-drawer-field-group input,
.wpum-drawer-field-group select {
	width: 100%;
}

.wpum-meta-edit-row {
	display: flex;
	gap: 6px;
	margin-bottom: 8px;
	align-items: center;
}

.wpum-meta-edit-row input {
	flex: 1;
	font-size: 12px;
	padding: 3px 8px;
}

.wpum-meta-delete-btn {
	background: none;
	border: none;
	color: #d63638;
	cursor: pointer;
	padding: 0 4px;
	font-size: 18px;
	font-weight: bold;
	line-height: 1;
}

.wpum-meta-delete-btn:hover {
	color: #b32d2e;
}

.wpum-add-meta-wrap {
	display: flex;
	gap: 6px;
	margin-top: 10px;
}

.wpum-add-meta-wrap input {
	flex: 1;
	font-size: 12px;
}

