/**
 * Limit Login Attempts — logs admin screen.
 * Aligned with Email Logs / Redirect Manager / shared PageHero screens.
 *
 * @package LimitLoginAttempts
 */

.wpps-login-logs {
	--wpps-ll-accent: var(--wpps-accent, var(--wp-admin-theme-color, #2271b1));
	--wpps-ll-accent-hover: var(--wpps-accent-hover, var(--wp-admin-theme-color-darker-10, #135e96));
	--wpps-ll-accent-bg: color-mix(in srgb, var(--wpps-ll-accent) 12%, #fff);
	--wpps-ll-black: #1d2327;
	--wpps-ll-gray: #646970;
	--wpps-ll-border: #c3c4c7;
	--wpps-ll-divider: #dcdcde;
	--wpps-ll-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.wrap.wpps-login-logs {
	max-width: none;
	margin: 20px 20px 20px 0;
	box-sizing: border-box;
}

.wrap.wpps-login-logs .wpps-page-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.wrap.wpps-login-logs .wpps-page-hero__meta .button {
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.wrap.wpps-login-logs .wpps-page-hero__meta .button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Main panel */
.wpps-login-logs .wpps-ll-panel {
	background: #fff;
	border: 1px solid var(--wpps-ll-border);
	box-shadow: var(--wpps-ll-shadow);
	padding: 20px 24px;
	margin: 0 0 24px;
}

.wpps-login-logs .wpps-ll-panel-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--wpps-ll-black);
}

.wpps-login-logs .wpps-ll-panel-title .wpps-ll-count {
	font-weight: 400;
	color: var(--wpps-ll-gray);
	margin-left: 8px;
}

/* Toolbar */
.wpps-login-logs .wpps-ll-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin: 16px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--wpps-ll-divider);
}

.wpps-login-logs .wpps-ll-filters {
	display: grid;
	grid-template-columns: minmax(180px, 2fr) minmax(140px, 1fr) minmax(140px, 1fr) auto;
	gap: 12px;
	align-items: end;
	flex: 1;
	min-width: 0;
}

.wpps-login-logs .wpps-ll-filter-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.wpps-login-logs .wpps-ll-filter-group label {
	font-weight: 600;
	font-size: 12px;
	color: var(--wpps-ll-gray);
}

.wpps-login-logs .wpps-ll-filter-group input[type="search"],
.wpps-login-logs .wpps-ll-filter-group select {
	width: 100%;
	max-width: 100%;
	min-height: 32px;
}

.wpps-login-logs .wpps-ll-filter-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: end;
}

.wpps-login-logs .wpps-ll-filter-actions .button {
	margin: 0;
}

.wpps-login-logs .wpps-ll-toolbar-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	flex-shrink: 0;
}

.wpps-login-logs .wpps-ll-clear-btn {
	color: #b32d2e;
	border-color: #b32d2e;
}

.wpps-login-logs .wpps-ll-clear-btn:hover,
.wpps-login-logs .wpps-ll-clear-btn:focus {
	background: #fcf0f1;
	border-color: #8a2424;
	color: #8a2424;
}

/* Table area */
.wpps-login-logs .wpps-ll-table-wrap {
	margin-top: 16px;
	border: 1px solid var(--wpps-ll-border);
	background: #fff;
}

.wpps-login-logs .wpps-ll-table-wrap .tablenav {
	margin: 0;
	padding: 8px 12px;
	border-bottom: 1px solid var(--wpps-ll-divider);
}

.wpps-login-logs .wpps-ll-table-wrap .tablenav.bottom {
	border-bottom: none;
	border-top: 1px solid var(--wpps-ll-divider);
}

.wpps-login-logs .wpps-ll-table-wrap .wp-list-table {
	border: none;
	box-shadow: none;
	margin: 0;
}

.wpps-login-logs .wpps-ll-table-wrap .wp-list-table thead th {
	font-weight: 600;
	color: var(--wpps-ll-black);
}

.wpps-login-logs .wpps-ll-table-wrap .wp-list-table code {
	font-size: 12px;
}

.wpps-login-logs .wpps-login-log-country-name {
	color: var(--wpps-ll-gray);
	font-size: 11px;
}

.wpps-login-logs .wpps-login-log-lockout-active {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: #fcf0f1;
	color: #b32d2e;
}

.wpps-login-logs .wpps-login-log-lockout-expired {
	color: var(--wpps-ll-gray);
	font-size: 12px;
}

.wpps-login-logs .tablenav-pages .pagination-links .current-page {
	color: var(--wpps-ll-accent);
}

/* Empty state */
.wpps-login-logs .wpps-ll-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 48px 24px;
	margin-top: 16px;
	border: 1px solid var(--wpps-ll-border);
	background: #fff;
}

.wpps-login-logs .wpps-ll-empty .dashicons {
	display: block;
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: var(--wpps-ll-accent);
	margin-bottom: 4px;
}

.wpps-login-logs .wpps-ll-empty h3 {
	margin: 12px 0 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--wpps-ll-black);
}

.wpps-login-logs .wpps-ll-empty .description {
	margin: 8px 0 0;
	max-width: 420px;
	color: var(--wpps-ll-gray);
}

@media (max-width: 960px) {
	.wpps-login-logs .wpps-ll-filters {
		grid-template-columns: 1fr 1fr;
	}

	.wpps-login-logs .wpps-ll-filter-actions {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {
	.wpps-login-logs .wpps-ll-filters {
		grid-template-columns: 1fr;
	}

	.wpps-login-logs .wpps-ll-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.wpps-login-logs .wpps-ll-toolbar-actions {
		justify-content: flex-start;
	}
}
