/* ============================================================
   Hongik Korean Buddy - consolidated stylesheet
   01. Application modal
   02. Form fields and controls
   03. Completion screen
   04. Application status result
   05. Responsive layout
   ============================================================ */

/* 01. Application modal */
#buddyModal[hidden] {
	display: none !important;
}

#buddyModal,
#buddyModal * {
	box-sizing: border-box;
}

#buddyModal.buddy-modal {
	position: fixed !important;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	background: rgba(10, 25, 48, .72);
	overflow-y: auto;
}

#buddyModal .buddy-dialog {
	display: flex;
	flex-direction: column;
	width: min(850px, 100%);
	max-height: calc(100dvh - 36px);
	margin: auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 25px 75px rgba(0, 0, 0, .3);
	overflow: hidden;
}

#buddyModal .buddy-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 24px;
	background: #132d50;
	color: #fff;
	flex-shrink: 0;
}

#buddyModal .buddy-head h2 {
	margin: 0;
	font-size: 21px;
	font-weight: 700;
	color: #fff;
}

#buddyModal .buddy-close {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, .15);
	color: #fff;
	font-size: 27px;
	cursor: pointer;
}

#buddyModal #buddyForm {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
	margin: 0;
}

#buddyModal .buddy-body {
	flex: 1;
	min-height: 0;
	padding: 22px 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

#buddyModal .buddy-section {
	margin: 0 0 22px;
	padding: 0 0 22px;
	border-bottom: 1px solid #e1e8f1;
}

#buddyModal .buddy-section h3 {
	margin: 0 0 16px;
	color: #132d50;
	font-size: 17px;
	font-weight: 700;
}

#buddyModal .buddy-footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 15px 24px;
	border-top: 1px solid #e1e8f1;
	background: #fff;
	flex-shrink: 0;
}

#buddyModal .buddy-btn {
	padding: 11px 20px;
	border: 0;
	border-radius: 8px;
	background: #132d50;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

#buddyModal .buddy-btn.alt {
	background: #eef2f7;
	color: #233a59;
}

/* 02. Form fields and controls */
#buddyModal .buddy-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 15px;
}

#buddyModal .buddy-level {
	display: grid;
	grid-template-columns: 1fr 120px 1fr;
	gap: 12px;
}

#buddyModal .buddy-field {
	min-width: 0;
	margin: 0 0 12px;
}

#buddyModal .buddy-field.wide {
	grid-column: 1 / -1;
}

#buddyModal .buddy-field > label {
	display: block;
	margin-bottom: 7px;
	color: #34465e;
	font-size: 13px;
	font-weight: 600;
}

#buddyModal .buddy-field input:not([type="radio"]):not([type="checkbox"]),
#buddyModal .buddy-field select,
#buddyModal .buddy-field textarea {
	width: 100%;
	max-width: 100%;
	min-height: 42px;
	padding: 9px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	color: #152a45;
	font-family: inherit;
	font-size: 14px;
}

#buddyModal .buddy-field textarea {
	min-height: 130px;
	resize: vertical;
}

#buddyModal .buddy-field input[readonly] {
	background: #f3f6fa !important;
}

#buddyModal .buddy-field select {
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	display: block;
	min-height: 44px;
	padding: 10px 40px 10px 13px !important;
	background-color: #fff !important;
	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='%23193453' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 13px center !important;
	background-size: 16px !important;
	border-color: #d9e1ea;
	color: #243b58;
	cursor: pointer;
}

#buddyModal .buddy-field select:focus {
	outline: none;
	border-color: #193453;
	box-shadow: 0 0 0 3px rgba(25, 52, 83, .1);
}

#buddyModal .buddy-choice {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 22px;
	margin-top: 8px;
	padding: 8px 0;
}

#buddyModal .buddy-choice label {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	width: auto !important;
	margin: 0;
	color: #243b58;
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
}

/* Restore native controls when the site's global CSS hides them. */
#buddyModal input[type="radio"],
#buddyModal input[type="checkbox"] {
	appearance: auto !important;
	-webkit-appearance: auto !important;
	display: inline-block !important;
	visibility: visible !important;
	opacity: 1 !important;
	position: static !important;
	width: 17px !important;
	height: 17px !important;
	min-width: 17px;
	margin: 0 !important;
	padding: 0 !important;
	accent-color: #173456;
	vertical-align: middle;
	cursor: pointer;
}

#buddyModal input[type="radio"] {
	border-radius: 50%;
}

