/**
 * Councillor contact and bio modals — loaded once via wp_enqueue_style
 */

/* ----- Contact modal ----- */
.councillor-contact-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.contact-modal-content {
	background: white;
	padding: 20px;
	border-radius: 8px;
	max-width: 500px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	position: relative;
	z-index: 1000000;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
}

.contact-modal-header h3 {
	margin: 0;
	color: #333;
}

.contact-modal-close {
	font-size: 24px;
	cursor: pointer;
	color: #999;
	line-height: 1;
}

.contact-modal-close:hover {
	color: #333;
}

.contact-form-group {
	margin-bottom: 15px;
}

.contact-form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
	color: #333;
}

.contact-form-group input,
.contact-form-group textarea {
	width: 100%;
	padding: 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.contact-form-group textarea {
	resize: vertical;
	min-height: 100px;
}

.required {
	color: #e74c3c;
}

.privacy-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: normal;
}

.privacy-checkbox input[type="checkbox"] {
	width: auto;
	margin: 0;
	flex-shrink: 0;
	margin-top: 2px;
}

.privacy-text {
	font-size: 13px;
	line-height: 1.4;
}

.contact-form-actions {
	display: flex;
	gap: 10px;
	margin-top: 20px;
}

.contact-submit-btn,
.contact-cancel-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	flex: 1;
}

.contact-submit-btn {
	background-color: #0073aa;
	color: white;
}

.contact-submit-btn:hover {
	background-color: #005a87;
}

.contact-cancel-btn {
	background-color: #f1f1f1;
	color: #333;
}

.contact-cancel-btn:hover {
	background-color: #e1e1e1;
}

.contact-form-messages {
	margin-top: 15px;
	padding: 10px;
	border-radius: 4px;
}

.contact-success {
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.contact-error {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.cf-turnstile {
	margin: 10px 0;
}

.councillor-contact-modal:focus {
	outline: none;
}

.contact-modal-content:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

.field-error {
	color: #d63638;
	font-size: 13px;
	margin-top: 5px;
	display: none;
}

.field-error.show {
	display: block;
}

@media (prefers-contrast: high) {
	.contact-modal-content {
		border: 2px solid #000;
	}

	.contact-submit-btn,
	.contact-cancel-btn {
		border: 2px solid #000;
	}
}

@media (prefers-reduced-motion: reduce) {
	.councillor-contact-modal,
	.contact-modal-content {
		transition: none;
	}
}

/* ----- Bio modal ----- */
.councillor-bio-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bio-modal-content {
	background: white;
	padding: 20px;
	border-radius: 8px;
	max-width: 600px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	position: relative;
	z-index: 1000000;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.bio-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
}

.bio-modal-header h3 {
	margin: 0;
	color: #333;
}

.bio-modal-close {
	font-size: 24px;
	cursor: pointer;
	color: #999;
	line-height: 1;
}

.bio-modal-close:hover {
	color: #333;
}

.bio-modal-body {
	display: flex;
	gap: 20px;
	margin-bottom: 20px;
}

.bio-modal-thumbnail {
	flex-shrink: 0;
}

.bio-modal-thumbnail img {
	border-radius: 4px;
	max-width: 150px;
	height: auto;
}

.bio-modal-info {
	flex: 1;
}

.bio-description {
	margin-bottom: 15px;
	font-style: italic;
	color: #666;
}

.bio-content {
	margin-bottom: 20px;
	line-height: 1.6;
}

.bio-contact-info p {
	margin-bottom: 8px;
}

@media (max-width: 768px) {
	.bio-modal-body {
		flex-direction: column;
	}

	.bio-modal-thumbnail {
		text-align: center;
	}
}

/* Shared: screen reader only (modals) */
.sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}
