/**
 * Frontend styles for NCC Country Contacts
 *
 * Clean, minimal styles that can be easily customized.
 * Uses BEM naming convention.
 *
 * @package NCC_Country_Contacts
 */

/* Main container */
.ncc-contacts {
	margin: 2rem 0;
	width: 100%;
}

.ncc-contacts__heading {
	margin-bottom: 2.5rem;
	font-size: 2.25rem;
	font-weight: 700;
	text-align: center;
	color: #1a1a1a;
	letter-spacing: -0.02em;
}

/* Desktop layout: selector + detail side by side */
.ncc-contacts__desktop-layout {
	display: flex;
	gap: 2rem;
	align-items: flex-start;
	margin-bottom: 2rem;
}

/* Desktop selector (vertical, 40% width) */
.ncc-contacts__country-selector--desktop {
	width: 40%;
	flex-shrink: 0;
}

.ncc-contacts__country-selector-inner {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.ncc-contacts__country-tab {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 1rem !important;
	padding: 1rem 1.25rem !important;
	border: 1px solid #d1d5db !important;
	background: #ffffff !important;
	border-radius: 8px !important;
	cursor: pointer;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
	text-align: left !important;
}

.ncc-contacts__country-tab::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 0;
	background: #3b82f6;
	transition: width 0.3s ease;
}

.ncc-contacts__country-tab:hover {
	border-color: #9ca3af !important;
	background: #f3f4f6 !important;
}

.ncc-contacts__country-tab.is-active {
	border-color: #d1d5db !important;
	background: #f3f4f6 !important;
}

.ncc-contacts__country-tab.is-active::before {
	width: 4px;
}

.ncc-contacts__country-flag {
	width: 48px;
	height: 32px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #d1d5db;
	flex-shrink: 0;
}

.ncc-contacts__country-flag-placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 32px;
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #6b7280;
	letter-spacing: 0.05em;
	flex-shrink: 0;
}

.ncc-contacts__country-tab .ncc-contacts__country-name {
	font-size: 1.125rem !important;
	font-weight: 600 !important;
	color: #111827 !important;
	margin: 0 !important;
	line-height: 1.4 !important;
	text-align: left !important;
}

/* Remove old arrow styles - not needed for vertical layout */
.ncc-contacts__country-selector-arrow {
	display: none;
}

/* Detail panel (60% width) */
.ncc-contacts__detail {
	width: 60%;
	flex: 1;
	background: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 2rem;
	min-height: 400px;
	position: relative;
}

.ncc-contacts__detail-panel {
	display: none;
}

.ncc-contacts__detail-panel.is-active {
	display: block;
	animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ncc-contacts__detail-country {
	font-size: 1.875rem;
	font-weight: 700;
	margin: 0 0 1.5rem 0;
	color: #111827;
	letter-spacing: -0.02em;
	padding-bottom: 1rem;
	border-bottom: 1px solid #d1d5db;
}

.ncc-contacts__detail-contact-person,
.ncc-contacts__detail-phone,
.ncc-contacts__detail-email {
	margin: 1rem 0;
	line-height: 1.6;
	color: #374151;
	font-size: 1rem;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.ncc-contacts__detail-contact-person strong,
.ncc-contacts__detail-phone strong,
.ncc-contacts__detail-email strong {
	min-width: 80px;
	font-weight: 600;
	color: #1f2937;
	flex-shrink: 0;
}

.ncc-contacts__detail-phone a,
.ncc-contacts__detail-email a {
	color: #111827;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ncc-contacts__detail-phone a:hover,
.ncc-contacts__detail-email a:hover {
	color: #3b82f6;
	text-decoration: underline;
}

.ncc-contacts__detail-address {
	margin: 1.5rem 0 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid #d1d5db;
}

.ncc-contacts__detail-address-text {
	white-space: pre-line;
	line-height: 1.2;
	color: #4b5563;
	font-size: 0.9375rem;
	margin-bottom: 0.5rem;
}

.ncc-contacts__detail-address-text br {
	line-height: 1.2;
	margin: 0;
	padding: 0;
}

.ncc-contacts__detail-address-link {
	color: #3b82f6;
	text-decoration: underline;
	font-style: italic;
	font-size: 0.875rem;
	transition: color 0.2s ease;
	display: inline-block;
}

.ncc-contacts__detail-address-link:hover {
	color: #2563eb;
}

/* Mobile wrapper */
.ncc-contacts__mobile-wrapper {
	display: none;
}

/* Mobile grid (4 columns for flags) */
.ncc-contacts__country-grid--mobile {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.ncc-contacts__country-flag-button {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	border: 1px solid #d1d5db !important;
	background: #ffffff;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
}

.ncc-contacts__country-flag-button:hover {
	border-color: #9ca3af !important;
	background: #f3f4f6 !important;
}

.ncc-contacts__country-flag-button.is-active {
	border-color: #d1d5db !important;
	background: #f3f4f6;
}

.ncc-contacts__country-flag-button.is-active::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: #3b82f6;
}

.ncc-contacts__country-flag-button .ncc-contacts__country-flag {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: none;
	border-radius: 50%;
	aspect-ratio: 1;
}

.ncc-contacts__country-flag-button .ncc-contacts__country-flag-placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	background: #f3f4f6;
	border: none;
	border-radius: 50%;
	font-size: 0.625rem;
	font-weight: 600;
	color: #6b7280;
	letter-spacing: 0.05em;
	aspect-ratio: 1;
}

/* Mobile detail panel */
.ncc-contacts__detail--mobile {
	width: 100%;
	margin-top: 1.5rem;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
	.ncc-contacts__desktop-layout {
		display: none;
	}

	.ncc-contacts__mobile-wrapper {
		display: block;
	}

	.ncc-contacts__heading {
		font-size: 1.875rem;
		margin-bottom: 2rem;
	}
}

@media (min-width: 769px) {
	.ncc-contacts__mobile-wrapper {
		display: none;
	}
}

/* Print styles */
@media print {
	.ncc-contacts__desktop-layout {
		display: none;
	}

	.ncc-contacts__country-grid--mobile {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}

	.ncc-contacts__detail {
		display: none;
	}
}