#buddyModal input[type="checkbox"] {
	border-radius: 3px;
}

#buddyModal .buddy-required {
	color: #bc3d3d;
}

#buddyModal .buddy-hint {
	color: #718096;
	font-size: 12px;
}

#buddyModal .buddy-note {
	padding: 15px;
	border-radius: 9px;
	background: #f4f7fb;
	color: #41526b;
	font-size: 13px;
	line-height: 1.8;
	white-space: pre-line;
}

#buddyModal .buddy-error {
	color: #b42318;
	font-size: 13px;
}

/* 03. Completion screen */
.buddy-complete {
	max-width: 560px;
	margin: 45px auto 65px;
	padding: 40px 30px;
	border: 1px solid #dce4ef;
	border-radius: 16px;
	background: #fff;
	text-align: center;
	box-shadow: 0 8px 28px rgba(15, 40, 75, .05);
}

.buddy-complete-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: #f1f6fc;
	color: #b28a46;
	font-size: 34px;
	font-weight: 700;
}

.buddy-complete h2 {
	margin: 0 0 12px;
	color: #142f53;
	font-size: 27px;
	font-weight: 700;
}

.buddy-complete p {
	margin: 0;
	color: #68788e;
	font-size: 15px;
	line-height: 1.7;
}

.buddy-complete-actions {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
}

.buddy-complete-actions a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 160px;
	min-height: 46px;
	padding: 11px 20px;
	border-radius: 9px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: all .2s ease;
}

.buddy-complete-actions .primary {
	border: 1px solid #142f53;
	background: #142f53;
	color: #fff !important;
}

.buddy-complete-actions .primary:hover {
	background: #244b78;
	transform: translateY(-2px);
}

.buddy-complete-actions .secondary {
	border: 1px solid #cbd6e5;
	background: #fff;
	color: #142f53 !important;
}

.buddy-complete-actions .secondary:hover {
	border-color: #142f53;
	background: #f3f6fb;
}

/* 04. Application status result */
.buddy-result-panel {
	padding: 22px 24px;
	border: 1px solid #dce4ee;
	border-radius: 12px;
	background: #fff;
}

.buddy-result-summary {
	padding: 20px;
	border-left: 4px solid #c18b36;
	border-radius: 8px;
	background: #f3f6fa;
	color: #173456;
	font-size: 16px;
	line-height: 1.7;
}

.buddy-result-summary strong {
	color: #102c50;
	font-weight: 700;
}

.buddy-result-info {
	margin-top: 20px;
}

.buddy-result-row {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	padding: 15px 4px;
	border-bottom: 1px solid #e8edf3;
}

.buddy-result-row:last-child {
	border-bottom: 0;
}

.buddy-result-label {
	flex: 0 0 135px;
	color: #183858;
	font-size: 14px;
	font-weight: 700;
}

.buddy-result-value {
	flex: 1;
	color: #53647a;
	font-size: 14px;
	line-height: 1.8;
}

.buddy-result-value strong {
	color: #173456;
}

/* 05. Responsive layout */
@media (max-width: 640px) {
	#buddyModal.buddy-modal {
		padding: 8px;
	}

	#buddyModal .buddy-dialog {
		max-height: calc(100dvh - 16px);
		border-radius: 12px;
	}

	#buddyModal .buddy-head,
	#buddyModal .buddy-body,
	#buddyModal .buddy-footer {
		padding: 14px;
	}

	#buddyModal .buddy-grid,
	#buddyModal .buddy-level {
		grid-template-columns: 1fr;
		gap: 7px;
	}
}

@media (max-width: 600px) {
	.buddy-result-panel {
		padding: 16px;
	}

	.buddy-result-row {
		display: block;
		padding: 13px 2px;
	}

	.buddy-result-label {
		display: block;
		margin-bottom: 5px;
	}

	.buddy-result-value {
		display: block;
	}
}

@media (max-width: 480px) {
	.buddy-complete {
		margin: 25px 10px 40px;
		padding: 30px 18px;
	}

	.buddy-complete h2 {
		font-size: 23px;
	}

	.buddy-complete-actions a {
		width: 100%;
	}
}

