/**
 * Page Access Control Admin Styles
 */

.kcm-page-access-wrap {
	max-width: 1400px;
}

.kcm-page-access-info {
	background: #fff;
	border-left: 4px solid #B11226;
	padding: 15px 20px;
	margin: 20px 0;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.kcm-page-access-info p:last-child {
	margin-bottom: 0;
}

.kcm-page-access-container {
	display: grid;
	grid-template-columns: 350px 1fr;
	gap: 20px;
	margin-top: 20px;
}

/* Pages List */
.kcm-pages-list {
	background: #fff;
	border: 1px solid #D1D5DB;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.kcm-pages-list h2 {
	margin: 0;
	padding: 15px 20px;
	border-bottom: 1px solid #D1D5DB;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	color: #6B7280;
}

.kcm-pages-list-inner {
	max-height: 600px;
	overflow-y: auto;
}

.kcm-page-item {
	border-bottom: 1px solid #F4F4F2;
	cursor: pointer;
	transition: background-color 0.15s;
}

.kcm-page-item:hover {
	background-color: #F4F4F2;
}

.kcm-page-item.is-protected {
	background-color: #fde8ea;
}

.kcm-page-item.is-protected:hover {
	background-color: #f5d0d5;
}

.kcm-page-item.selected {
	background-color: #f0c0c8;
	border-left: 4px solid #B11226;
}

.kcm-page-checkbox {
	display: flex;
	align-items: center;
	padding: 12px 20px;
	margin: 0;
	cursor: pointer;
}

.kcm-page-checkbox input[type="checkbox"] {
	margin: 0 10px 0 0;
	cursor: pointer;
}

.kcm-page-title {
	flex: 1;
	font-weight: 500;
}

.kcm-page-status {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 3px;
	white-space: nowrap;
	display: inline-block;
}

.kcm-page-status:empty {
	display: none;
}

.kcm-page-status.kcm-status-login {
	color: #B11226;
	background-color: #fde8ea;
}

.kcm-page-status.kcm-status-custom {
	color: #b32d2e;
	background-color: #fcf0f1;
}

.kcm-no-pages {
	padding: 20px;
	text-align: center;
	color: #6B7280;
}

/* Page Configuration */
.kcm-page-config {
	background: #fff;
	border: 1px solid #D1D5DB;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	min-height: 400px;
}

.kcm-no-page-selected {
	padding: 40px 20px;
	text-align: center;
	color: #6B7280;
}

.kcm-page-config-panel {
	padding: 20px;
}

.kcm-page-config-panel h2 {
	margin-top: 0;
	padding-bottom: 15px;
	border-bottom: 1px solid #D1D5DB;
	color: #111827;
	font-size: 18px;
}

.kcm-page-config-panel h3 {
	margin-top: 25px;
	margin-bottom: 10px;
	color: #111827;
	font-size: 15px;
	font-weight: 600;
}

.kcm-access-type-select {
	min-width: 200px;
}

/* Custom Rules */
.kcm-custom-rules {
	margin-top: 25px;
	padding: 20px;
	background: #F4F4F2;
	border: 1px solid #D1D5DB;
	border-radius: 4px;
}

.kcm-rules-container {
	margin-top: 15px;
	margin-bottom: 15px;
}

.kcm-rule-item {
	margin-bottom: 15px;
}

.kcm-rule-fields {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	padding: 12px;
	border: 1px solid #D1D5DB;
	border-radius: 4px;
}

.kcm-rule-type {
	min-width: 150px;
}

.kcm-rule-value {
	flex: 1;
	min-width: 200px;
}

.kcm-remove-rule {
	color: #b32d2e;
}

.kcm-remove-rule:hover {
	color: #b32d2e;
	border-color: #b32d2e;
}

.kcm-rule-separator {
	text-align: center;
	padding: 8px 0;
	font-weight: 600;
	color: #B11226;
	font-size: 12px;
	text-transform: uppercase;
}

.kcm-add-rule {
	margin-top: 10px;
}

/* Unsaved Changes Notice */
.kcm-unsaved-notice {
	background: #fff8e5;
	border-left: 4px solid #dba617;
	padding: 12px 16px;
	margin: 0 0 20px;
	font-size: 13px;
	color: #111827;
	line-height: 1.5;
}

/* Form Table Overrides */
.kcm-page-config-panel .form-table th {
	width: 200px;
	padding-top: 15px;
}

.kcm-page-config-panel .form-table td {
	padding-top: 15px;
}

/* Submit Button */
.kcm-page-access-wrap .submit {
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #D1D5DB;
}

/* Responsive */
@media screen and (max-width: 1024px) {
	.kcm-page-access-container {
		grid-template-columns: 1fr;
	}

	.kcm-pages-list-inner {
		max-height: 300px;
	}
}

@media screen and (max-width: 768px) {
	.kcm-rule-fields {
		flex-direction: column;
		align-items: stretch;
	}

	.kcm-rule-type,
	.kcm-rule-value {
		width: 100%;
		min-width: 0;
	}
}
