/*
 * WooCommerce のカート・決済・注文完了の画面を ANFANG Design System v2 の色にそろえる。
 * 読み込むのは is_cart() / is_checkout() の画面だけ（includes/woo.php）。
 *
 * 元の見た目は「追加CSS」（外観 → カスタマイズ・post 76）の 10章・12章が作っていて、色は直書き（#1d1d1d・#252527 など）。
 * 追加CSS はこのファイルより後に読まれるので、どの指定も「html body.anfang-woo」を頭に付けて優先度を1段上げている。
 * 🔴 色・枠・角丸だけ。並び・余白・項目・ボタンの働きは追加CSS と WooCommerce のまま。
 *    Stripe のカード入力欄（iframe の中）は触らない（白いカードのまま）。
 */

/* ---- 0. 地の色・文字 ---- */
html body.anfang-woo,
html body.anfang-woo.ast-separate-container,
html body.anfang-woo #page,
html body.anfang-woo .site-content {
	background-color: #0D0D0E;
}
html body.anfang-woo {
	color: #C9C9CC;
	font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
	/* 追加CSS の旧トークン（v1）も、この画面の中だけ v2 の値に */
	--anf-bg: #0D0D0E;
	--anf-bg-panel: #17171A;
	--anf-bg-card: #17171A;
	--anf-bg-hover: #1D1D1F;
	--anf-bg-active: #232326;
	--anf-accent-hover: #5BB5FF;
	--anf-text: #C9C9CC;
	--anf-text-strong: #F5F4F1;
	--anf-text-dim: #8A8A8E;
	--anf-text-faint: #68686C;
	--anf-border: #2A2A2D;
	--anf-border-weak: rgba(255, 255, 255, 0.06);
	/* Astra の罫線（表・ご注文欄・見出しの下線）はこの変数。#ddd → border */
	--ast-border-color: #2A2A2D;
}
/* 追加CSS 12-1・12-4：スマホ幅で背景を #1d1d1d にしている */
@media (max-width: 544px) {
	html body.anfang-woo,
	html body.anfang-woo.ast-separate-container {
		background-color: #0D0D0E;
	}
}
/* 追加CSS 12-1 の「フッターを画面下に」を、共通フッターでも効かせる */
html body.anfang-woo.woocommerce-cart .as-footer {
	margin-top: auto;
}

html body.anfang-woo h1.entry-title,
html body.anfang-woo #order_review_heading,
html body.anfang-woo #customer_details h3,
html body.anfang-woo .cart_totals > h2 {
	color: #F5F4F1;
}

/* ---- 1. 面（旧 #252527 → bg-surface #17171A・枠 #2A2A2D） ---- */
html body.anfang-woo .woocommerce-info,
html body.anfang-woo.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info,
html body.anfang-woo.woocommerce-checkout .woocommerce-form-login-toggle .woocommerce-info,
html body.anfang-woo.woocommerce-checkout form.woocommerce-form-login,
html body.anfang-woo.woocommerce-cart .woocommerce-message,
html body.anfang-woo.woocommerce-cart .cart-empty.woocommerce-info,
html body.anfang-woo.woocommerce-cart .woocommerce-error,
html body.anfang-woo.woocommerce-order-received .woocommerce-notice--success,
html body.anfang-woo.woocommerce-order-received ul.woocommerce-order-overview,
html body.anfang-woo.woocommerce-order-received .woocommerce-bacs-bank-details {
	background-color: #17171A;
	border-color: #2A2A2D;
	color: #C9C9CC;
}
html body.anfang-woo.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info,
html body.anfang-woo.woocommerce-checkout .woocommerce-form-login-toggle .woocommerce-info,
html body.anfang-woo.woocommerce-order-received .woocommerce-notice--success {
	color: #F5F4F1;
}
/* 赤い線は使わない（デザインシステム 1-2「警告色も使わない」）→ アクセントの青 */
html body.anfang-woo.woocommerce-cart .woocommerce-error {
	border-left-color: #3AA6FF;
}

/* 表の見出し行・カート合計の見出し */
html body.anfang-woo.woocommerce-cart table.shop_table thead th,
html body.anfang-woo.woocommerce-cart table.shop_table td.actions,
html body.anfang-woo.woocommerce-cart .cart-collaterals .cart_totals > h2,
html body.anfang-woo.woocommerce-order-received table.order_details thead th {
	background-color: #17171A;
}

/* ---- 2. 決済：「ご注文」欄（Astra の 2px の白っぽい枠 → 1枚のカード） ---- */
/* Astra は form #order_review:not(... #order_review) で ID 2つ分の強さ → #page を足して上回る */
html body.anfang-woo.woocommerce-page.woocommerce-checkout #page form #order_review_heading,
html body.anfang-woo.woocommerce-page.woocommerce-checkout #page form #order_review {
	background-color: #17171A;
	border: 1px solid #2A2A2D;
}
html body.anfang-woo.woocommerce-page.woocommerce-checkout #page form #order_review_heading {
	border-bottom: 0;
	border-radius: 10px 10px 0 0;
}
html body.anfang-woo.woocommerce-page.woocommerce-checkout #page form #order_review {
	border-top: 0;
	border-radius: 0 0 10px 10px;
}