.buddy-complete {
	max-width: 560px;
	margin: 42px auto 64px;
	padding: 36px 28px;
	background: #fff;
	border: 1px solid #dce4ef;
	border-radius: 16px;
	box-shadow: 0 8px 28px rgba(15, 40, 75, .05);
	text-align: center;
}
.buddy-complete-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: #eef5fc;
	color: #b28a46;
	font-size: 32px;
	font-weight: 700;
}
.buddy-complete-icon-error {
	background: #fff4ee;
	color: #b45336;
}
.buddy-complete h2 {
	margin: 0 0 12px;
	font-size: 26px;
	line-height: 1.4;
	font-weight: 700;
	color: #142f53;
}
.buddy-complete p {
	margin: 0;
	color: #68788e;
	font-size: 15px;
	line-height: 1.75;
}
.buddy-complete-actions {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 26px;
}
.buddy-complete-actions a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 170px;
	min-height: 46px;
	padding: 11px 20px;
	border: 1px solid transparent;
	border-radius: 9px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	transition: background-color .2s, border-color .2s, transform .2s;
}
.buddy-complete-actions a.primary {
	background: #142f53;
	border-color: #142f53;
	color: #fff !important;
}
.buddy-complete-actions a.primary:hover {
	background: #244b78;
	transform: translateY(-1px);
}
.buddy-complete-actions a.secondary {
	background: #fff;
	border-color: #cbd6e5;
	color: #142f53 !important;
}
.buddy-complete-actions a.secondary:hover {
	background: #f3f6fb;
	border-color: #142f53;
}
@media (max-width: 480px) {
	.buddy-complete {
		margin: 24px 8px 40px;
		padding: 28px 18px;
	}
	.buddy-complete h2 {
		font-size: 22px;
	}
	.buddy-complete-actions a {
		width: 100%;
	}
}
/* 신청현황 조회 - 결과 정보 정리 */
.buddy-result-panel {
	padding: 26px 30px;
}

.buddy-result-summary {
	display: flex;
	align-items: center;
	min-height: 64px;
	padding: 18px 22px;
	background: #f3f6fa;
	border-left: 4px solid #c18b36;
	border-radius: 9px;
	color: #173456;
	font-size: 16px;
	line-height: 1.7;
}

.buddy-result-info {
	margin-top: 18px;
}

.buddy-result-row {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	padding: 17px 4px;
	border-bottom: 1px solid #e8edf3;
}

.buddy-result-row:last-child {
	border-bottom: 0;
}

.buddy-result-label {
	flex: 0 0 140px;
	color: #173456;
	font-size: 14px;
	font-weight: 700;
}

.buddy-result-value {
	flex: 1;
	color: #52647a;
	font-size: 14px;
	line-height: 1.8;
}

@media (max-width: 600px) {
	.buddy-result-panel {
		padding: 18px;
	}

	.buddy-result-row {
		display: block;
		padding: 14px 2px;
	}

	.buddy-result-label {
		display: block;
		margin-bottom: 5px;
	}
}

.hik-certificate .certificate-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	align-items: stretch;
}

.hik-certificate .certificate-card {
	display: flex;
	flex-direction: column;
	margin-bottom: 0;
	min-width: 0;
	height: 100%;
}

@media (max-width: 700px) {
	.hik-certificate .certificate-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}
}
/* 증명서 신청안내 */
.hik-certificate {
	max-width: 1120px;
	margin: 35px auto 65px;
	padding: 0 20px;
	color: #183453;
}

.hik-certificate .eyebrow {
	margin-bottom: 8px;
	color: #b68b48;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
}

.hik-certificate h1 {
	margin: 0 0 12px;
	color: #102d50;
	font-size: 30px;
	font-weight: 700;
}

.hik-certificate .intro {
	margin-bottom: 28px;
	color: #65758a;
	font-size: 15px;
	line-height: 1.8;
}

.hik-certificate .certificate-card {
	padding: 25px 28px;
	background: #fff;
	border: 1px solid #dce4ee;
	border-radius: 12px;
	box-shadow: 0 5px 18px rgba(20, 45, 80, .04);
}

.hik-certificate .certificate-period {
	margin-bottom: 8px;
	color: #b68b48;
	font-size: 13px;
	font-weight: 700;
}

.hik-certificate .certificate-card h2 {
	margin: 0 0 12px;
	color: #173456;
	font-size: 21px;
	font-weight: 700;
}

.hik-certificate .certificate-card p {
	margin: 0 0 10px;
	color: #596b80;
	font-size: 14px;
	line-height: 1.8;
}

@media (max-width: 700px) {
	.hik-certificate {
		padding: 0 14px;
	}

	.hik-certificate .certificate-card {
		padding: 20px 18px;
	}
}