/**
 * Estimated Delivery — V4 Display Builder Frontend Styles
 *
 * Covers all design dimensions: style, shape, size, layout.
 * Color is handled by the legacy ed_class system (ed_lightgreen, etc.).
 */

/* ── Base ── */
.ed-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    transition: background 0.15s, border-color 0.15s;
}
.ed-display-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.ed-display-content {
    flex: 1;
    min-width: 0;
}
.ed-display-title {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-bottom: 2px;
}
.ed-display-text {
    display: inline;
}
.ed-carrier-name {
    font-weight: 600;
}
.ed-carrier-logo {
    display: inline-block;
    vertical-align: middle;
    max-height: 24px;
    width: auto;
    margin-right: 6px;
}

/* ── Style: Clean ── */
.ed-style-clean {
    background: transparent;
    border: none;
    padding-left: 0;
    padding-right: 0;
}

/* ── Style: Subtle ── */
.ed-style-subtle {
    background: rgba(0, 0, 0, 0.03);
    border: none;
}

/* ── Style: Card ── */
.ed-style-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ── Style: Outlined ── */
.ed-style-outlined {
    background: transparent;
    border: 2px solid #ccc;
}

/* ── Style: Bold ── */
.ed-style-bold {
    background: #333;
    color: #fff;
    border: none;
}
.ed-style-bold .ed-display-title {
    opacity: 0.8;
}
.ed-style-bold .ed-icon {
    color: #fff;
}

/* Bold + legacy color combos */
.ed_lightgreen .ed-style-bold,
.ed-style-bold.ed_lightgreen { background: #4caf50; }
.ed_lightblue .ed-style-bold,
.ed-style-bold.ed_lightblue { background: #2196f3; }
.ed_softred .ed-style-bold,
.ed-style-bold.ed_softred { background: #ef5350; }
.ed_lightpurple .ed-style-bold,
.ed-style-bold.ed_lightpurple { background: #7e57c2; }
.ed_lightyellow .ed-style-bold,
.ed-style-bold.ed_lightyellow { background: #ffc107; color: #333; }
.ed_orange .ed-style-bold,
.ed-style-bold.ed_orange { background: #ff9800; }
.ed_lightbrown .ed-style-bold,
.ed-style-bold.ed_lightbrown { background: #795548; }

/* ── Shape: Square ── */
.ed-shape-square { border-radius: 0; }

/* ── Shape: Rounded ── */
.ed-shape-rounded { border-radius: 6px; }

/* ── Shape: Pill ── */
.ed-shape-pill { border-radius: 999px; }

/* ── Size: Compact ── */
.ed-size-compact {
    padding: 5px 10px;
    font-size: 12px;
    gap: 5px;
}
.ed-size-compact .ed-display-title {
    font-size: 9px;
}
.ed-size-compact .ed-carrier-logo {
    max-height: 16px;
}

/* ── Size: Normal ── */
.ed-size-normal {
    padding: 10px 14px;
    font-size: 14px;
}

/* ── Size: Large ── */
.ed-size-large {
    padding: 14px 20px;
    font-size: 16px;
    gap: 10px;
}
.ed-size-large .ed-display-title {
    font-size: 12px;
    margin-bottom: 3px;
}
.ed-size-large .ed-carrier-logo {
    max-height: 32px;
}

/* ── Size: Hero ── */
.ed-size-hero {
    padding: 20px 28px;
    font-size: 20px;
    gap: 14px;
}
.ed-size-hero .ed-display-title {
    font-size: 13px;
    margin-bottom: 4px;
}
.ed-size-hero .ed-carrier-logo {
    max-height: 40px;
}

/* ── Layout: Inline (default) ── */
.ed-layout-inline {
    flex-direction: row;
    align-items: center;
}

/* ── Layout: Icon Left ── */
.ed-layout-icon-left {
    flex-direction: row;
    align-items: flex-start;
}
.ed-layout-icon-left .ed-display-icon {
    padding-top: 2px;
}
.ed-layout-icon-left .ed-display-icon .ed-icon {
    width: 28px;
    height: 28px;
}
.ed-size-large .ed-layout-icon-left .ed-display-icon .ed-icon,
.ed-layout-icon-left.ed-size-large .ed-display-icon .ed-icon {
    width: 36px;
    height: 36px;
}
.ed-size-hero .ed-layout-icon-left .ed-display-icon .ed-icon,
.ed-layout-icon-left.ed-size-hero .ed-display-icon .ed-icon {
    width: 44px;
    height: 44px;
}

/* ── Layout: Stacked ── */
.ed-layout-stacked {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ── Layout: Text Only ── */
.ed-layout-text-only {
    flex-direction: row;
}
.ed-layout-text-only .ed-display-icon {
    display: none;
}

/* ── Layout: Banner ── */
.ed-layout-banner {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* ── V4 wrapper ── */
.estimateddelivery.ed-v4 {
    /* Reset legacy wrapper styles when using v4 display */
}

/* ── Legacy compat: ensure old classes still work alongside new ones ── */
.ed-display .ed_delivery_wrapper {
    display: inline;
}
.ed-display .ed_delivery_text {
    display: inline;
}
.ed-display .date_green,
.ed-display .date_highlight {
    /* Preserve legacy date highlight class */
}
