/*
Theme Name: NexLaw
Theme URI: https://nexlaw.test
Author: danhhoang
Author URI: https://nexlaw.test
Description: Theme pháp lý cao cấp cho Nexlaw Legal Institutions. Thiết kế editorial với bảng màu vàng-xanh navy, typography serif.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 8.2
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexlaw
Tags: legal, law-firm, custom-logo, custom-menu, featured-images, full-width-template
*/

/* =========================================
   NEXLAW DESIGN SYSTEM — CSS CUSTOM PROPERTIES
   Nguồn: Tailwind config từ stitch files
   ========================================= */
:root {
	/* Primary — Vàng luật */
	--nl-primary: #735c00;
	--nl-primary-container: #ffd43e;
	--nl-primary-fixed: #ffe083;
	--nl-primary-fixed-dim: #ecc22c;
	--nl-on-primary: #ffffff;
	--nl-on-primary-container: #725b00;
	--nl-on-primary-fixed: #231b00;
	--nl-inverse-primary: #ecc22c;

	/* Secondary — Navy xanh */
	--nl-secondary: #525e7a;
	--nl-secondary-container: #d0ddfe;
	--nl-secondary-fixed: #d8e2ff;
	--nl-on-secondary: #ffffff;

	/* Tertiary — Vàng nhạt */
	--nl-tertiary: #735b14;
	--nl-tertiary-container: #f6d582;
	--nl-tertiary-fixed: #ffdf92;
	--nl-tertiary-fixed-dim: #e3c372;
	--nl-on-tertiary: #ffffff;
	--nl-on-tertiary-container: #735b14;

	/* Surface */
	--nl-surface: #f9f9ff;
	--nl-surface-dim: #cddafb;
	--nl-surface-bright: #f9f9ff;
	--nl-surface-container-lowest: #ffffff;
	--nl-surface-container-low: #f1f3ff;
	--nl-surface-container: #e9edff;
	--nl-surface-container-high: #e0e8ff;
	--nl-surface-container-highest: #d8e2ff;
	--nl-surface-variant: #d8e2ff;
	--nl-inverse-surface: #23304a;
	--nl-on-surface: #0e1b34;
	--nl-on-surface-variant: #4d4634;
	--nl-inverse-on-surface: #edf0ff;
	--nl-background: #f9f9ff;
	--nl-on-background: #0e1b34;

	/* Outline */
	--nl-outline: #7f7661;
	--nl-outline-variant: #d0c6ad;

	/* Error */
	--nl-error: #ba1a1a;
	--nl-error-container: #ffdad6;
	--nl-on-error: #ffffff;

	/* Surface tint */
	--nl-surface-tint: #735c00;

	/* Typography */
	--nl-font-headline: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
	--nl-font-body: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
	--nl-font-label: 'Be Vietnam Pro', system-ui, sans-serif;

	/* Spacing */
	--nl-max-width: 80rem;
	/* max-w-7xl = 1280px */
	--nl-nav-height: 72px;

	/* Radius */
	--nl-radius-sm: 0.125rem;
	--nl-radius-md: 0.25rem;
	--nl-radius-lg: 0.5rem;
	--nl-radius-full: 0.75rem;

	/* Shadows */
	--nl-shadow-editorial: 0px 24px 48px -12px rgba(14, 27, 52, 0.06);
	--nl-shadow-card: 0 4px 24px rgba(14, 27, 52, 0.08);
}

/* =========================================
   RESET & BASE
   ========================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 0;
	font-family: var(--nl-font-body);
	background-color: var(--nl-background);
	color: var(--nl-on-surface);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

/* =========================================
   MATERIAL SYMBOLS
   ========================================= */
.material-symbols-outlined {
	font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
	user-select: none;
}

/* =========================================
   UTILITY: bổ sung cho Tailwind CDN
   ========================================= */
.nl-container {
	width: 100%;
	max-width: var(--nl-max-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: 2rem;
	padding-right: 2rem;
}

.nl-btn-primary {
	background: linear-gradient(135deg, var(--nl-primary) 0%, var(--nl-primary-fixed-dim) 100%);
	color: var(--nl-on-primary);
	padding: 0.75rem 1.5rem;
	font-family: var(--nl-font-label);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.15s ease;
	display: inline-block;
}

.nl-btn-primary:hover {
	opacity: 0.9;
}

.nl-btn-primary:active {
	transform: scale(0.97);
}

/* =========================================
   WORDPRESS CORE CLASSES
   ========================================= */
.wp-block-image figcaption {
	font-family: var(--nl-font-label);
	font-size: 0.75rem;
	color: var(--nl-on-surface-variant);
	text-align: center;
	margin-top: 0.5rem;
}

.wp-caption-text {
	font-family: var(--nl-font-label);
	font-size: 0.75rem;
	color: var(--nl-on-surface-variant);
}

/* Alignments */
.alignleft {
	float: left;
	margin-right: 1.5rem;
	margin-bottom: 1rem;
}

.alignright {
	float: right;
	margin-left: 1.5rem;
	margin-bottom: 1rem;
}

.aligncenter {
	text-align: center;
	margin: 0 auto 1rem;
	display: block;
}

.alignfull {
	width: 100vw;
	margin-left: calc(-50vw + 50%);
}

.alignwide {
	width: calc(100% + 4rem);
	margin-left: -2rem;
}

/* Screen reader */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Skip link */
.skip-link {
	position: absolute;
	top: -100%;
	left: 0;
	background: var(--nl-primary);
	color: var(--nl-on-primary);
	padding: 0.5rem 1rem;
	z-index: 9999;
	font-family: var(--nl-font-label);
	font-size: 0.875rem;
}

.skip-link:focus {
	top: 0;
}

/* =========================================
   ADMIN BAR STICKY HEADER FIX
   ========================================= */
body.admin-bar #site-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar #site-header {
		top: 46px;
	}
}

