/**
 * CSS модуля "Довідник суддівських категорій".
 *
 * Version:     1.0.0
 * Date_update: 2026-04-13
 *
 * @package FSTU
 */

.fstu-referee-category-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	color: #2c3e50;
	width: 100%;
}

.fstu-referee-category-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 12px;
	color: #1f2d3d;
}

.fstu-hidden {
	display: none !important;
}

.fstu-page-message,
.fstu-form-message {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #f8f9fa;
	color: #243447;
}

.fstu-page-message--success,
.fstu-message--success {
	background: #ecfdf3;
	border-color: #86efac;
	color: #166534;
}

.fstu-page-message--error,
.fstu-message--error {
	background: #fef2f2;
	border-color: #fca5a5;
	color: #991b1b;
}

.fstu-action-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	padding: 10px 12px;
	background: #f8f9fa;
	border: 1px solid #d1d5db;
	border-radius: 4px;
}

.fstu-referee-category-action-bar__left,
.fstu-referee-category-action-bar__center,
.fstu-referee-category-action-bar__right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
}

.fstu-referee-category-action-bar__left {
	justify-content: flex-start;
}

.fstu-referee-category-action-bar__center {
	justify-content: center;
}

.fstu-referee-category-action-bar__right {
	justify-content: flex-end;
}

.fstu-btn,
.fstu-btn--page,
.fstu-modal .fstu-btn,
.fstu-modal .fstu-btn--page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 36px;
	padding: 0 14px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #f8f9fa;
	color: #374151;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.fstu-btn:hover,
.fstu-btn--page:hover,
.fstu-modal .fstu-btn:hover,
.fstu-modal .fstu-btn--page:hover {
	background: #c65b41;
	border-color: #c65b41;
	color: #fff;
}

.fstu-btn[disabled],
.fstu-btn--page[disabled],
.fstu-referee-category-dropdown__toggle[disabled],
.fstu-referee-category-dropdown__item[disabled] {
	opacity: .6;
	cursor: not-allowed;
	pointer-events: none;
}

.fstu-btn--primary,
.fstu-modal .fstu-btn--primary {
	background: #d9534f;
	border-color: #d9534f;
	color: #fff;
}

.fstu-btn--primary:hover,
.fstu-modal .fstu-btn--primary:hover {
	background: #c8433f;
	border-color: #c8433f;
	color: #fff;
}

.fstu-btn--page {
	min-width: 32px !important;
	height: 32px !important;
	padding: 0 10px !important;
	background: #f8f9fa !important;
	border-color: #d1d5db !important;
	color: #374151 !important;
	box-shadow: none !important;
	min-height: 0 !important;
}

.fstu-btn--page:hover {
	background: #c65b41 !important;
	border-color: #c65b41 !important;
	color: #fff !important;
}

.fstu-btn--page-active,
.fstu-btn--page-active:hover {
	background: #c65b41 !important;
	border-color: #c65b41 !important;
	color: #fff !important;
}

.fstu-btn__icon {
	font-style: normal;
	font-size: 13px;
}

.fstu-table-wrap {
	position: relative;
	margin: 0 0 12px;
	border: 1px solid #c8d8c0;
	border-radius: 4px;
	background: #fff;
	overflow-x: auto;
}

.fstu-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.fstu-thead .fstu-th {
	background: #dcead6;
	padding: 10px 8px;
	text-align: left;
	font-weight: 600;
	border: 1px solid #c8d8c0;
	vertical-align: middle;
	color: #2c3328;
}

.fstu-td {
	padding: 8px;
	border: 1px solid #e5e7eb;
	vertical-align: middle;
	background: #fff;
}

.fstu-tbody .fstu-row:nth-child(even) .fstu-td {
	background: #f8faf6;
}

.fstu-th--num,
.fstu-td--num {
	width: 66px;
	text-align: center;
}

.fstu-th--wide-name {
	width: calc(100% - 148px);
}

.fstu-th--actions,
.fstu-td--actions,
.fstu-th--type,
.fstu-td--type,
.fstu-th--status,
.fstu-td--status {
	text-align: center;
}

