/**
 * Product-page pincode checker widget styles.
 *
 * @package PCMAW
 * @since   1.0.0
 */

/* =========================================================================
   Widget wrapper
========================================================================= */

.pcmaw-checker {
	margin: 16px 0 20px;
	padding: 16px 18px 14px;
	border: 1px solid #e2e4e7;
	border-radius: 5px;
	background: #fafbfc;
	box-sizing: border-box;
}

/* =========================================================================
   Header row
========================================================================= */

.pcmaw-checker__header {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 12px;
}

.pcmaw-checker__icon {
	display: block;
	color: #555;
	opacity: 0.65;
	flex-shrink: 0;
}

.pcmaw-checker__title {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: #444;
}

/* =========================================================================
   Input row
========================================================================= */

.pcmaw-checker__row {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.pcmaw-checker__input {
	flex: 1;
	min-width: 0;
	height: 44px;
	padding: 0 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1rem;
	font-family: inherit;
	background: #fff;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s ease;
}

.pcmaw-checker__input:focus {
	outline: none;
	border-color: #444;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.pcmaw-checker__input::placeholder {
	color: #aaa;
}

.pcmaw-checker__btn.button.alt {
	height: 44px;
	padding: 0 22px;
	font-size: 0.88rem;
	letter-spacing: 0.04em;
	white-space: nowrap;
	cursor: pointer;
	font-family: inherit;
	transition: opacity 0.15s ease;
}

.pcmaw-checker__btn.button.alt:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* =========================================================================
   Message area
========================================================================= */

.pcmaw-checker__message {
	min-height: 16px;
	margin-top: 10px;
	font-size: 0.85rem;
	line-height: 1.4;
	display: flex;
	align-items: flex-start;
	gap: 6px;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.pcmaw-checker__message:not(:empty) {
	padding: 8px 12px;
}

.pcmaw-checker__message svg {
	flex-shrink: 0;
	margin-top: 1px;
}

/* Status variants */
.pcmaw-checker__message--available {
	color: #155724;
	background: #d4edda;
	border: 1px solid #c3e6cb;
}

.pcmaw-checker__message--unavailable {
	color: #721c24;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
}

.pcmaw-checker__message--invalid {
	color: #856404;
	background: #fff3cd;
	border: 1px solid #ffeeba;
}

.pcmaw-checker__message--checking {
	color: #555;
}

/* =========================================================================
   Spinner
========================================================================= */

.pcmaw-spinner {
	display: inline-block;
	width: 13px;
	height: 13px;
	border: 2px solid #ccc;
	border-top-color: #666;
	border-radius: 50%;
	animation: pcmaw-spin 0.65s linear infinite;
	flex-shrink: 0;
}

@keyframes pcmaw-spin {
	to {
		transform: rotate(360deg);
	}
}

/* =========================================================================
   Responsive
========================================================================= */

@media (max-width: 480px) {
	.pcmaw-checker__row {
		flex-direction: column;
	}

	.pcmaw-checker__btn.button.alt {
		width: 100%;
		height: 46px;
	}
}

/* =========================================================================
   Shipping cost badge in product checker (v1.1.0)
========================================================================= */

.pcmaw-cost-badge {
	display: inline-block;
	background: rgba(21, 87, 36, 0.12);
	color: #155724;
	border-radius: 3px;
	padding: 1px 7px;
	font-size: 0.8rem;
	font-weight: 600;
	margin-left: 6px;
	white-space: nowrap;
}

.pcmaw-cost-free {
	background: rgba(0, 123, 255, 0.1);
	color: #004085;
}
