/* Frontend styles for CareConnect Postcode Checker */
.ccpc-postcode-checker {
	position: relative;
	display: inline-block;
}

/* Desktop default styles - inline friendly */
.ccpc-form-group {
	display: flex;
	margin: 0;
	position: relative;
	background: rgba(0, 0, 0, 0.5);
	border-radius: 4rem;
}

.ccpc-postcode-input {
	padding: 8px 12px;
	border: 0px;
	border-radius: 4px 0 0 4px;
	transition: all 0.3s ease;
	min-width: 200px;
	background: transparent;
}
.ccpc-postcode-input::placeholder {
    color: white;
}

.ccpc-submit-button {
	padding: 8px 12px;
	color: #fff;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	min-width: 40px;
	background: transparent;
}

.ccpc-submit-button:hover {
	background: #005c8a;
}

/* Dropdown panel for mobile */
.ccpc-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	padding: 15px;
	min-width: 280px;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ccpc-dropdown.show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	width: calc(100vw - 20px);
	left: 0;
	position: fixed;
	top: 104px;
	margin-left: 10px;
	margin-right: 10px;
}

.ccpc-dropdown::before {
	content: '';
	position: absolute;
	top: -8px;
	right: 20px;
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-bottom: 8px solid #fff;
}

.ccpc-dropdown::after {
	content: '';
	position: absolute;
	top: -9px;
	right: 20px;
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-bottom: 8px solid #ddd;
}

.ccpc-dropdown .ccpc-form-group {
	margin: 0;
}

.ccpc-dropdown .ccpc-postcode-input {
	min-width: auto;
	width: 100%;
	border-radius: 6px 0 0 6px;
	border: 2px solid #0073aa;
	padding: 10px 12px;
	font-size: 16px;
	color: white !important;
}
input.ccpc-postcode-input {
	color: white !important;
}
.ccpc-dropdown .ccpc-postcode-input:focus {
	outline: none;
	border-color: #005c8a;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.ccpc-dropdown .ccpc-submit-button {
	border-radius: 0 4rem 4rem 0;
	padding: 10px 15px;
	font-size: 16px;
	min-width: 50px;
	background: linear-gradient(135deg, #0073aa, #005c8a);
}

.ccpc-result {
/* 	margin-top: 10px;
	padding: 8px 0; */
	text-align: center;
}
@media (max-width: 768px) {
	.ccpc-result {
		margin: 0;
		padding: 0;
	}
	.header_wrap .header-top.fullcol.bg-burgundy.color-white.clearfix {
		z-index: 1111 !important;
	}
}

.ccpc-error {
	color: #d63638;
}

.ccpc-success {
	color: #00a32a;
}

/* Mobile styles - apply to screens 768px and below */
@media (max-width: 768px) {
	.ccpc-postcode-checker {
		position: relative;
	}

	/* Hide desktop form on mobile */
	.ccpc-form-group:not(.ccpc-dropdown .ccpc-form-group) {
		display: none;
	}

	/* Show mobile trigger button */
	.ccpc-mobile-trigger {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		width: 34px;
		height: 34px;
		background: transparent;
		color: #db932c;
		border: 1px solid #db932c;
		border-radius: 50%;
		cursor: pointer;
		font-size: 16px;
		transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		position: relative;
		overflow: hidden;
		top: 1px;
		margin-left: 1rem;
	}

	.ccpc-mobile-trigger::before {
		content: '';
		position: absolute;
		top: 50%;
		left: 50%;
		width: 0;
		height: 0;
		background: rgba(255, 255, 255, 0.2);
		border-radius: 50%;
		transform: translate(-50%, -50%);
		transition: all 0.3s ease;
	}

	.ccpc-mobile-trigger:hover::before,
	.ccpc-mobile-trigger:active::before {
		width: 100%;
		height: 100%;
	}

	.ccpc-mobile-trigger:active {
		transform: scale(0.95);
	}

	/*     .ccpc-mobile-trigger.active {
	background: linear-gradient(135deg, #005c8a, #004a6b);
	box-shadow: 0 4px 12px rgba(0, 115, 170, 0.4);
}

	/* Pulse animation for mobile trigger */
	/*     .ccpc-mobile-trigger {
	animation: mobilePulse 3s infinite;
} */

	.ccpc-mobile-trigger.active {
		animation: none;
	}

	@keyframes mobilePulse {
		0%, 100% {
			box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
		}
		50% {
			box-shadow: 0 2px 16px rgba(0, 115, 170, 0.5);
		}
	}

	/* Adjust dropdown for mobile */
	.ccpc-dropdown {
		right: 0;
		min-width: 300px;
		padding: 20px;
	}

	.ccpc-dropdown::before {
		right: 18px;
	}

	.ccpc-dropdown::after {
		right: 18px;
	}
}

/* Desktop - hide mobile trigger */
@media (min-width: 769px) {
	.ccpc-mobile-trigger {
		display: none !important;
	}

	.ccpc-dropdown {
		display: none !important;
	}
}

/* Extra small mobile devices */
@media (max-width: 480px) {
	.ccpc-dropdown {
		right: -10px;
		left: -10px;
		min-width: auto;
		margin: 0 10px;
	}

	.ccpc-dropdown::before,
	.ccpc-dropdown::after {
		left: 170px;
	}
}

/* Header integration styles */
.ccpc-postcode-checker {
	vertical-align: middle;
}

/* Ensure dropdown appears above other header elements */
.ccpc-dropdown {
	z-index: 999999;
}

/* Overlay for mobile to close dropdown when clicking outside */
.ccpc-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: transparent;
	z-index: 9998;
	display: none;
}

.ccpc-overlay.show {
	display: block;
}