/**
 * CSS модуля «Реєстр суддів ФСТУ».
 *
 * Version:     1.0.1
 * Date_update: 2026-04-08
 *
 * @package FSTU
 */

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

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

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

.fstu-page-notice {
	margin: 0 0 12px;
	padding: 10px 12px;
	border: 1px solid transparent;
	border-radius: 4px;
	font-size: 13px;
	line-height: 1.45;
}

.fstu-page-notice--success {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #065f46;
}

.fstu-page-notice--error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.fstu-referees-access-state {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 20px;
	background: #f8f9fa;
	border: 1px solid #d1d5db;
	border-radius: 6px;
}

.fstu-referees-access-state__icon {
	font-size: 28px;
	line-height: 1;
}

.fstu-referees-access-state__content {
	flex: 1;
}

.fstu-referees-access-state__title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: #1f2937;
}

.fstu-referees-access-state__text {
	margin: 0 0 14px;
	font-size: 13px;
	color: #4b5563;
}

.fstu-referees-access-state__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

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

.fstu-action-bar--referees {
	justify-content: space-between;
}

.fstu-action-bar__group {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: nowrap;
	white-space: nowrap;
	flex: 0 0 auto;
}

.fstu-action-bar__group--filters {
	flex: 1 1 auto;
	justify-content: center;
	min-width: 0;
}

.fstu-action-bar--referees .fstu-select--compact {
	width: auto;
	min-width: 180px;
	height: 36px;
	padding: 0 36px 0 10px;
	font-size: 13px;
}

.fstu-btn,
.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 {
	background: #c65b41;
	border-color: #c65b41;
	color: #fff;
}

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

.fstu-btn--primary {
	background: #c65b41;
	border-color: #c65b41;
	color: #fff;
}

.fstu-btn--primary:hover,
.fstu-btn--page-active,
.fstu-btn--page-active:hover {
	background: #b14e36;
	border-color: #b14e36;
	color: #fff;
}

.fstu-btn--danger {
	background: #b91c1c;
	border-color: #b91c1c;
	color: #fff;
}

.fstu-btn--danger:hover {
	background: #991b1b;
	border-color: #991b1b;
	color: #fff;
}

.fstu-btn--page {
	min-width: 32px;
	height: 32px;
	padding: 0 10px;
}

.fstu-btn--small {
	height: 30px;
	padding: 0 10px;
	font-size: 12px;
}

.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-wrap--compact {
	margin-bottom: 8px;
}

.fstu-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 920px;
}

.fstu-table--compact {
	min-width: 820px;
}

.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: 60px;
	text-align: center;
}

.fstu-th--wide-name {
	min-width: 220px;
}

.fstu-td--name {
	min-width: 220px;
}

.fstu-th--count,
.fstu-td--certificates {
	width: 90px;
	text-align: center;
}

.fstu-th--actions,
.fstu-td--actions {
	width: 84px;
	text-align: center;
	white-space: nowrap;
}

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

.fstu-th--type,
.fstu-td--type,
.fstu-th--status,
.fstu-td--status {
	width: 80px;
	text-align: center;
}

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

.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 {
	min-width: 120px;
	max-width: 100%;
	height: 24px;
	padding: 2px 7px;
	font-size: 12px;
	border: 1px solid #b7d7b7;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.85);
	color: #1f2937;
}

.fstu-select,
.fstu-select--compact,
.fstu-input,
.fstu-textarea {
	width: 100%;
	font-size: 13px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	box-sizing: border-box;
	background: #fff;
	color: #374151;
}

.fstu-select--compact,
.fstu-input--compact {
	height: 26px;
	padding: 2px 6px;
	font-size: 12px;
}

.fstu-input,
.fstu-select {
	height: 38px;
	padding: 7px 10px;
}

.fstu-textarea {
	min-height: 100px;
	padding: 8px 10px;
	resize: vertical;
}

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

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

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

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

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

.fstu-pagination__controls {
	justify-content: center;
	flex: 1;
	min-width: 0;
	flex-wrap: wrap;
}

.fstu-pagination__controls > div {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
}

.fstu-pagination__info {
	flex: 1;
	justify-content: flex-end;
	font-size: 12px;
	color: #4b5563;
	white-space: nowrap;
	text-align: right;
}

.fstu-pagination__ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 32px;
	color: #6b7280;
	font-size: 14px;
	line-height: 1;
}

.fstu-pagination__per-page-label {
	font-size: 12px;
	color: #374151;
}

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

.fstu-no-results {
	padding: 18px;
	text-align: center;
	color: #6b7280;
}

.fstu-text-muted {
	color: #6b7280;
}

