/**
 * Insurance Booking Styles for TGBHO Core
 * Primary Brand Color: #2c3581
 *
 * @package TGBHO Core
 */

/* ==========================================================================
   Popup Modal Wrap & Dialog
   ========================================================================== */
.tgbho-modal-wrap {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px 12px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.tgbho-modal-wrap.active {
	display: flex;
	opacity: 1;
	visibility: visible;
}

.tgbho-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(17, 20, 50, 0.7);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.tgbho-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 620px;
	max-height: calc(100vh - 32px);
	background: #ffffff;
	border-radius: 18px;
	box-shadow: 0 25px 50px -12px rgba(28, 34, 82, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 1;
	margin: auto;
	transform: scale(0.95) translateY(10px);
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tgbho-modal-content {
	display: flex;
	flex-direction: column;
	height: 100%;
	max-height: calc(100vh - 32px);
	overflow: hidden;
}

.tgbho-modal-wrap.active .tgbho-modal-dialog {
	transform: scale(1) translateY(0);
}

/* ==========================================================================
   Modal Header & Close Button
   ========================================================================== */
.tgbho-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	background: linear-gradient(135deg, #2c3581 0%, #1c2252 100%);
	color: #ffffff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	flex-shrink: 0;
}

.tgbho-modal-title-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tgbho-modal-icon {
	font-size: 24px !important;
	width: 24px !important;
	height: 24px !important;
	line-height: 24px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	color: #e4e8f8;
	flex-shrink: 0;
	margin: 0 !important;
}

.tgbho-modal-title {
	margin: 0 !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	color: #ffffff !important;
	line-height: 1.3 !important;
}

.tgbho-modal-subtitle {
	margin: 4px 0 0 !important;
	font-size: 13px !important;
	color: #a5b5e7 !important;
	line-height: 1.4 !important;
}

.tgbho-modal-close {
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #ffffff;
	font-size: 24px;
	line-height: 1;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, transform 0.15s;
}

.tgbho-modal-close:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: scale(1.08);
}

/* ==========================================================================
   Modal Body & Scrollable Form
   ========================================================================== */
.tgbho-modal-body {
	padding: 22px 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	flex: 1;
}

.tgbho-modal-body::-webkit-scrollbar,
.tgbho-webform-body::-webkit-scrollbar {
	width: 6px;
}

.tgbho-modal-body::-webkit-scrollbar-track,
.tgbho-webform-body::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 4px;
}

.tgbho-modal-body::-webkit-scrollbar-thumb,
.tgbho-webform-body::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

.tgbho-modal-body::-webkit-scrollbar-thumb:hover,
.tgbho-webform-body::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

/* Agency Selected Banner */
.tgbho-agency-selected-banner {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 10px;
	padding: 10px 14px;
	margin-bottom: 18px;
	color: #166534;
	font-size: 13px;
}

.tgbho-agency-selected-banner .dashicons {
	color: #16a34a;
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.tgbho-banner-label {
	color: #4b5563;
	margin-right: 4px;
}

/* Form Layout & Elements */
.tgbho-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 14px;
}

.tgbho-form-group {
	margin-bottom: 14px;
}

.tgbho-form-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 6px;
}

.tgbho-required {
	color: #dc2626;
}

.tgbho-input-wrap {
	position: relative;
	width: 100%;
	display: flex;
	align-items: center;
}

.tgbho-input-wrap .dashicons {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	font-size: 18px !important;
	width: 18px !important;
	height: 18px !important;
	line-height: 18px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	margin: 0 !important;
	pointer-events: none;
	z-index: 2;
}

.tgbho-form-input,
.tgbho-form-select,
.tgbho-form-textarea {
	width: 100% !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 8px !important;
	background: #ffffff !important;
	color: #1e293b !important;
	font-size: 13.5px !important;
	font-family: inherit !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	transition: border-color 0.2s, box-shadow 0.2s !important;
}

