/*
Theme Name: Notary Search UA
Theme URI: https://photographer.com.ua
Author: Pavlo
Description: Тема пошуку нотаріусів з темним інтерфейсом, гнучкими налаштуваннями бренду та вбудованим XML-імпортером реєстру нотаріусів.
Version: 1.5
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: notary-theme
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root{
	--bg: #0B0D11;
	--panel: #12151B;
	--panel-2: #171B22;
	--border: rgba(255,255,255,0.07);
	--border-strong: rgba(255,255,255,0.14);
	--text: #EDEFF3;
	--text-secondary: #9AA2B1;
	--text-muted: #616875;
	--accent-a: #5B8CFF;
	--accent-b: #8B6CFF;
	--danger: #E2807D;
}

*{ box-sizing: border-box; }

html, body{
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: 'Inter', sans-serif;
	-webkit-font-smoothing: antialiased;
}

a{ color: inherit; }

.glow{
	position: fixed;
	top: -120px;
	left: 50%;
	transform: translateX(-50%);
	width: 900px;
	height: 420px;
	background: radial-gradient(ellipse at center, rgba(91,140,255,0.18) 0%, rgba(139,108,255,0.09) 40%, transparent 70%);
	filter: blur(10px);
	pointer-events: none;
	z-index: 0;
}

.site-wrap{
	position: relative;
	z-index: 1;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site-header{
	max-width: 880px;
	margin: 0 auto;
	width: 100%;
	padding: 1.5rem;
	display: flex;
	align-items: center;
	gap: 12px;
}

.site-logo{ height: 36px; width: auto; }

.site-title{
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 600;
	font-size: 15px;
	color: var(--text-secondary);
}

/* ================= Front-page hero ================= */
header.hero{
	position: relative;
	z-index: 1;
	min-height: 60vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 3.5rem 1.5rem 2.5rem;
}

.hero-logo, .hero-logo-img{
	width: 52px; height: 52px;
	border-radius: 13px;
	margin-bottom: 16px;
}
.hero-logo{
	background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
	display: flex; align-items: center; justify-content: center;
	font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; color: #fff;
	box-shadow: 0 10px 40px -10px rgba(91,140,255,0.5);
}
.hero-logo-img{ object-fit: contain; }

header.hero .site-title{ margin: 0 0 8px; }

