/* ================================================================
   NRA Dokumenty — style wyszukiwarki
   ================================================================ */

/* ----- Reset lokalny ----- */
.nra-dok-wyszukiwarka *,
.nra-dok-single * {
	box-sizing: border-box;
}

/* ----- Pasek wyszukiwania ----- */
.nra-dok-searchbar {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.nra-dok-input {
	flex: 1 1 300px;
	padding: 10px 14px;
	border: 1px solid #ccc;
	background: #f5f5f5;
	font-size: 15px;
	outline: none;
}

.nra-dok-input:focus {
	background: #fff;
	border-color: #888;
}

.nra-dok-btn {
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	white-space: nowrap;
}

.nra-dok-btn--clear {
	background: #1a1a1a;
	color: #fff;
}

.nra-dok-btn--search {
	background: #008A4C;
	color: #fff;
}

.nra-dok-btn--search:hover { background: #245c42; }
.nra-dok-btn--clear:hover  { background: #000; }

/* ----- Sekcja filtrów ----- */
.nra-dok-filters-header {
	font-size: 14px;
	font-weight: 700;
	margin: 20px 0 8px;
}

.nra-dok-filters {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	border: 1px solid #ddd;
	margin-bottom: 24px;
}

@media (max-width: 900px) {
	.nra-dok-filters { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.nra-dok-filters { grid-template-columns: 1fr; }
}

.nra-dok-filter-box {
	border-right: 1px solid #ddd;
}
.nra-dok-filter-box:last-child { border-right: none; }

.nra-dok-filter-title {
	padding: 10px 12px;
	font-size: 13px;
	font-weight: 700;
	background: #f9f9f9;
	border-bottom: 1px solid #ddd;
}

.nra-dok-filter-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nra-dok-filter-list li {
	padding: 7px 12px;
	font-size: 14px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	transition: background .15s;
}

.nra-dok-filter-list li:last-child { border-bottom: none; }

.nra-dok-filter-list li:hover { background: #f0f0f0; }

.nra-dok-filter-list li.active {
	background: #008A4C;
	color: #fff;
}

/* ----- Wyniki ----- */
.nra-dok-results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	font-size: 14px;
}

.nra-dok-found {
	color: #008A4C;
	font-size: 16px;
}

.nra-dok-archive-legend {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #666;
}

.nra-dok-archive-dot {
	display: inline-block;
	width: 14px;
	height: 14px;
	background: #e53935;
	border-radius: 2px;
	flex-shrink: 0;
}

/* ----- Tabela dokumentów ----- */
.nra-dok-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.nra-dok-row {
	border-bottom: 1px solid #e8e8e8;
	transition: background .1s;
}

.nra-dok-row:hover { background: #f8f8f8; }

.nra-dok-row--archive { background: #fdecea; }
.nra-dok-row--archive:hover { background: #fad7d4; }

.nra-dok-row.selected,
.nra-dok-row:target {
	background: #008A4C;
	color: #fff;
}
.nra-dok-row.selected a { color: #fff; }

.nra-dok-row.selected {
    .nra-dok-row__date, .nra-dok-row__organ, .nra-dok-row__typ,.nra-dok-row__num {
        color:#fff;
    }
}

.nra-dok-row td {
	padding: 9px 10px;
	vertical-align: top;
}

.nra-dok-row__num {
	width: 36px;
	color: #888;
	text-align: right;
}

.nra-dok-row__title a {
	color: #1a1a1a;
	text-decoration: none;
	font-weight: 500;
}

.nra-dok-row__title a:hover { text-decoration: underline; color: #008A4C; }

.nra-dok-row__date  { white-space: nowrap; color: #555; width: 100px; }
.nra-dok-row__organ { color: #000; width: 200px; }
.nra-dok-row__typ   { color: #000; width: 110px; }

.nra-dok-no-results {
	padding: 24px;
	text-align: center;
	color: #666;
	font-size: 15px;
}

/* ----- Paginacja ----- */
.nra-dok-pagination {
	margin: 14px 0;
}

.nra-dok-pages {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.nra-dok-page a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	border: 1px solid #ddd;
	color: #333;
	text-decoration: none;
	font-size: 14px;
	background: #fff;
	transition: background .12s, color .12s;
}

.nra-dok-page a:hover { background: #f0f0f0; }

.nra-dok-page.active a {
	background: #008A4C;
	color: #fff;
	border-color: #008A4C;
	font-weight: 700;
}

.nra-dok-page.disabled a {
	color: #bbb;
	cursor: default;
	pointer-events: none;
}

.nra-dok-page--ellipsis span {
	display: flex;
	align-items: center;
	height: 36px;
	padding: 0 6px;
	color: #888;
}

/* ----- Loading overlay ----- */
.nra-dok-loading {
	position: relative;
	min-height: 80px;
}

.nra-dok-loading::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,.6);
	z-index: 10;
}

/* ----- Pojedynczy dokument ----- */
.nra-dok-single {
	max-width: 860px;
}

.nra-dok-breadcrumb {
	margin-bottom: 16px;
	font-size: 13px;
}

.nra-dok-breadcrumb a {
	color: #008A4C;
	text-decoration: none;
}

.nra-dok-archive-notice {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fdecea;
	border: 1px solid #e53935;
	padding: 6px 12px;
	font-size: 13px;
	margin-bottom: 12px;
	border-radius: 3px;
}

.nra-dok-single__title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 16px;
	line-height: 1.3;
}

.nra-dok-single__meta {
	border-collapse: collapse;
	font-size: 14px;
	margin-bottom: 20px;
	width: 100%;
}

.nra-dok-single__meta th {
	width: 160px;
	text-align: left;
	font-weight: 600;
	padding: 6px 12px 6px 0;
	color: #555;
	border-bottom: 1px solid #eee;
}

.nra-dok-single__meta td {
	padding: 6px 0;
	border-bottom: 1px solid #eee;
}

.nra-dok-single__opis {
	background: #f9f9f9;
	border-left: 3px solid #008A4C;
	padding: 12px 16px;
	margin-bottom: 20px;
	font-size: 14px;
	color: #444;
}

.nra-dok-single__content {
	font-size: 15px;
	line-height: 1.7;
	margin-bottom: 24px;
}

.nra-dok-single__tresc-plik {
	font-size: 14px;
	line-height: 1.7;
	margin-bottom: 24px;
}

.nra-dok-download-btn {
	display: inline-block;
	padding: 10px 20px;
	background: #008A4C;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	border-radius: 3px;
}

.nra-dok-download-btn:hover { background: #245c42; color: #fff; }

/* ----- Panel szczegółów wiersza ----- */
.nra-dok-detail__cell {
	padding: 0 !important;
	border-bottom: 2px solid #008A4C;
}

.nra-dok-detail__inner {
	display: flex;
        flex-direction: column;
	justify-content: space-between;
	align-items: start;
	gap: 24px;
	padding: 14px 16px;
	background: #f4f9f6;
}

.nra-dok-detail__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}

.nra-dok-detail__title {
	font-size: 15px;
	font-weight: 700;
	color: #1a1a1a;
}

.nra-dok-detail__date {
	font-size: 13px;
	color: #555;
}

.nra-dok-detail__opis {
	font-size: 13px;
	color: #444;
}

.nra-dok-detail__footer {
	display: flex;
	flex-direction: row;
	align-items:start;
	gap: 8px;
	flex-shrink: 0;
        width:100%;
        justify-content: space-between;
        background-color: #F0F0F0;
        padding:0;
}

.nra-dok-detail__file {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #1a1a1a;
	text-decoration: none;

	padding: 6px 10px;
	border-radius: 3px;
        padding:20px;
}

.nra-dok-detail__file:hover { background: #f0f0f0; }
.nra-dok-detail__file--nolink { cursor: default; color: #666; }

.nra-dok-detail__file-icon::before {
	content: '⬇';
	color: #e53935;
	font-size: 14px;
}

.nra-dok-detail__more {
	display: inline-block;
	padding: 18px 22px;
	background: #008A4C;
	color: #fff;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	border-radius: 3px;
	white-space: nowrap;
}

.nra-dok-detail__more:hover { background: #245c42; color: #fff; }

@media (max-width: 600px) {
	.nra-dok-detail__inner { flex-direction: column; align-items: flex-start; }
	.nra-dok-detail__footer { align-items: flex-start; }
}


.fa-book {
    font-family: FontAwesome;
}