/* Custom checkout — PHASE 1 structure. Brand vars from header.css :root.
   Minimal/clean for now; visual polish comes in a later phase. */

/* Section headings (rendered as bk_heading custom fields, wrapped in a .form-row so
   the field-editor keeps them in place). The .form-row wrapper carries no styling;
   the inner .bk-co-heading span is the visible heading. */
.bk-co-heading-row, .bk-co-note-row { clear: both; width: 100%; margin: 0; padding: 0; }
.bk-co-heading {
	display: block;
	margin: 24px 0 14px;
	padding-top: 18px;
	border-top: 1px solid var(--bk-line, #e5e7eb);
	font-family: var(--bk-font-display, Georgia, serif);
	font-weight: 600;
	font-size: 20px;
	color: var(--bk-ink, #1f2937);
}
.woocommerce-billing-fields__field-wrapper > .bk-co-heading-row:first-child .bk-co-heading { border-top: 0; padding-top: 0; margin-top: 0; }

/* Contact-help note near the top of the recipient block. */
.bk-co-note {
	display: block;
	margin: 0 0 16px;
	padding: 11px 14px;
	background: var(--bk-bg-soft, #f5f7f2);
	border: 1px solid var(--bk-line, #e5e7eb);
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--bk-muted, #6b7280);
}
.bk-co-note strong { color: var(--bk-ink, #1f2937); }
.bk-co-note a { color: var(--bk-green, #4a7c39); text-decoration: none; font-weight: 600; }
.bk-co-note a:hover { text-decoration: underline; }

/* Country field kept for processing but hidden. */
.bk-hidden { display: none !important; }

/* "Картичка" signed/anonymous radio — inline options. */
.bk-card-sig .woocommerce-input-wrapper { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.bk-card-sig label.radio { font-weight: 600; }

/* "Детайли за доставката" box — top-flowers-style grey bordered container with a
   small header label and the date + slot fields stacked full-width inside. */
.bk-delivery-row { clear: both; width: 100%; margin: 0; padding: 0; }
.bk-delivery-box {
	display: block;
	background: var(--bk-bg-soft, #f6f7f8);
	border: 1px solid var(--bk-line, #e5e7eb);
	border-radius: 12px;
	padding: 16px 18px 18px;
}
.bk-delivery-box__head {
	display: block;
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--bk-muted, #6b7280);
}
.bk-delivery-field { display: block; }
.bk-delivery-field + .bk-delivery-field { margin-top: 14px; }
.bk-delivery-field > label { display: block; margin: 0 0 5px; font-size: 14px; font-weight: 600; color: var(--bk-ink, #1f2937); }
.bk-delivery-field input.input-text,
.bk-delivery-field select {
	width: 100%;
	box-sizing: border-box;
	min-height: 46px;
	border: 1px solid var(--bk-line, #e5e7eb);
	border-radius: 8px;
	padding: 10px 14px;
	font: inherit;
	font-size: 15px;
	background: #fff;
}
.bk-delivery-field input[readonly] { cursor: pointer; }

/* Sofia / Econt branches — only the active branch shows. */
.bk-branch { display: none; margin: 18px 0 0; padding: 16px 18px; background: var(--bk-bg-soft, #f6f7f8); border: 1px solid var(--bk-line, #e5e7eb); border-radius: 12px; }
.bk-branch h3 { margin: 0 0 10px; font-size: 17px; color: var(--bk-ink, #1f2937); font-family: var(--bk-font-display, Georgia, serif); }
body.bk-branch-sofia .bk-branch--sofia { display: block; }
body.bk-branch-econt .bk-branch--econt { display: block; }

/* Sofia courier info bullets. */
.bk-branch__list { margin: 0; padding-left: 20px; }
.bk-branch__list li { margin: 5px 0; font-size: 14px; line-height: 1.4; color: var(--bk-ink, #1f2937); }

/* Relocated shipping methods (synced mirror of the real WooCommerce radios) — shown
   INSIDE the active branch box. The real radios remain in #order_review, hidden below. */
.bk-ship-methods { margin: 14px 0 0; display: grid; gap: 8px; }
.bk-ship-method {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 11px 13px;
	border: 1px solid var(--bk-line, #e5e7eb);
	border-radius: 10px;
	background: #fff;
	font-size: 14px;
	font-weight: 600;
	color: var(--bk-ink, #1f2937);
	cursor: pointer;
}
.bk-ship-method.is-selected { border-color: var(--bk-green, #4a7c39); box-shadow: inset 0 0 0 1px var(--bk-green, #4a7c39); }
.bk-ship-method input { margin: 0; flex: 0 0 auto; }
.bk-ship-method__body { flex: 1 1 auto; }
.bk-ship-method__body .woocommerce-Price-amount { font-weight: 700; }
.bk-ship-empty { margin: 14px 0 0; font-size: 14px; color: var(--bk-muted, #6b7280); }

/* Suppress the native order-review "Доставка"/"Shipment" shipping row — the methods are
   shown once, inside the branch box. HIDDEN ONLY: the real radios stay in the DOM and
   bound to WooCommerce so selection, totals and COD keep working. */
.woocommerce-checkout-review-order-table .woocommerce-shipping-totals.shipping { display: none; }

/* Econt branch — manual delivery entry (office/address radio + one text field). */
.bk-econt__hint { margin: 0 0 14px; font-size: 14px; color: var(--bk-muted, #6b7280); }
.bk-econt-method { margin: 0 0 14px; }
.bk-econt-method__label { display: block; margin: 0 0 7px; font-size: 14px; font-weight: 600; color: var(--bk-ink, #1f2937); }
.bk-econt-radio { display: inline-flex; align-items: center; gap: 7px; margin: 0 18px 6px 0; font-size: 14px; font-weight: 600; color: var(--bk-ink, #1f2937); cursor: pointer; }
.bk-econt-radio input { margin: 0; }
.bk-econt-destination { margin: 0; }
.bk-econt-destination > label { display: block; margin: 0 0 5px; font-size: 14px; font-weight: 600; color: var(--bk-ink, #1f2937); }
.bk-econt-destination input.input-text {
	width: 100%;
	box-sizing: border-box;
	min-height: 46px;
	border: 1px solid var(--bk-line, #e5e7eb);
	border-radius: 8px;
	padding: 10px 14px;
	font: inherit;
	font-size: 15px;
	background: #fff;
}

/* ВАЖНО СЪОБЩЕНИЕ modal. */
.bk-modal[hidden] { display: none; }
.bk-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.bk-modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.bk-modal__card { position: relative; z-index: 1; width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; background: #fff; border-radius: 14px; padding: 26px 24px 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.bk-modal__close { position: absolute; top: 8px; right: 12px; border: 0; background: transparent; font-size: 28px; line-height: 1; color: var(--bk-muted, #6b7280); cursor: pointer; }
.bk-modal__title { margin: 0 0 14px; font-size: 20px; font-weight: 700; letter-spacing: .02em; text-align: center; color: var(--bk-rose, #c2185b); }
.bk-modal__body p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--bk-ink, #1f2937); }
.bk-modal__sign { margin-top: 14px !important; font-style: italic; color: var(--bk-muted, #6b7280); }
.bk-modal__ok { display: block; width: 100%; margin-top: 16px; padding: 12px; border: 0; border-radius: 10px; background: var(--bk-green, #4a7c39); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.bk-modal__ok:hover { background: var(--bk-green-dk, #3a612c); }
