/**
 * Free COD OTP Verification - shared checkout styles.
 *
 * Visibility is controlled purely via these two classes - never inline
 * styles, never slideUp()/slideDown() - so both the Classic (jQuery) and
 * Blocks (React) checkout flows behave predictably.
 */

.fcodotp-hidden {
	/* !important is deliberate here: this is a utility class that must
	   always win, regardless of where other component rules (e.g.
	   .fcodotp-field-row / .fcodotp-verified-summary, both display: flex)
	   happen to sit in this file. Without it, equal-specificity rules
	   defined later in the stylesheet win the cascade tie-break by source
	   order alone, silently showing elements that JS correctly marked
	   hidden. */
	display: none !important;
}

.fcodotp-visible {
	display: block;
}

/* ---------- Shared wrapper look & feel ---------- */

#fcodotp-otp-wrapper,
.fcodotp-blocks-wrapper {
	margin: 16px 0;
	padding: 16px 18px;
	border: 1px solid #d8dce1;
	border-radius: 6px;
	background: #f9fafb;
}

#fcodotp-otp-wrapper h3,
.fcodotp-blocks-title {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 600;
}

.fcodotp-intro {
	margin: 0 0 12px;
	font-size: 13px;
	color: #4b5563;
}

/* ---------- Field rows ---------- */

.fcodotp-field-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-bottom: 10px;
}

.fcodotp-field-row input[type="email"],
.fcodotp-field-row input[type="tel"],
.fcodotp-field-row input[type="text"] {
	flex: 1 1 200px;
	min-width: 160px;
	padding: 8px 10px;
	border: 1px solid #c7ccd1;
	border-radius: 4px;
	font-size: 14px;
}

.fcodotp-field-row button {
	white-space: nowrap;
	cursor: pointer;
}

.fcodotp-field-row button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.fcodotp-otp-row input[type="text"] {
	max-width: 140px;
	letter-spacing: 2px;
}

/* ---------- Verified summary state ---------- */

.fcodotp-verified-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: #eaf6ec;
	border: 1px solid #b7dfbc;
	border-radius: 4px;
	font-size: 13px;
}

.fcodotp-verified-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #1e7e34;
	font-weight: 600;
}

.fcodotp-verified-summary #fcodotp_verified_identifier_display {
	color: #33403a;
}

.fcodotp-verified-summary #fcodotp_change_identifier_btn {
	margin-left: auto;
	background: none;
	border: none;
	padding: 0;
	color: #2271b1;
	text-decoration: underline;
	font-size: 12px;
	cursor: pointer;
}

.fcodotp-verified-summary #fcodotp_change_identifier_btn:hover {
	color: #135e96;
}

/* ---------- Messages ---------- */

.fcodotp-message {
	margin: 8px 0 0;
	font-size: 13px;
	min-height: 1em;
}

.fcodotp-msg-success {
	color: #1e7e34;
	font-weight: 500;
}

.fcodotp-msg-error {
	color: #c62828;
	font-weight: 500;
}

/* ---------- Resend link ---------- */

#fcodotp_resend_otp_btn,
.fcodotp-blocks-wrapper .button-link {
	background: none;
	border: none;
	padding: 0;
	color: #2271b1;
	text-decoration: underline;
	font-size: 13px;
	cursor: pointer;
}

#fcodotp_resend_otp_btn:hover,
.fcodotp-blocks-wrapper .button-link:hover {
	color: #135e96;
}

/* ---------- Blocks-specific button alignment ---------- */

.fcodotp-blocks-wrapper .wc-block-components-button {
	min-height: 40px;
}

@media ( max-width: 480px ) {
	.fcodotp-field-row {
		flex-direction: column;
		align-items: stretch;
	}

	.fcodotp-field-row input,
	.fcodotp-field-row button {
		width: 100%;
	}
}
