/* Styled to match the checkout form; GLS map itself retains official styling. */
.tdfm-gls-block-picker {
    box-sizing: border-box;
    margin: 16px 0 22px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #d7dce3;
    border-radius: 5px;
    color: inherit;
    font: inherit;
}
.tdfm-gls-block-picker *, .tdfm-gls-block-picker *::before, .tdfm-gls-block-picker *::after { box-sizing: border-box; }
.tdfm-gls-block-picker .tdfm-gls-title {
    font-size: 1.13rem;
    line-height: 1.35;
    margin: 0 0 6px;
    padding: 0;
    font-weight: 650;
    color: inherit;
}
.tdfm-gls-block-picker .tdfm-gls-hint { font-size: .94rem; line-height: 1.5; margin: 0 0 12px; }
.tdfm-gls-block-picker .tdfm-gls-unselected { font-size: .94rem; margin: 12px 0; color: #945b1c; }
.tdfm-gls-block-picker .tdfm-gls-selected {
    display: flex; flex-direction: column; gap: 4px;
    border: 1px solid #b6d9bf; background: #f7fbf8;
    padding: 12px 14px; border-radius: 4px; margin: 12px 0;
    font-size: .94rem; line-height: 1.5;
}
.tdfm-gls-block-picker .tdfm-gls-selected-head { color: #27683c; font-size: .88rem; font-weight: 600; }
.tdfm-gls-block-picker .tdfm-gls-selected strong { font-weight: 700; }
.tdfm-gls-block-picker .tdfm-gls-selected small { font-size: .8rem; color: #5a656f; }
.tdfm-gls-block-picker .tdfm-gls-address {
    display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center;
    background: #f7f8fa; border-radius: 4px; padding: 10px 12px;
    font-size: .88rem; margin: 10px 0 14px;
}
.tdfm-gls-block-picker .tdfm-gls-address-label { color: #58616c; }
.tdfm-gls-block-picker .tdfm-gls-address-value { overflow-wrap: anywhere; font-weight: 600; }
.tdfm-gls-block-picker .tdfm-gls-copy {
    border: none; border-radius: 3px; background: transparent; color: #134a91;
    padding: 4px 6px; font-size: .86rem; text-decoration: underline; cursor: pointer;
}
.tdfm-gls-block-picker .tdfm-gls-button {
    display: inline-flex; min-height: 42px; max-width: 100%;
    justify-content: center; align-items: center; white-space: normal;
    padding: 11px 18px; margin: 0; border: 1px solid #323a42;
    border-radius: 4px; background: #323a42; color: white;
    font: inherit; font-size: .94rem; font-weight: 600; line-height: 1.3;
    text-decoration: none; cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.tdfm-gls-block-picker .tdfm-gls-button:hover,
.tdfm-gls-block-picker .tdfm-gls-button:focus-visible { background: #20272d; border-color: #20272d; color: white; }
.tdfm-gls-block-picker .tdfm-gls-button:focus-visible,
.tdfm-gls-block-picker .tdfm-gls-copy:focus-visible { outline: 2px solid #1d60a5; outline-offset: 3px; }
.tdfm-gls-block-picker .tdfm-gls-error { color: #a00000; margin: 10px 0 0; font-size: .88rem; }
gls-dpm-dialog { z-index: 999999; }
@media (max-width: 600px) {
    .tdfm-gls-block-picker { padding: 14px 12px; }
    .tdfm-gls-block-picker .tdfm-gls-button { width: 100%; }
}

/* Express checkout is re-ordered in the server-rendered block template,
   before WooCommerce mounts its payment controls. No live DOM relocation. */
.tdfm-express-after-shipping > .wp-block-woocommerce-checkout-express-payment-block {
    margin-top: 20px;
    margin-bottom: 12px;
}
.tdfm-express-after-shipping > .wp-block-woocommerce-checkout-express-payment-block::before {
    content: "Zahlungsoptionen";
    display: block;
    font-size: 1.20rem;
    font-weight: 650;
    line-height: 1.5;
    margin: 0 0 14px;
}
/* Keep the heading in the semantic checkout form, but avoid two headings. */
.tdfm-express-after-shipping > .wp-block-woocommerce-checkout-payment-block .wc-block-components-title {
    position: absolute !important;
    width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important;
    overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important; border: 0 !important;
}

/* Official GLS delivery points from the postcode/city suggestion API. */
.tdfm-gls-nearby { margin: 13px 0 17px; }
.tdfm-gls-nearby h4 { margin: 0 0 5px; font-size: .98rem; font-weight: 650; }
.tdfm-gls-nearby-info { font-size: .85rem; line-height: 1.4; color: #596574; margin: 5px 0 10px; }
.tdfm-gls-nearby-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); gap: 9px; }
.tdfm-gls-nearby-option { text-align: left; display: flex; flex-direction: column; gap: 3px;
    border: 1px solid #cbd2dc; border-radius: 4px; color: inherit; background: white;
    font: inherit; font-size: .85rem; line-height: 1.4; padding: 11px 13px; cursor: pointer;
}
.tdfm-gls-nearby-option strong { font-size: .89rem; font-weight: 650; }
.tdfm-gls-nearby-choose { color: #134a91; font-size: .82rem; text-decoration: underline; margin-top: 5px; }
.tdfm-gls-nearby-option:hover, .tdfm-gls-nearby-option:focus-visible { border-color: #295b91; background: #f7faff; }
.tdfm-gls-nearby-option:focus-visible { outline: 2px solid #295b91; outline-offset: 2px; }
.tdfm-gls-nearby-option:disabled { opacity: .6; cursor: wait; }
/* v0.5.15: distance information appears only after explicit position access. */
.tdfm-gls-distance { color: #455a6d; font-size: .82rem; font-weight: 600; }
.tdfm-gls-geolocation { margin: 9px 0 12px; }
.tdfm-gls-geolocation .tdfm-gls-copy { padding-left: 0; }
.tdfm-gls-geolocation .tdfm-gls-copy:disabled { opacity: .65; cursor: wait; }