.hero-word{
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 700;
	font-size: 44px;
	line-height: 1.1;
	margin: 0 0 12px;
	background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero-desc{
	color: var(--text-secondary);
	font-size: 15px;
	max-width: 440px;
	margin: 0 auto 1.75rem;
	line-height: 1.6;
}

.hero-hint{ margin-top: 12px; font-size: 12px; color: var(--text-muted); }

/* ================= Search panel ================= */
.search-panel{
	background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
	backdrop-filter: blur(20px);
	border: 1px solid var(--border-strong);
	border-radius: 18px;
	padding: 10px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	max-width: 620px;
	margin: 0 auto;
	box-shadow: 0 20px 60px -20px rgba(0,0,0,0.7);
}
.search-panel input, .search-panel select{
	background: rgba(255,255,255,0.04);
	border: 1px solid transparent;
	color: var(--text);
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	padding: 12px 14px;
	border-radius: 12px;
	outline: none;
	transition: border-color 0.15s, background 0.15s;
}
.search-panel input{ flex: 2; min-width: 200px; }
.search-panel select{ flex: 1; min-width: 160px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239AA2B1' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.search-panel input:focus, .search-panel select:focus{ border-color: var(--accent-a); background: rgba(255,255,255,0.06); }
.search-panel input::placeholder{ color: var(--text-muted); }
.search-panel select option{ background: var(--panel-2); color: var(--text); }
.search-btn{
	background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
	color: #fff;
	border: none;
	font-family: 'Inter', sans-serif;
	font-weight: 500;
	font-size: 14px;
	padding: 12px 22px;
	border-radius: 12px;
	cursor: pointer;
	display: inline-flex; align-items: center; gap: 8px;
	white-space: nowrap;
}
.search-btn:hover{ filter: brightness(1.08); }

/* ================= Map section — no visible frame, blends into page bg ================= */
.map-section{
	position: relative;
	width: 100%;
	height: 76vh;
	min-height: 520px;
	overflow: hidden;
	background: var(--bg);
}
.map-stage{ position: absolute; inset: 0; transition: filter 0.35s ease; }
.map-stage.is-blurred{ filter: blur(10px) brightness(0.35); }
.map-stage svg{ width: 100%; height: 100%; display: block; }

.map-fade{
	position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(ellipse 70% 65% at 50% 48%, transparent 55%, var(--bg) 96%);
}

.neighbor{ fill: var(--bg); }
.sea{ fill: url(#seaGrad); }
.oblast{ fill: url(#uaGrad); stroke: rgba(139,108,255,0.5); stroke-width: 1.2; transition: fill 0.15s, stroke 0.15s; cursor: pointer; }
.oblast:hover{ fill: #2a3350; stroke: var(--accent-a); }

.badge rect{ fill: rgba(10,12,16,0.82); stroke: rgba(255,255,255,0.16); stroke-width: 1; }
.badge text{ fill: var(--text); font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600; }
.badge, .badge *{ pointer-events: none; }

.oblast-tooltip{
	position: absolute;
	top: 18px;
	left: 50%;
	transform: translate(-50%, -8px);
	background: rgba(18,21,27,0.9);
	border: 1px solid var(--border-strong);
	backdrop-filter: blur(6px);
	color: var(--text);
	font-size: 13px;
	font-weight: 500;
	padding: 8px 16px;
	border-radius: 999px;
	opacity: 0;
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
	z-index: 3;
	white-space: nowrap;
}
.oblast-tooltip.is-visible{ opacity: 1; transform: translate(-50%, 0); }

/* ================= Results overlay (hidden until a search runs) ================= */
.results-overlay{
	position: fixed;
	inset: 0;
	z-index: 30;
	display: flex; align-items: flex-start; justify-content: center;
	padding: 6vh 1.5rem 4rem;
	opacity: 0; pointer-events: none;
	background: rgba(6,7,10,0.55);
	backdrop-filter: blur(2px);
	transition: opacity 0.3s ease;
	overflow-y: auto;
}
.results-overlay.is-visible{ opacity: 1; pointer-events: auto; }
.results-panel{ width: 100%; max-width: 820px; }

.meta-row{ padding: 0 4px 10px; font-size: 13px; color: var(--text-muted); }

.list{
	border: 1px solid var(--border-strong);
	border-radius: 16px;
	overflow: hidden;
	background: rgba(18,21,27,0.97);
	backdrop-filter: blur(6px);
	box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
}
.list-head{
	display: flex; align-items: center; padding: 12px 20px;
	font-size: 12px; color: var(--text-muted);
	border-bottom: 1px solid var(--border); background: var(--panel-2);
}
.col-name{ flex: 3; }
.col-oblast{ flex: 1.4; }
.col-address{ flex: 4; }

.row{ border-bottom: 1px solid var(--border); }
.row:last-child{ border-bottom: none; }

.row-main{
	display: flex; align-items: flex-start; gap: 12px;
	padding: 14px 20px;
	cursor: pointer;
	transition: background 0.12s;
	position: relative;
}
.row-main:hover{ background: rgba(255,255,255,0.025); }
.row.is-open .row-main{ background: rgba(255,255,255,0.03); }
.row.is-open .row-main::before{
	content: '';
	position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
	background: linear-gradient(180deg, var(--accent-a), var(--accent-b));
}

.name-cell{ display: flex; align-items: center; gap: 12px; font-size: 14px; }
.avatar{
	width: 34px; height: 34px; min-width: 34px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 12px; font-weight: 600; color: #fff;
	background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
}
.avatar.is-inactive{
	background: #5a5f6a;
}
.name-block{ display: flex; flex-direction: column; gap: 2px; }
.name{ font-weight: 500; }
.name-meta{ font-weight: 400; font-size: 12px; color: var(--text-muted); }
.name-status{ font-weight: 500; font-size: 12px; color: #b0384b; }
.oblast-tag{ color: var(--text-secondary); font-size: 13px; padding-top: 8px; }
.address-cell{ color: var(--text-secondary); font-size: 13px; line-height: 1.5; padding-top: 8px; }

.chevron{ color: var(--text-muted); transition: transform 0.15s; padding-top: 8px; flex: 0 0 16px; }
.row.is-open .chevron{ transform: rotate(90deg); color: var(--accent-a); }

.row-details{ display: none; padding: 4px 20px 18px 66px; gap: 10px; }
.row.is-open .row-details{ display: flex; flex-wrap: wrap; }

.detail-btn{
	display: inline-flex; align-items: center; gap: 8px;
	font-size: 13px; color: var(--text); text-decoration: none;
	padding: 8px 16px; border-radius: 999px;
	border: 1px solid var(--border-strong);
	background: rgba(255,255,255,0.05);
	transition: border-color 0.15s, background 0.15s;
}
.detail-btn:hover{ border-color: var(--accent-a); background: rgba(91,140,255,0.1); }
.detail-btn.is-disabled{ color: var(--text-muted); cursor: default; opacity: 0.5; pointer-events: none; }

.empty, .loading{ padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }

.pagination{
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	margin-top: 16px;
}
.pagination button{
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border-radius: 8px;
	border: 1px solid var(--border-strong);
	background: rgba(255,255,255,0.04);
	color: var(--text-secondary);
	font-size: 13px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.pagination button:hover{ border-color: var(--accent-a); color: var(--text); }
.pagination button.is-active{
	background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
	border-color: transparent;
	color: #fff;
	cursor: default;
}

.close-btn{
	display: block; margin: 0 auto 12px;
	background: rgba(255,255,255,0.06);
	border: 1px solid var(--border-strong);
	color: var(--text-secondary);
	font-size: 13px;
	padding: 8px 16px;
	border-radius: 999px;
	cursor: pointer;
}
.close-btn:hover{ color: var(--text); border-color: var(--accent-a); }

/* ================= Footer ================= */
.site-footer{
	max-width: 880px;
	margin: 0 auto;
	width: 100%;
	padding: 2rem 1.5rem 2.5rem;
	text-align: center;
	border-top: 1px solid var(--border);
	position: relative;
	z-index: 1;
}
.footer-text{ color: var(--text-muted); font-size: 13px; margin: 0 0 10px; }
.footer-social{ display: flex; gap: 16px; justify-content: center; }
.footer-social a{ color: var(--text-secondary); font-size: 13px; text-decoration: none; }
.footer-social a:hover{ color: var(--accent-a); }

/* ================= Single-notary detail page (reuses .list/.row) ================= */
.wrap{ max-width: 880px; margin: 0 auto; padding: 0 1.5rem; }

.notary-detail-header{ padding: 3rem 0 1.5rem; text-align: left; }
.notary-detail-eyebrow{ font-size: 13px; color: var(--text-muted); margin: 0 0 10px; }
.notary-detail-title{ font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 32px; margin: 0 0 8px; }
.notary-detail-office{ color: var(--text-secondary); font-size: 15px; margin: 0; }

@media (max-width: 640px){
	.hero-word{ font-size: 32px; }
	.col-address{ display: none; }
	.list-head .col-address{ display: none; }
	.search-panel{ flex-direction: column; }
	.row-details{ padding-left: 20px; }
	.map-section{ height: 60vh; }
	.badge text{ font-size: 17px; }
}
