/* EdgeOne Cache Purge Admin Styles */

/* -----------------------------------------------
   Settings / Manual Purge page layout boxes
----------------------------------------------- */
.nb-cache-box {
	position: relative;
	margin-top: 20px;
	padding: .7em 2em 1em;
	width: 100%;
	border: 1px solid #c3c4c7;
	box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
	background: #fff;
	box-sizing: border-box;
}

/* Cache-plugin integration notice */
.nb-cache-notice-warning {
	background: #fff8e5;
	border-left: 4px solid #ffb900;
	padding: 10px 12px;
	margin-top: 10px;
}

/* Nginx path validation feedback */
.nb-cache-path-error {
	color: #d63638;
	margin-top: 6px;
}

.nb-cache-path-ok {
	color: #00a32a;
	margin-top: 6px;
}

/* Nginx test button spinner */
.nb-cache-test-spinner {
	vertical-align: middle;
	margin-left: 4px;
}

/* Section sub-header (Nginx integration) */
.nb-cache-section-header {
	font-size: 1.1em;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 4px;
}

.nb-cache-section-header-note {
	font-size: 0.82em;
	font-weight: normal;
	color: #646970;
	margin-left: 8px;
}

.nb-cache-section-desc {
	color: #646970;
	margin-top: 0;
}

/* Purge mode select minimum width */
.nb-cache-select-wide {
	min-width: 200px;
}

/* -----------------------------------------------
   Statistics Cards
----------------------------------------------- */
.nb-cache-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin-bottom: 25px;
	margin-top: 15px;
}

.nb-cache-stat-card {
	background: linear-gradient(135deg, #f6f8fa 0%, #ffffff 100%);
	border: 1px solid #e1e4e8;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	transition: all 0.2s ease;
	position: relative;
	overflow: hidden;
}

.nb-cache-stat-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.nb-cache-stat-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #2271b1 0%, #3582c4 100%);
}

.nb-cache-stat-card.success::before {
	background: linear-gradient(90deg, #00a32a 0%, #00c73c 100%);
}

.nb-cache-stat-card.failed::before {
	background: linear-gradient(90deg, #d63638 0%, #eb5254 100%);
}

.nb-cache-stat-card.rate::before {
	background: linear-gradient(90deg, #00a32a 0%, #00c73c 100%);
}

.nb-cache-stat-value {
	font-size: 32px;
	font-weight: 700;
	color: #1d2327;
	margin-bottom: 5px;
	line-height: 1.2;
}

.nb-cache-stat-card.total .nb-cache-stat-value {
	color: #2271b1;
}

.nb-cache-stat-card.success .nb-cache-stat-value {
	color: #00a32a;
}

.nb-cache-stat-card.failed .nb-cache-stat-value {
	color: #d63638;
}

.nb-cache-stat-card.rate .nb-cache-stat-value {
	color: #00a32a;
}

.nb-cache-stat-label {
	font-size: 13px;
	color: #646970;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* -----------------------------------------------
   Purge Reasons Section
----------------------------------------------- */
.nb-cache-reasons-section {
	background: #ffffff;
	border: 1px solid #e1e4e8;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nb-cache-reasons-section h3 {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
	border-bottom: 2px solid #f0f0f1;
	padding-bottom: 12px;
}

.nb-cache-reasons-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
}

.nb-cache-reason-item {
	background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
	border: 1px solid #e9ecef;
	border-radius: 6px;
	padding: 15px;
	transition: all 0.2s ease;
}

.nb-cache-reason-item:hover {
	border-color: #2271b1;
	box-shadow: 0 2px 8px rgba(34, 113, 177, 0.1);
}

.nb-cache-reason-count {
	font-size: 28px;
	font-weight: 700;
	color: #2271b1;
	margin-bottom: 4px;
	line-height: 1.2;
}

.nb-cache-reason-label {
	font-size: 12px;
	color: #646970;
	font-weight: 500;
	line-height: 1.4;
}

/* -----------------------------------------------
   Responsive adjustments
----------------------------------------------- */
@media (max-width: 782px) {
	.nb-cache-stats-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.nb-cache-stat-card {
		padding: 15px;
	}

	.nb-cache-stat-value {
		font-size: 24px;
	}
}

@media (max-width: 600px) {
	.nb-cache-stats-grid {
		grid-template-columns: 1fr;
	}
}
