/* O015 Üyelik Seviyeleri (Roller) — S020 Üyelik Seviyeleri + S021 Rol Yetkileri. */

/* Rozet (listeler, Kullanıcılar sütunu) */
.kf-role-badge {
	--kf-role-color: #2271b1;
	display: inline-block;
	padding: .1em .6em;
	border-radius: 999px;
	border: 1px solid var(--kf-role-color);
	background: color-mix(in srgb, var(--kf-role-color) 12%, #fff);
	color: color-mix(in srgb, var(--kf-role-color) 70%, #000);
	font-size: .875em;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
}

.kf-roles {
	box-sizing: border-box;
	max-width: 100%;
}
.kf-roles *,
.kf-roles *::before,
.kf-roles *::after {
	box-sizing: border-box;
}
.kf-roles [hidden] {
	display: none !important;
}
.kf-roles .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.kf-roles__title:focus,
.kf-roles__subtitle:focus,
.kf-roles__panel:focus,
.kf-roles__notice:focus {
	outline: none;
}
.kf-roles__title:focus-visible,
.kf-roles__subtitle:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}
.kf-roles__intro {
	max-width: 60rem;
}

/* Ön yüz sekmeleri */
.kf-roles__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem;
	margin: 0 0 1rem;
	border-bottom: 1px solid #c3c4c7;
}
.kf-roles__tab {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1rem;
	border: 1px solid transparent;
	border-bottom: 0;
	border-radius: 4px 4px 0 0;
	text-decoration: none;
}
.kf-roles__tab.is-active {
	border-color: #c3c4c7;
	background: #fff;
	margin-bottom: -1px;
	font-weight: 600;
}
.kf-roles__tab:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

/* Bildirim (ön yüz) */
.kf-roles--front .notice {
	margin: 0 0 1rem;
	padding: .6rem .9rem;
	border-left: 4px solid #2271b1;
	background: #f0f6fc;
}
.kf-roles--front .notice-success {
	border-color: #00a32a;
	background: #edfaef;
}
.kf-roles--front .notice-error {
	border-color: #d63638;
	background: #fcf0f1;
}
.kf-roles__notice p {
	margin: .25em 0;
}
.kf-roles__notice ul {
	margin: .25em 0 .25em 1.25em;
	list-style: disc;
}

.kf-roles__toolbar {
	margin: 1rem 0;
}

/* Form paneli */
.kf-roles__panel {
	margin: 0 0 1.5rem;
	padding: 1rem;
	border: 1px solid #dcdcde;
	border-left: 4px solid #2271b1;
	border-radius: 6px;
	background: #fff;
}
.kf-roles__subtitle {
	margin: 0 0 .75rem;
}
.kf-roles__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
	gap: .25rem 1rem;
}
.kf-roles__grid p {
	margin: 0 0 .75rem;
	min-width: 0;
}
.kf-roles__grid .kf-roles__wide {
	grid-column: 1 / -1;
}
.kf-roles__grid label,
.kf-roles__label {
	display: block;
	font-weight: 600;
	margin-bottom: .25rem;
}
.kf-roles__grid input[type="text"],
.kf-roles__grid input[type="number"],
.kf-roles__grid select {
	width: 100%;
	max-width: 100%;
	min-height: 36px;
}
.kf-roles__grid input[type="color"] {
	width: 4rem;
	height: 36px;
	padding: 2px;
}
.kf-roles--front .kf-roles__grid input[type="text"],
.kf-roles--front .kf-roles__grid input[type="number"],
.kf-roles--front .kf-roles__grid select,
.kf-roles--front .kf-roles__grid input[type="color"] {
	min-height: 44px;
	height: 44px;
}
.kf-roles__check {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .25rem .5rem;
}
.kf-roles__check label {
	display: inline;
	margin: 0;
}
.kf-roles__check input[type="checkbox"] {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
}
.kf-roles__check .description,
.kf-roles__check .kf-roles__error {
	flex-basis: 100%;
}
.kf-roles__grid .description {
	display: block;
	margin-top: .2rem;
	font-size: .875em;
}
.kf-roles__req {
	color: #d63638;
}
.kf-roles__error {
	display: block;
	margin-top: .2rem;
	color: #d63638;
}
.kf-roles [aria-invalid="true"] {
	border-color: #d63638;
}
.kf-roles__actions-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	margin: .5rem 0 0;
}

/* S020 tablo */
.kf-roles__table {
	width: 100%;
	border-collapse: collapse;
}
.kf-roles__table tbody th {
	font-weight: normal;
}
.kf-roles--front .kf-roles__table th,
.kf-roles--front .kf-roles__table td {
	padding: .6rem .5rem;
	border-bottom: 1px solid #dcdcde;
	text-align: left;
	vertical-align: top;
}
.kf-roles__table .num {
	text-align: right;
	white-space: nowrap;
}
.kf-roles__slugcode {
	margin-left: .25rem;
	font-size: .85em;
}
.kf-roles__tag {
	display: inline-block;
	margin-left: .25rem;
	padding: 0 .45rem;
	border-radius: 3px;
	background: #f0f0f1;
	color: #3c434a;
	font-size: .8em;
	line-height: 1.7;
}
.kf-roles__tag--default {
	background: #f0f6fc;
	color: #135e96;
}
.kf-roles__actions {
	white-space: nowrap;
}
.kf-roles__actions .button,
.kf-roles__actions .kf-button {
	margin: 0 .25rem .25rem 0;
}
.kf-roles .kf-roles__delete {
	color: #b32d2e;
	border-color: #b32d2e;
}
.kf-roles tr.is-new > * {
	animation: kf-role-new 2.5s ease-out;
}
@keyframes kf-role-new {
	from {
		background: #fcf9e8;
	}
}
.kf-roles .button:focus-visible,
.kf-roles .kf-button:focus-visible,
.kf-roles input:focus-visible,
.kf-roles select:focus-visible,
.kf-roles a:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}
.kf-roles .button.is-loading::after {
	content: "";
	display: inline-block;
	width: .9em;
	height: .9em;
	margin-left: .4em;
	vertical-align: -.1em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: kf-spin .7s linear infinite;
}