.fstu-th--actions,
.fstu-td--actions {
	width: 82px;
	white-space: nowrap;
}

.fstu-th--date,
.fstu-td--date {
	width: 140px;
}

.fstu-th--type,
.fstu-td--type {
	width: 80px;
}

.fstu-th--message,
.fstu-td--message {
	min-width: 200px;
}

.fstu-th--status,
.fstu-td--status {
	width: 80px;
}

.fstu-th--user,
.fstu-td--user {
	width: 120px;
}

.fstu-th-with-search {
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.fstu-input--in-header {
	flex: 1;
	min-width: 140px;
	height: 24px;
	padding: 2px 7px;
	font-size: 12px;
	font-weight: 400;
	border: 1px solid #b7d7b7;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.85);
	color: #2c3e50;
	box-sizing: border-box;
	outline: none;
}

.fstu-input--in-header:focus,
.fstu-input:focus,
.fstu-select:focus {
	border-color: #c65b41;
	box-shadow: 0 0 0 2px rgba(198, 91, 65, 0.12);
	background: #fff;
}

.fstu-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.fstu-pagination--compact {
	padding: 10px 12px;
	background: #f8f9fa;
	border: 1px solid #d1d5db;
	border-radius: 4px;
}

.fstu-pagination__left,
.fstu-pagination__controls,
.fstu-pagination__info {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
}

.fstu-pagination__left {
	justify-content: flex-start;
}

.fstu-pagination__controls {
	justify-content: center;
}

.fstu-pagination__info {
	justify-content: flex-end;
	font-size: 12px;
	color: #4b5563;
}

.fstu-pagination__per-page-label {
	font-size: 12px;
	color: #6b7280;
	white-space: nowrap;
}

.fstu-select--compact,
.fstu-input,
.fstu-select {
	height: 26px;
	padding: 2px 6px;
	font-size: 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #fff;
	box-sizing: border-box;
}

.fstu-pagination .fstu-select--compact {
	width: 70px !important;
}

.fstu-input {
	width: 100%;
	height: 34px;
	padding: 6px 10px;
	font-size: 13px;
}

.fstu-no-results {
	padding: 28px;
	text-align: center;
	color: #6b7280;
	font-style: italic;
}

.fstu-no-results--error {
	color: #991b1b;
	background: #fee2e2;
}

.fstu-referee-category-link-button {
	padding: 0;
	border: 0;
	background: transparent;
	color: #1d4ed8;
	text-align: left;
	cursor: pointer;
	font: inherit;
}

.fstu-referee-category-link-button:hover {
	color: #c65b41;
	text-decoration: underline;
}

.fstu-drag-handle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-right: 6px;
	color: #9ca3af;
	cursor: grab;
	font-size: 12px;
}

.fstu-drag-handle--disabled {
	color: #d1d5db;
	cursor: default;
}

.fstu-row-number {
	font-size: 12px;
	color: #6b7280;
}

.fstu-referee-category-row[draggable="true"] {
	cursor: move;
}

.fstu-referee-category-row.is-dragging {
	opacity: .45;
}

.fstu-referee-category-dropdown {
	position: relative;
	display: inline-block;
}

.fstu-referee-category-dropdown__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #f8f9fa;
	color: #374151;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.fstu-referee-category-dropdown__toggle:hover,
.fstu-referee-category-dropdown.is-open .fstu-referee-category-dropdown__toggle {
	background: #c65b41;
	border-color: #c65b41;
	color: #fff;
}

.fstu-referee-category-dropdown__menu {
	min-width: 180px;
	padding: 6px 0;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
	display: none;
}

.fstu-referee-category-dropdown.is-open .fstu-referee-category-dropdown__menu {
	display: block;
}

.fstu-referee-category-dropdown__item {
	display: flex;
	width: 100%;
	padding: 9px 12px;
	border: 0;
	background: transparent;
	text-align: left;
	font-size: 13px;
	color: #374151;
	cursor: pointer;
}

.fstu-referee-category-dropdown__item:hover {
	background: #f9fafb;
	color: #c65b41;
}