/* =========================================
   CONTACT FORM 7 UI/UX CUSTOMIZATION
   ========================================= */
/* Bọc hệ thống form để căn giữa spinner */
.cf7-custom-style form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem 1rem; 
	position: relative; /* Dùng để canh giữa spinner */
}
/* Mặc định tất cả các field chiếm trọn 2 cột */
.cf7-custom-style form > * {
	grid-column: span 2;
}
/* Chỉ định các trường đứng cạnh nhau */
@media screen and (min-width: 768px) {
	.cf7-custom-style form > label:nth-of-type(2),
	.cf7-custom-style form > label:nth-of-type(3),
	.cf7-custom-style form > .cf-half {
		grid-column: span 1;
	}
}
.cf7-custom-style label {
	display: block;
	font-family: var(--nl-font-label);
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--nl-on-surface);
	margin-bottom: 0.25rem;
}
.cf7-custom-style input[type="text"],
.cf7-custom-style input[type="email"],
.cf7-custom-style input[type="tel"],
.cf7-custom-style select,
.cf7-custom-style textarea {
	width: 100%;
	background-color: var(--nl-surface-container-lowest);
	border: 1px solid rgba(var(--nl-outline-variant-rgb), 0.3);
	padding: 0.75rem 1rem;
	font-family: var(--nl-font-body);
	font-size: 0.875rem;
	border-radius: 0.5rem;
	transition: all 0.2s ease;
}
.cf7-custom-style input[type="text"]:focus,
.cf7-custom-style input[type="email"]:focus,
.cf7-custom-style input[type="tel"]:focus,
.cf7-custom-style select:focus,
.cf7-custom-style textarea:focus {
	outline: none;
	border-color: var(--nl-primary);
	box-shadow: 0 0 0 1px var(--nl-primary);
}
.cf7-custom-style input[type="file"] {
	font-family: var(--nl-font-body);
	font-size: 0.875rem;
	margin-top: 0.25rem;
}
.cf7-custom-style input[type="submit"] {
	background: linear-gradient(135deg, var(--nl-primary) 0%, #ecc22c 100%);
	color: #fff;
	padding: 1rem 2rem;
	font-family: var(--nl-font-label);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	border: none;
	cursor: pointer;
	width: 100%;
	border-radius: 9999px;
	transition: opacity 0.3s;
	margin-top: 0.5rem;
}
.cf7-custom-style input[type="submit"]:hover {
	opacity: 0.9;
}

/* Hiệu ứng form mờ đi khi đang submitting */
.cf7-custom-style form.submitting {
	opacity: 0.6;
	pointer-events: none;
}

/* CF7 Spinner Adjustments - Hiển thị ngay chính giữa form */
.cf7-custom-style .wpcf7-spinner {
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) scale(1.5);
	margin: 0 !important;
	background-color: var(--nl-primary);
	z-index: 99;
}

/* Beautiful CF7 Response Output */
.cf7-custom-style .wpcf7 form .wpcf7-response-output {
	margin: 1rem 0 0 0 !important;
	padding: 1rem !important;
	border-radius: 0.5rem !important;
	font-family: var(--nl-font-body);
	font-size: 0.875rem;
	font-weight: 500;
	text-align: center;
	border: none !important;
}
/* Success Message */
.cf7-custom-style .wpcf7 form.sent .wpcf7-response-output {
	background-color: #e6f4ea !important;
	color: #137333 !important;
}
/* Error Messages */
.cf7-custom-style .wpcf7 form.invalid .wpcf7-response-output,
.cf7-custom-style .wpcf7 form.failed .wpcf7-response-output {
	background-color: #fce8e6 !important;
	color: #c5221f !important;
}

/* Inline validation errors */
.cf7-custom-style .wpcf7-not-valid-tip {
	font-size: 0.75rem;
	color: #c5221f;
	margin-top: 0.25rem;
	display: block;
	font-weight: 500;
}