/* S021 matris */
.kf-roles__scroll {
	--kf-capcol: 16rem;
	/* Yapışkan yetki sütunu odaklanan/kaydırılan hücreyi örtmesin (WCAG 2.2 — 2.4.11). */
	scroll-padding-left: var(--kf-capcol);
	max-width: 100%;
	overflow-x: auto;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
}
.kf-roles__scroll:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}
.kf-roles__matrix {
	width: 100%;
	min-width: max-content;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
}
.kf-roles__matrix caption {
	padding: .6rem .75rem;
	text-align: left;
	font-weight: 600;
}
.kf-roles__matrix th,
.kf-roles__matrix td {
	padding: .5rem .6rem;
	border-bottom: 1px solid #f0f0f1;
	vertical-align: middle;
	background: #fff;
}
.kf-roles__capcol {
	position: sticky;
	left: 0;
	z-index: 3; /* hücre onay kutularının (z-index 1) üstünde */
	width: var(--kf-capcol);
	min-width: var(--kf-capcol);
	max-width: var(--kf-capcol);
	text-align: left;
	font-weight: normal;
	box-shadow: 1px 0 0 #dcdcde;
}
thead .kf-roles__capcol {
	font-weight: 600;
}
.kf-roles__capkey {
	display: block;
	margin-top: .15rem;
	font-size: .75em;
	color: #646970;
	background: none;
	padding: 0;
}
.kf-roles__rolecol {
	text-align: center !important;
	min-width: 7.5rem;
}
.kf-roles__coledit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: 0 .4rem;
	font-size: .85em;
	font-weight: normal;
}
.kf-roles__group th {
	background: #f6f7f7 !important;
	font-weight: 600;
	text-align: left;
}
.kf-roles__groupname {
	position: sticky;
	left: .6rem;
	display: inline-block;
}
.kf-roles__cell {
	position: relative;
	text-align: center;
	height: 44px;
}
.kf-roles__cell input[type="checkbox"] {
	position: relative;
	z-index: 1;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
}
.kf-roles__celllabel {
	position: absolute;
	inset: 0;
	cursor: pointer;
}
.kf-roles__cell.is-blocked {
	background: repeating-linear-gradient(45deg, #fff, #fff 6px, #f6f7f7 6px, #f6f7f7 12px);
}
.kf-roles__cell.is-blocked .kf-roles__celllabel {
	cursor: not-allowed;
}
.kf-roles__cell:hover {
	background: #f0f6fc;
}
/* Yapışkan kaydet çubuğu odaklanan satırı örtmesin (WCAG 2.2 — 2.4.11). */
html:has(.kf-roles__savebar) {
	scroll-padding-bottom: 6rem;
}
.kf-roles__savebar {
	position: sticky;
	bottom: 0;
	z-index: 15; /* yapışkan sütunun (3) üstünde */
	padding: .75rem 0;
	background: #fff;
}
.kf-roles--admin .kf-roles__savebar {
	background: #fff; /* çubuk biçimi: admin/kf-admin-app.css */
}
.kf-roles--front .kf-roles__savebar {
	background: #fff;
}
.kf-roles__dirty {
	color: #8a5a00;
	font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
	.kf-roles .button.is-loading::after,
	.kf-roles tr.is-new > * {
		animation: none;
	}
}

/* Mobil */
@media (max-width: 782px) {
	.kf-roles__table thead {
		display: none;
	}
	.kf-roles__table,
	.kf-roles__table tbody,
	.kf-roles__table tr,
	.kf-roles__table td,
	.kf-roles__table tbody th {
		display: block;
		width: 100% !important;
	}
	.kf-roles__table tr[data-id] {
		padding: .75rem .5rem;
		border-bottom: 1px solid #dcdcde;
	}
	.kf-roles .kf-roles__table tr[data-id] > * {
		padding: .15rem 0 !important;
		border: 0 !important;
		text-align: left !important;
	}
	.kf-roles__table td[data-label]::before {
		content: attr(data-label);
		display: block;
		font-size: .8em;
		font-weight: 600;
		color: #646970;
	}
	.kf-roles__actions {
		display: flex !important;
		flex-wrap: wrap;
		gap: .5rem;
		white-space: normal;
		padding-top: .5rem !important;
	}
	.kf-roles__actions::before {
		flex-basis: 100%;
	}
	.kf-roles__actions .button,
	.kf-roles__actions .kf-button,
	.kf-roles__actions-row .button,
	.kf-roles__actions-row .kf-button,
	.kf-roles__toolbar .button,
	.kf-roles__toolbar .kf-button {
		flex: 1 1 8rem;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 44px;
		margin: 0;
	}
	.kf-roles__toolbar .button,
	.kf-roles__toolbar .kf-button {
		width: 100%;
	}
	.kf-roles__scroll {
		--kf-capcol: 10rem;
	}
	.kf-roles__rolecol {
		min-width: 6rem;
	}
	.kf-roles__grid input[type="text"],
	.kf-roles__grid input[type="number"],
	.kf-roles__grid select {
		min-height: 44px;
	}
}
.kf-roles a.kf-button {
	text-decoration: none;
}