.fstu-referee-category-dropdown__item--danger:hover {
	color: #b91c1c;
}

.fstu-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.6);
}

body.fstu-modal-open {
	overflow: hidden;
}

.fstu-modal {
	width: 100%;
	max-width: 520px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
	animation: fstu-modal-fade-in .16s ease-out;
}

.fstu-modal--compact {
	max-width: 500px;
}

.fstu-modal--referee-category-form,
.fstu-modal--referee-category-view {
	max-width: 500px;
}

.fstu-modal--referee-category-form .fstu-modal__body,
.fstu-modal--referee-category-view .fstu-modal__body {
	max-height: calc(100vh - 180px);
	overflow-y: visible;
}

.fstu-modal__header,
.fstu-modal__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid #e5e7eb;
}

.fstu-modal__footer {
	border-top: 1px solid #e5e7eb;
	border-bottom: 0;
	gap: 10px;
	justify-content: flex-end;
}

.fstu-modal__body {
	padding: 16px;
	max-height: 70vh;
	overflow-y: auto;
}

.fstu-modal__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #1f2937;
}

.fstu-modal__close {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 28px;
	height: 28px;
	padding: 0 !important;
	border: none !important;
	border-radius: 4px;
	background: transparent !important;
	box-shadow: none !important;
	min-width: 0 !important;
	margin: 0 !important;
	color: #374151;
	cursor: pointer;
}

.fstu-modal__close:hover {
	background: #d9534f !important;
	color: #fff;
}

.fstu-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.fstu-form-grid--single {
	grid-template-columns: 1fr;
}

.fstu-form-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.fstu-form-group--wide {
	grid-column: 1 / -1;
}

.fstu-label {
	font-size: 13px;
	font-weight: 500;
	color: #1f2937;
}

.fstu-label--required::after {
	content: ' *';
	color: #dc2626;
}

.fstu-hint {
	font-size: 12px;
	line-height: 1.4;
	color: #6b7280;
}

.fstu-honeypot {
	position: absolute;
	left: -5000px;
	opacity: 0;
	pointer-events: none;
}

.fstu-info-table {
	width: 100%;
	border-collapse: collapse;
}

.fstu-info-table th,
.fstu-info-table td {
	padding: 6px 0;
	text-align: left;
	vertical-align: top;
	border: 0;
}

.fstu-info-table th {
	width: 160px;
	color: #6b7280;
	font-weight: 500;
}

.fstu-info-table td {
	color: #1f2937;
	font-weight: 600;
}

.fstu-loader-inline {
	font-size: 12px;
	color: #6b7280;
}

.fstu-alert {
	background: #fee2e2;
	border: 1px solid #fecaca;
	color: #991b1b;
	padding: 10px 12px;
	border-radius: 4px;
}

.fstu-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
}

.fstu-badge--default {
	color: #374151;
	background: #f3f4f6;
}

.fstu-badge--insert {
	color: #166534;
	background: #dcfce7;
}

.fstu-badge--update {
	color: #92400e;
	background: #fef3c7;
}

.fstu-badge--delete {
	color: #991b1b;
	background: #fee2e2;
}

@keyframes fstu-modal-fade-in {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 768px) {
	.fstu-pagination,
	.fstu-pagination--compact,
	.fstu-action-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.fstu-referee-category-action-bar__left,
	.fstu-referee-category-action-bar__center,
	.fstu-referee-category-action-bar__right {
		justify-content: flex-start;
		width: 100%;
	}

	.fstu-table {
		table-layout: auto;
	}

	.fstu-th-with-search {
		flex-wrap: wrap;
		align-items: flex-start;
	}

	.fstu-input--in-header {
		min-width: 100%;
	}

	.fstu-modal-overlay {
		padding: 8px;
	}

	.fstu-modal--referee-category-form .fstu-modal__body,
	.fstu-modal--referee-category-view .fstu-modal__body {
		max-height: none;
	}

	.fstu-form-grid,
	.fstu-form-grid--single {
		grid-template-columns: 1fr;
	}
}

