/**
 * WC NIP frontend styles.
 *
 * @package WcNip
 */

.wc-nip-field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: 100%;
}

.wc-nip-gus-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	justify-content: flex-end;
}

/* Text link — not a WooCommerce .button */
.wc-nip-gus-button {
	appearance: none;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	display: inline;
	font-family: inherit;
	font-size: 13px;
	font-weight: inherit;
	line-height: inherit;
	margin: 0;
	padding: 0;
	text-align: right;
	text-decoration: none;
	text-transform: uppercase;
}

.wc-nip-gus-button:hover,
.wc-nip-gus-button:focus-visible {
	background: none;
	box-shadow: none;
	text-decoration: underline;
}

.wc-nip-gus-button:disabled {
	cursor: not-allowed;
	opacity: 0.55;
	text-decoration: none;
}

/* Bootstrap 4 alert colors — keep our typography */
.wc-nip-gus-status,
.form-row:has([data-wc-nip-field]) .checkout-inline-error-message,
.form-row:has(.wc-nip-field) .checkout-inline-error-message,
#billing_nip_field .checkout-inline-error-message {
	border: 1px solid transparent;
	border-radius: 0.25rem;
	display: block;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.4;
	margin: 0.5rem 0 0;
	padding: 8px 16px;
	position: relative;
}

.wc-nip-gus-status.is-error,
.form-row:has([data-wc-nip-field]) .checkout-inline-error-message,
.form-row:has(.wc-nip-field) .checkout-inline-error-message,
#billing_nip_field .checkout-inline-error-message {
	background-color: #f8d7da;
	border-color: #f5c6cb;
	color: #721c24;
}

.wc-nip-gus-status.is-success {
	background-color: #d4edda;
	border-color: #c3e6cb;
	color: #155724;
}

.wc-nip-loading input,
.wc-nip-loading .wc-nip-gus-button {
	cursor: wait;
}