.fstu-referees-link-button {
	padding: 0;
	border: 0;
	background: transparent;
	color: #2563eb;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.fstu-referees-link-button:hover {
	color: #c65b41;
}

.fstu-referees-dropdown {
	position: relative;
	display: inline-block;
	z-index: 5;
}

.fstu-referees-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-referees-dropdown__toggle:hover,
.fstu-referees-dropdown.is-open .fstu-referees-dropdown__toggle {
	background: #c65b41;
	border-color: #c65b41;
	color: #fff;
}

.fstu-referees-dropdown__menu {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 40;
	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-referees-dropdown.is-open .fstu-referees-dropdown__menu {
	display: block;
}

.fstu-referees-dropdown.is-dropup .fstu-referees-dropdown__menu {
	top: auto;
	bottom: calc(100% + 6px);
}

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

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

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

.fstu-hidden {
	display: none;
}

.fstu-hidden-field {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.fstu-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(17, 24, 39, 0.45);
}

.fstu-modal-overlay.fstu-hidden {
	display: none;
}

.fstu-modal {
	width: 100%;
	max-width: 760px;
	max-height: calc(100vh - 20px);
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
	overflow: hidden;
}

.fstu-modal--wide {
	max-width: min(1280px, calc(100vw - 24px));
}

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

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

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

.fstu-modal__footer--between {
	justify-content: space-between;
}

.fstu-modal__footer-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

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

.fstu-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #f8f9fa;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	color: #6b7280;
}

.fstu-modal__close:hover {
	background: #c65b41;
	border-color: #c65b41;
	color: #fff;
}

.fstu-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 12px;
	overflow-y: auto;
	background: #fff;
}

.fstu-modal--referees-view {
	max-width: min(1040px, calc(100vw - 32px));
	max-height: min(700px, calc(100vh - 40px));
}

.fstu-modal--referees-certificates {
	max-width: min(960px, calc(100vw - 32px));
	max-height: min(620px, calc(100vh - 40px));
}

.fstu-modal__body--compact-view,
.fstu-modal__body--compact-certificates {
	padding: 10px;
}

.fstu-form-grid {
	display: grid;
	gap: 10px;
}

.fstu-form-group {
	display: grid;
	gap: 4px;
}

.fstu-label {
	font-size: 12px;
	font-weight: 600;
	color: #374151;
}

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

.fstu-form-message {
	margin-bottom: 12px;
	padding: 8px 10px;
	border-radius: 4px;
	font-size: 12px;
	border: 1px solid transparent;
}

.fstu-form-message--success {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #065f46;
}

.fstu-form-message--error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.fstu-view-layout {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.fstu-view-section {
	padding: 8px 10px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #fafbfd;
}

.fstu-view-section--certificates-preview {
	margin-top: 12px;
}

.fstu-view-section__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.fstu-form-section__title {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 600;
	color: #1f2937;
}

.fstu-view-grid {
	display: grid;
	gap: 6px;
}

.fstu-view-grid__row {
	display: grid;
	grid-template-columns: minmax(120px, 150px) 1fr;
	gap: 8px;
	padding: 4px 0;
	border-bottom: 1px solid #eef2f7;
}

.fstu-view-grid__label {
	font-weight: 600;
	color: #374151;
}

.fstu-view-grid__value {
	padding: 6px 8px;
	min-height: 18px;
	border-radius: 10px;
	background: #f5f7fb;
	font-size: 13px;
	word-break: break-word;
}

.fstu-referees-certificates-preview {
	display: grid;
	gap: 8px;
}

.fstu-referees-certificates-preview__item {
	padding: 8px 10px;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	background: #fff;
}

.fstu-referees-certificates-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}

.fstu-referees-certificates-toolbar__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.fstu-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 74px;
	height: 24px;
	padding: 0 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
}

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

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

.fstu-badge--update {
	background: #dbeafe;
	color: #1d4ed8;
}

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

@media (max-width: 991px) {
	.fstu-view-layout {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.fstu-pagination {
		flex-direction: column;
		align-items: flex-start;
	}

	.fstu-pagination--compact {
		flex-wrap: wrap;
	}

	.fstu-pagination__left,
	.fstu-pagination__controls,
	.fstu-pagination__info {
		width: 100%;
		justify-content: flex-start;
	}

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

	.fstu-action-bar {
		flex-wrap: wrap;
		overflow-x: visible;
	}

	.fstu-action-bar__group,
	.fstu-action-bar__group--filters {
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	.fstu-action-bar--referees .fstu-select--compact {
		width: 100%;
		min-width: 0;
	}

	.fstu-view-grid__row {
		grid-template-columns: 1fr;
		gap: 4px;
	}
}

