/* Tudetic Delivery Predict — customer-facing delivery card. */
.tdp-block {
    --tdp-accent: var(--tdc-primary, #2f7d32);
    --tdp-accent-dark: var(--tdc-primary-dark, #225f27);
    --tdp-border: #cfe2cf;
    --tdp-surface: #f4faf4;
    display: grid;
    grid-template-columns: 1.4rem minmax(0, 1fr);
    align-items: start;
    gap: 0.65rem;
    margin: 0.75rem 0;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--tdp-border);
    border-radius: 10px;
    background: var(--tdp-surface);
    font-size: 0.95rem;
    line-height: 1.4;
    color: #1f2937;
}
.tdp-block[hidden],
.tdp-block [hidden] {
    display: none !important;
}
.tdp-block--product::before,
.tdp-block--cart::before {
    content: none !important;
}
.tdp-block--cart {
    --tdp-accent: #2563a6;
    --tdp-accent-dark: #174b7d;
    --tdp-border: #c8dcf2;
    --tdp-surface: #f3f8fe;
    width: 100%;
    max-width: 100%;
}
.tdp-block--pending {
    --tdp-border: #d9dee6;
    --tdp-surface: #f7f8fa;
}
.tdp-block__icon {
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.05rem;
    color: var(--tdp-accent);
    background: currentColor;
    -webkit-mask: no-repeat center / contain;
    mask: no-repeat center / contain;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h11a2 2 0 0 1 2 2v2h2.2c.6 0 1.17.28 1.55.75l1.8 2.25c.29.35.45.8.45 1.25V17h-2.05a3 3 0 0 1-5.9 0h-4.1a3 3 0 0 1-5.9 0H2V6a2 2 0 0 1 1-2Zm14 6v3h3v-.4L17.9 10H17ZM7 15.5A1.5 1.5 0 1 0 7 18.5a1.5 1.5 0 0 0 0-3Zm10 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3ZM4 6v7.4c.7-.56 1.58-.9 2.55-.9h.9c1.57 0 2.94.9 3.61 2.2h3.38V6H4Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h11a2 2 0 0 1 2 2v2h2.2c.6 0 1.17.28 1.55.75l1.8 2.25c.29.35.45.8.45 1.25V17h-2.05a3 3 0 0 1-5.9 0h-4.1a3 3 0 0 1-5.9 0H2V6a2 2 0 0 1 1-2Zm14 6v3h3v-.4L17.9 10H17ZM7 15.5A1.5 1.5 0 1 0 7 18.5a1.5 1.5 0 0 0 0-3Zm10 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3ZM4 6v7.4c.7-.56 1.58-.9 2.55-.9h.9c1.57 0 2.94.9 3.61 2.2h3.38V6H4Z'/%3E%3C/svg%3E");
}
.tdp-block--pending .tdp-block__icon {
    opacity: 0.72;
}
.tdp-block__content {
    min-width: 0;
}
.tdp-block__content p {
    margin: 0;
}
.tdp-block__pending {
    color: #374151;
    font-weight: 650;
}
.tdp-block__headline {
    overflow-wrap: anywhere;
}
.tdp-block__headline [data-tdp-cutoff] {
    display: inline;
}
.tdp-block__route {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin-top: 0.42rem !important;
    padding-top: 0.42rem;
    border-top: 1px solid rgba(31, 41, 55, 0.1);
    color: #4b5563;
    font-size: 0.86rem;
    line-height: 1.35;
}
.tdp-block__route::before {
    content: "";
    flex: 0 0 auto;
    width: 0.42rem;
    height: 0.42rem;
    margin-top: 0.38rem;
    border-radius: 50%;
    background: var(--tdp-accent);
}
.tdp-probability {
    margin-top: 0.7rem;
    padding: 0.78rem;
    border: 1px solid #d8e4d8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(30, 64, 36, 0.06);
}
.tdp-probability__title {
    margin: 0 0 0.62rem !important;
    color: #243b2a;
    font-size: 0.86rem;
    font-weight: 750;
}
.tdp-probability__days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tdp-probability__day {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    min-height: 4.55rem;
    padding: 0.62rem;
    border: 1px solid #e4e9e4;
    border-radius: 10px;
    background: #fafcfa;
    color: #334155;
    font-size: 0.82rem;
}
.tdp-probability__day--primary {
    border-color: color-mix(in srgb, var(--tdp-accent) 48%, white);
    background: color-mix(in srgb, var(--tdp-accent) 8%, white);
    box-shadow: inset 0 3px 0 var(--tdp-accent);
}
.tdp-probability__day--later {
    background: #f8fafc;
    color: #64748b;
}
.tdp-probability__day-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.45rem;
}
.tdp-probability__day-label {
    min-width: 0;
    line-height: 1.22;
}
.tdp-probability__day strong {
    font-size: 1.05rem;
    color: var(--tdp-accent-dark);
    font-variant-numeric: tabular-nums;
}
.tdp-probability__track {
    display: block;
    width: 100%;
    height: 0.36rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e5eae5;
}
.tdp-probability__fill {
    display: block;
    width: var(--tdp-probability, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--tdp-accent), var(--tdp-accent-dark));
}
.tdp-probability__badge {
    align-self: flex-start;
    padding: 0.13rem 0.42rem;
    border-radius: 999px;
    background: var(--tdp-accent);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: 0.01em;
}
.tdp-probability__sample,
.tdp-block__public-note {
    margin-top: 0.52rem !important;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.3;
}
.tdp-probability__context {
    margin-top: 0.4rem !important;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.35;
}
.tdp-block__mixed {
    margin-top: 0.5rem !important;
    padding: 0.48rem 0.58rem;
    border-left: 3px solid #d99a1b;
    border-radius: 0 6px 6px 0;
    background: #fff8e7;
    color: #694c10;
    font-size: 0.84rem;
    line-height: 1.35;
}