/* 表の罫線（Astra・WooCommerce の明るい灰色 → #2A2A2D） */
html body.anfang-woo.woocommerce-page table.shop_table,
html body.anfang-woo.woocommerce-page table.shop_table th,
html body.anfang-woo.woocommerce-page table.shop_table td,
html body.anfang-woo.woocommerce-page table.shop_table tbody th,
html body.anfang-woo.woocommerce-page table.shop_table tfoot th,
html body.anfang-woo.woocommerce-page table.shop_table tfoot td,
html body.anfang-woo.woocommerce-page .cart-collaterals .cart_totals,
html body.anfang-woo.woocommerce-order-received .woocommerce-customer-details address {
	border-color: #2A2A2D;
}
html body.anfang-woo.woocommerce-checkout .woocommerce-checkout-review-order-table th,
html body.anfang-woo.woocommerce-cart table.shop_table thead th,
html body.anfang-woo.woocommerce-cart .cart_totals th {
	color: #8A8A8E;
}
html body.anfang-woo.woocommerce-checkout .woocommerce-checkout-review-order-table td,
html body.anfang-woo.woocommerce-checkout .woocommerce-checkout-review-order-table .product-name,
html body.anfang-woo.woocommerce-checkout .woocommerce-checkout-review-order-table .amount,
html body.anfang-woo.woocommerce-cart table.shop_table tbody td,
html body.anfang-woo.woocommerce-cart table.shop_table .amount,
html body.anfang-woo.woocommerce-cart .cart_totals td,
html body.anfang-woo.woocommerce-cart .cart_totals .amount {
	color: #C9C9CC;
}
html body.anfang-woo.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total th,
html body.anfang-woo.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total td,
html body.anfang-woo.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total .amount,
html body.anfang-woo.woocommerce-cart .cart_totals .order-total th,
html body.anfang-woo.woocommerce-cart .cart_totals .order-total td,
html body.anfang-woo.woocommerce-cart .cart_totals .order-total .amount {
	color: #F5F4F1;
}

/* 支払い方法：選んだ方の説明欄（WooCommerce の明るい灰色 #efefef → bg-surface-2）。中の Stripe のカード欄は触らない */
html body.anfang-woo.woocommerce-checkout #payment {
	background: transparent;
}
html body.anfang-woo.woocommerce-checkout #payment div.payment_box {
	background-color: #1D1D1F;
	border: 1px solid #2A2A2D;
	border-radius: 6px;
	color: #C9C9CC;
}
html body.anfang-woo.woocommerce-checkout #payment div.payment_box::before {
	border-bottom-color: #1D1D1F;
}
html body.anfang-woo.woocommerce-checkout #payment div.payment_box fieldset,
html body.anfang-woo.woocommerce-checkout #payment ul.payment_methods {
	border-color: #2A2A2D;
}
html body.anfang-woo.woocommerce-checkout #payment ul.payment_methods > li > label,
html body.anfang-woo.woocommerce-checkout #payment ul.payment_methods > li > label * {
	color: #F5F4F1;
}

/* ---- 3. 入力欄（請求先・クーポン・ログイン） ---- */
html body.anfang-woo.woocommerce-checkout #customer_details .form-row label,
html body.anfang-woo.woocommerce-checkout form.woocommerce-form-login label,
html body.anfang-woo.woocommerce-checkout form.woocommerce-verify-email label {
	color: #C9C9CC;
}
html body.anfang-woo.woocommerce-checkout #customer_details .required,
html body.anfang-woo.woocommerce-checkout form.woocommerce-form-login .required,
html body.anfang-woo.woocommerce-checkout form.woocommerce-verify-email .required {
	color: #3AA6FF;
}
html body.anfang-woo.woocommerce-checkout #customer_details input.input-text,
html body.anfang-woo.woocommerce-checkout #customer_details select,
html body.anfang-woo.woocommerce-checkout #customer_details textarea,
html body.anfang-woo.woocommerce-checkout #customer_details .select2-container .select2-selection--single,
html body.anfang-woo.woocommerce-checkout form.checkout_coupon input#coupon_code,
html body.anfang-woo.woocommerce-checkout form.woocommerce-verify-email input.input-text {
	background-color: #17171A;
	border: 1px solid #2A2A2D;
	border-radius: 4px;
	color: #F5F4F1;
}
/* カードの上に乗る入力欄は、地の色にして浮かせる */
html body.anfang-woo.woocommerce-checkout form.woocommerce-form-login input.input-text,
html body.anfang-woo.woocommerce-cart table.shop_table .coupon input.input-text {
	background-color: #0D0D0E;
	border: 1px solid #2A2A2D;
	border-radius: 4px;
	color: #F5F4F1;
}
html body.anfang-woo.woocommerce-checkout #customer_details .select2-selection__rendered {
	color: #F5F4F1;
}
html body.anfang-woo.woocommerce-checkout #customer_details input.input-text:focus,
html body.anfang-woo.woocommerce-checkout #customer_details select:focus,
html body.anfang-woo.woocommerce-checkout form.checkout_coupon input#coupon_code:focus,
html body.anfang-woo.woocommerce-checkout form.woocommerce-form-login input.input-text:focus,
html body.anfang-woo.woocommerce-checkout form.woocommerce-verify-email input.input-text:focus,
html body.anfang-woo.woocommerce-cart table.shop_table .coupon input.input-text:focus {
	border-color: #3AA6FF;
}
html body.anfang-woo input.input-text::placeholder,
html body.anfang-woo.woocommerce-checkout form.checkout_coupon input#coupon_code::placeholder {
	color: #8A8A8E;
}
/* 国・地域の選択肢（開いたときの一覧） */
html body.anfang-woo .select2-dropdown {
	background-color: #17171A;
	border-color: #2A2A2D;
	color: #C9C9CC;
}
html body.anfang-woo .select2-search--dropdown .select2-search__field {
	background-color: #0D0D0E;
	border-color: #2A2A2D;
	color: #F5F4F1;
}
/* チェックボックス・ラジオ（白い四角 → 暗い四角・チェックは青） */
html body.anfang-woo.woocommerce-checkout input[type="checkbox"],
html body.anfang-woo.woocommerce-checkout input[type="radio"] {
	accent-color: #3AA6FF;
	color-scheme: dark;
}
html body.anfang-woo.woocommerce-checkout form .show-password-input {
	color: #8A8A8E;
}
html body.anfang-woo.woocommerce-checkout .woocommerce-billing-fields > h3,
html body.anfang-woo.woocommerce-checkout #customer_details h3 {
	border-color: #2A2A2D;
}

