/* Noid Delivery Dates — Frontend v1.2.0 */

.ndd-delivery-widget {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 10px 0 14px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
}

.ndd-delivery-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    flex: 1 1 0;
    min-width: 0;
    text-decoration: none !important;
    color: inherit;
    transition: background 130ms ease;
}

.ndd-delivery-item + .ndd-delivery-item {
    border-left: 1.5px solid rgba(0, 0, 0, 0.09);
}

a.ndd-delivery-item--link {
    cursor: pointer;
    text-decoration: none !important;
    color: inherit;
}
a.ndd-delivery-item--link:hover,
a.ndd-delivery-item--link:focus {
    background: rgba(0, 0, 0, 0.04);
    text-decoration: none !important;
    outline: none;
}
a.ndd-delivery-item--link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.ndd-delivery-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    flex-shrink: 0;
}
.ndd-delivery-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.ndd-delivery-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.ndd-delivery-label {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.ndd-delivery-date {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .ndd-delivery-widget { flex-direction: column; }
    .ndd-delivery-item + .ndd-delivery-item {
        border-left: none;
        border-top: 1.5px solid rgba(0, 0, 0, 0.08);
    }
}

/* Cart row styles removed v1.7.6 */

/* ── Checkout summary ── */
.ndd-checkout-estimates {
    margin: 16px 0 20px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
}
.ndd-checkout-heading {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: none !important;
}
.ndd-checkout-cat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6B7280;
    margin: 10px 0 4px !important;
}
.ndd-checkout-cat-label:first-of-type {
    margin-top: 0 !important;
}
.ndd-checkout-estimates .ndd-delivery-widget {
    font-size: 13px;
}

/* ── Countdown bar (v1.7.0) ── */
.ndd-countdown-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 7px 16px;
    background: rgba(26, 86, 219, 0.07);
    border-bottom: 1px solid rgba(26, 86, 219, 0.12);
    font-size: 12px;
    font-weight: 600;
    color: #1A56DB;
    box-sizing: border-box;
    flex-shrink: 0;
}
.ndd-countdown-icon {
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}
.ndd-countdown-text {
    flex: 1;
    line-height: 1.3;
}
.ndd-countdown-timer {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.ndd-delivery-widget {
    flex-wrap: wrap;
}
/* When countdown bar is present, make it full-width row above panels */
.ndd-countdown-bar + .ndd-delivery-item {
    flex-basis: 0;
}

/* Urgent: ≤ 15 minutes */
.ndd-countdown-bar.ndd-countdown-urgent {
    background: rgba(220, 38, 38, 0.07);
    border-bottom-color: rgba(220, 38, 38, 0.15);
    color: #DC2626;
}

/* Expired state */
.ndd-countdown-bar.ndd-countdown-expired {
    background: rgba(107, 114, 128, 0.07);
    border-bottom-color: rgba(107, 114, 128, 0.12);
    color: #6B7280;
}

/* ── Shipping option dates (v1.7.1) ── */
.ndd-shipping-date {
    display: block;
    margin-top: 4px;
}
.ndd-shipping-date-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 3px 10px 3px 8px !important;
    background: rgba(22, 163, 74, 0.09) !important;
    border: 1px solid rgba(22, 163, 74, 0.25) !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #15803D !important;
    text-decoration: none !important;
    transition: background 130ms, border-color 130ms;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif !important;
    line-height: 1.4 !important;
}
.ndd-shipping-date-link:hover {
    background: rgba(22, 163, 74, 0.16) !important;
    border-color: rgba(22, 163, 74, 0.4) !important;
    color: #15803D !important;
    text-decoration: none !important;
}
/* Non-linked pill */
.ndd-shipping-date > span:not([class]) {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 8px;
    background: rgba(22, 163, 74, 0.09) !important;
    border: 1px solid rgba(22, 163, 74, 0.25) !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #15803D !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif !important;
}
/* Fallback for :not(:has) in older browsers */
.ndd-shipping-date-span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 3px 10px 3px 8px !important;
    background: rgba(22, 163, 74, 0.09) !important;
    border: 1px solid rgba(22, 163, 74, 0.25) !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #15803D !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif !important;
    line-height: 1.4 !important;
}
.ndd-shipping-date-icon {
    font-size: 11px;
    line-height: 1;
    flex-shrink: 0;
}
.ndd-shipping-date-text {
    white-space: nowrap;
}
/* Slot label wrapping in WC shipping table */
.woocommerce-cart .shipping .ndd-shipping-date,
.woocommerce-checkout .shipping .ndd-shipping-date {
    margin-top: 5px;
}

/* ── Cart item delivery dates (v1.8.0) ── */
.ndd-cart-item-dates {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 5px;
}
.ndd-cid-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}
.ndd-cid-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9CA3AF;
    white-space: nowrap;
    flex-shrink: 0;
}
.ndd-cid-date {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
a.ndd-cid-link {
    text-decoration: none !important;
}
a.ndd-cid-link:hover {
    text-decoration: underline !important;
}

/* ── Shop/archive product card date (v1.8.5) ── */
.ndd-card-date {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 7px 10px !important;
    margin: 6px 0 8px !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif !important;
    font-size: 12px !important;
    flex-wrap: wrap !important;
    box-sizing: border-box !important;
    line-height: 1.4 !important;
    width: 100% !important;
}
.ndd-card-date-label {
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: .05em !important;
    white-space: nowrap !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.ndd-card-date-arrival {
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
a.ndd-card-date-link {
    text-decoration: none !important;
    font-weight: 700 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}
a.ndd-card-date-link:hover {
    text-decoration: underline !important;
    background: none !important;
}

/* ── Feature 4: Same-day badge (v2.0.0) ── */
.ndd-sameday-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 4px 10px !important;
    margin: 0 0 6px !important;
    background: #DCFCE7 !important;
    color: #15803D !important;
    border: 1px solid #BBF7D0 !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: .07em !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif !important;
    line-height: 1 !important;
}
.ndd-sameday-badge--next {
    background: #F3F4F6 !important;
    color: #6B7280 !important;
    border-color: #E5E7EB !important;
}

/* ── Feature 5: Thank-you page delivery summary (v2.0.0) ── */
.ndd-thankyou-summary {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}
.ndd-thankyou-heading {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    border: none !important;
}
.ndd-thankyou-row {
    margin-bottom: 16px;
}
.ndd-thankyou-row:last-child {
    margin-bottom: 0;
}
.ndd-thankyou-cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6B7280;
    margin-bottom: 8px;
}
.ndd-thankyou-items {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.ndd-thankyou-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 10px 14px;
    flex: 1;
    min-width: 200px;
}
.ndd-thankyou-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.ndd-thankyou-label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    white-space: nowrap;
}
.ndd-thankyou-date {
    font-size: 14px;
    font-weight: 800;
    margin-left: auto;
    white-space: nowrap;
}
