/**
 * ZOKZOK Zipcode to Address - スタイル
 * @version 1.1.0
 */

/* ========================================================================
   State/City フィールドのスムーズな更新（フェード効果）
   ======================================================================== */

#shipping-state,
#billing-state,
#shipping-city,
#billing-city,
input[name="shipping_state"],
input[name="billing_state"],
input[name="shipping_city"],
input[name="billing_city"],
select[name*="state"],
select[name*="city"] {
	transition: opacity 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

/* 郵便番号 API 更新中のビジュアル表示 */
.zipcode-updating {
	opacity: 0.7;
	background-color: rgba(255, 255, 200, 0.2);
}

/* ローディング状態 */
input[name*="postcode"].loading {
	position: relative;
	opacity: 0.6;
	pointer-events: none;
}

input[name*="postcode"].loading::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 12px;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid #ccc;
	border-top-color: #333;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

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

/* 郵便番号フィールドのスタイル */
input[name*="postcode"] {
	background-color: #f9f9f9;
	border-color: #ddd;
}

input[name*="postcode"]:focus {
	background-color: #fff;
	border-color: #999;
}

/* 検索ボタンのスタイル */
.zokzok-zipcode-search-btn {
	display: inline-block;
	margin-left: 8px;
	padding: 8px 16px;
	background-color: #007cba;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.2s ease;
}

.zokzok-zipcode-search-btn:hover {
	background-color: #005a87;
}

.zokzok-zipcode-search-btn:disabled {
	background-color: #999;
	cursor: not-allowed;
	opacity: 0.6;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
	.zokzok-zipcode-search-btn {
		margin-left: 4px;
		padding: 6px 12px;
		font-size: 13px;
	}
}