.tgbho-input-wrap .tgbho-form-input,
.tgbho-input-wrap .tgbho-form-select {
	height: 42px !important;
	line-height: 42px !important;
	padding: 0 12px 0 38px !important;
}

.tgbho-form-textarea {
	padding: 10px 12px !important;
	resize: vertical;
	min-height: 70px;
}

.tgbho-form-input:focus,
.tgbho-form-select:focus,
.tgbho-form-textarea:focus {
	border-color: #2c3581 !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(44, 53, 129, 0.18) !important;
}

/* Radio Group */
.tgbho-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.tgbho-radio-item {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 13px;
	color: #475569;
	cursor: pointer;
	transition: all 0.2s;
}

.tgbho-radio-item:has(input:checked) {
	background: #f2f4fc;
	border-color: #2c3581;
	color: #1c2252;
	font-weight: 600;
}

.tgbho-radio-item input {
	margin: 0 !important;
}

/* Form Alert Box */
.tgbho-form-alert {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 13px;
	margin-bottom: 16px;
	line-height: 1.4;
}

.tgbho-alert-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
}

/* Submit Button */
.tgbho-form-actions {
	margin-top: 18px;
}

.tgbho-btn-submit-booking {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient(135deg, #2c3581 0%, #1c2252 100%);
	color: #ffffff !important;
	border: none;
	border-radius: 10px;
	padding: 13px 20px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(44, 53, 129, 0.3);
	transition: all 0.2s ease;
}

.tgbho-btn-submit-booking:hover {
	background: linear-gradient(135deg, #3948a4 0%, #232a67 100%);
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(44, 53, 129, 0.42);
}

.tgbho-btn-submit-booking:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

/* ==========================================================================
   Success State Screen
   ========================================================================== */
.tgbho-booking-success-state {
	text-align: center;
	padding: 24px 10px;
}

.tgbho-success-icon-wrap {
	width: 68px;
	height: 68px;
	background: #dcfce7;
	color: #16a34a;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

.tgbho-success-icon-wrap .dashicons {
	font-size: 40px !important;
	width: 40px !important;
	height: 40px !important;
}

.tgbho-success-title {
	margin: 0 0 8px !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
}

.tgbho-success-desc {
	margin: 0 0 20px !important;
	font-size: 14px !important;
	color: #64748b !important;
	line-height: 1.5 !important;
}

.tgbho-success-code-card {
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 24px;
}

.tgbho-code-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	color: #64748b;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
}

.tgbho-code-value {
	display: block;
	font-family: monospace;
	font-size: 26px;
	font-weight: 800;
	color: #2c3581;
	letter-spacing: 1px;
}

.tgbho-code-hint {
	margin: 6px 0 0 !important;
	font-size: 12px !important;
	color: #94a3b8 !important;
}

.tgbho-btn-finish-modal {
	background: #2c3581;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.tgbho-btn-finish-modal:hover {
	background: #232a67;
}

/* ==========================================================================
   Inline Embeddable Form Wrap
   ========================================================================== */
.tgbho-booking-embed-wrap {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	box-shadow: 0 10px 25px -5px rgba(44, 53, 129, 0.08);
	padding: 30px;
	max-width: 720px;
	margin: 20px auto;
}

.tgbho-embed-header {
	margin-bottom: 24px;
	text-align: center;
}

.tgbho-embed-title {
	margin: 0 0 6px !important;
	font-size: 22px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
}

.tgbho-embed-subtitle {
	margin: 0 !important;
	font-size: 14px !important;
	color: #64748b !important;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 600px) {
	.tgbho-form-grid {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.tgbho-modal-dialog {
		max-height: 95vh;
	}

	.tgbho-modal-header {
		padding: 16px;
	}

	.tgbho-modal-body {
		padding: 16px;
	}

	.tgbho-radio-group {
		flex-direction: column;
	}
}
