/**
 * Dynamic Price Display — price-display.css
 */

/* ── Placeholder (shown while JS fetches) ─────────────────────────────── */
.dpd-price-placeholder {
    display: inline-block;
    min-width: 60px;
    line-height: 1.5;
}

.dpd-price-loading {
    opacity: 0.35;
    font-style: italic;
}

/* ── Wrapper inserted by JS ───────────────────────────────────────────── */
.dpd-price-wrapper {
    display: inline-block;
    text-align: center;
    line-height: 1.5;
}

/* ── Base price block ─────────────────────────────────────────────────── */
.dpd-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* ── Main price line ─────────────────────────────────────────────────── */
.dpd-price__main {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 700;
}

.dpd-price__amount {
    letter-spacing: 0.01em;
}

.dpd-price__currency {
    font-size: 0.85em;
    font-weight: 600;
}

/* ── SAR icon alignment ───────────────────────────────────────────────── */
.dpd-price--sar .dpd-price__main {
    direction: ltr;
}

.dpd-sar-svg {
    height: 1em;
    width: auto;
    max-height: 16px;
    vertical-align: middle;
    display: inline-block;
    fill: currentColor;
}

/* ── Conversion note ─────────────────────────────────────────────────── */
.dpd-price__note {
    font-size: 11px;
    color: #444;
    margin-top: 2px;
    text-align: center;
}

.dpd-price__note--unavail {
    color: #888;
}

/* ── Discounted price: strikethrough / highlight ──────────────────────── */

/* <del> — original price struck through */
.dpd-price__amount--original {
    text-decoration: line-through;
    opacity: 0.55;
    font-weight: 400;
    font-size: 0.88em;
}

/* <ins> — discounted price highlighted, no underline */
.dpd-price__amount--discounted {
    text-decoration: none;
    color: #2a9d2a;
}

/* Remove empty paragraph gaps around shortcodes (Elementor + LearnDash) */
.elementor-widget-container p:empty {
    display: none;
    margin: 0;
    padding: 0;
}

.elementor-widget-container:has(.dpd-price-placeholder),
.elementor-widget-container:has(.dpd-price-wrapper) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