/* ---- 4. ボタン：青の上の文字は #0A1622・hover は #5BB5FF（デザインシステム 5章） ---- */
html body.anfang-woo.woocommerce-checkout #place_order,
html body.anfang-woo.woocommerce-checkout #place_order:active,
html body.anfang-woo.woocommerce-checkout .woocommerce-message .button,
html body.anfang-woo.woocommerce-checkout .woocommerce-error .button,
html body.anfang-woo.woocommerce-checkout form.checkout_coupon button[name="apply_coupon"],
html body.anfang-woo.woocommerce-checkout form.woocommerce-form-login .woocommerce-form-login__submit,
html body.anfang-woo.woocommerce-checkout form.woocommerce-verify-email button.button,
html body.anfang-woo.woocommerce-cart table.shop_table .coupon button,
html body.anfang-woo.woocommerce-cart .wc-proceed-to-checkout .checkout-button,
html body.anfang-woo.woocommerce-cart .return-to-shop .button {
	color: #0A1622;
	background-color: #3AA6FF;
	border-color: #3AA6FF;
	border-radius: 6px;
	font-weight: 600;
}
html body.anfang-woo.woocommerce-checkout #place_order:hover,
html body.anfang-woo.woocommerce-checkout #place_order:focus,
html body.anfang-woo.woocommerce-checkout form.checkout_coupon button[name="apply_coupon"]:hover,
html body.anfang-woo.woocommerce-checkout form.woocommerce-form-login .woocommerce-form-login__submit:hover,
html body.anfang-woo.woocommerce-checkout form.woocommerce-form-login .woocommerce-form-login__submit:focus,
html body.anfang-woo.woocommerce-checkout form.woocommerce-verify-email button.button:hover,
html body.anfang-woo.woocommerce-checkout form.woocommerce-verify-email button.button:focus,
html body.anfang-woo.woocommerce-cart table.shop_table .coupon button:hover,
html body.anfang-woo.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover,
html body.anfang-woo.woocommerce-cart .return-to-shop .button:hover,
html body.anfang-woo.woocommerce-cart .return-to-shop .button:focus {
	color: #0A1622;
	background-color: #5BB5FF;
	border-color: #5BB5FF;
}
/* 主役の「注文する」はデザインシステムのボタンの高さ（52px） */
html body.anfang-woo.woocommerce-checkout #place_order {
	min-height: 52px;
}

/* ---- 5. 注文完了 ---- */
html body.anfang-woo.woocommerce-order-received ul.woocommerce-order-overview li,
html body.anfang-woo.woocommerce-order-received ul.wc-bacs-bank-details li {
	color: #8A8A8E;
}
html body.anfang-woo.woocommerce-order-received ul.woocommerce-order-overview li strong,
html body.anfang-woo.woocommerce-order-received ul.wc-bacs-bank-details li strong,
html body.anfang-woo.woocommerce-order-received table.order_details tfoot tr:last-child th,
html body.anfang-woo.woocommerce-order-received table.order_details tfoot tr:last-child td {
	color: #F5F4F1;
}
html body.anfang-woo.woocommerce-order-received .woocommerce-bacs-bank-details > p,
html body.anfang-woo.woocommerce-order-received table.order_details tbody td,
html body.anfang-woo.woocommerce-order-received .woocommerce-customer-details address,
html body.anfang-woo.woocommerce-order-received .woocommerce-customer-details address p {
	color: #C9C9CC;
}

html body.anfang-woo :focus-visible {
	outline: 2px solid #3AA6FF;
	outline-offset: 3px;
}