/* v2 two-row layout */
.tdp-block--v2 {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: #f4faec;
    border-color: #d8e8b8;
}
.tdp-block--v2 .tdp-block__row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.tdp-block--v2 .material-icons {
    font-size: 18px;
    line-height: 1;
}
.tdp-block--v2 .tdp-block__icon-ok {
    color: var(--tdc-primary, #2f9e44);
}
.tdp-block--v2 .tdp-block__icon-truck {
    color: var(--tdc-primary-dark, #2f7a2f);
}
.tdp-block--v2 .tdp-block__stock-text {
    font-weight: 600;
    color: #1f4d1f;
}
.tdp-block--v2 .tdp-block__eta-text { font-size: 0.92rem; }

/* Legacy class names stay in place because theme integrations target them. */
.tdp-text { color: inherit; }
.tdp-countdown {
    font-variant-numeric: tabular-nums;
    color: #a7381d;
    margin: 0 0.2rem;
    white-space: nowrap;
}
.tdp-eta {
    color: var(--tdp-accent-dark);
    margin-left: 0.2rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.tdp-countdown--expired {
    color: #6b7280;
}
.tdp-order-eta {
    background: #fff8d6;
    border: 1px solid #d6b853;
    padding: 8px 12px;
    margin: 12px 0;
    border-radius: 6px;
    font-size: 1rem;
}
.tdp-order-eta strong { margin: 0 4px; }
.tdp-order-eta__abs { color: #555; font-size: 0.9em; }

@media (max-width: 575.98px) {
    .tdp-block {
        grid-template-columns: 1.25rem minmax(0, 1fr);
        gap: 0.55rem;
        padding: 0.72rem 0.75rem;
        font-size: 0.9rem;
    }
    .tdp-block__icon {
        width: 1.2rem;
        height: 1.2rem;
    }
    .tdp-block__route,
    .tdp-block__mixed {
        font-size: 0.82rem;
    }
    .tdp-probability__days {
        grid-template-columns: 1fr;
    }
    .tdp-probability__day {
        min-height: 0;
    }
}

@media (forced-colors: active) {
    .tdp-block,
    .tdp-block__mixed {
        border: 1px solid CanvasText;
    }
    .tdp-block__icon,
    .tdp-block__route::before {
        background: CanvasText;
    }
}
