/**
 * Pricing UI — SINGLE SOURCE OF TRUTH.
 *
 * Everything that styles the pricing pages lives in THIS file. There is no
 * inline <style> block and nothing in Elementor Custom CSS or the theme — if
 * you need to change the pricing appearance, change it here.
 *
 * Scoping so it can't leak onto the rest of the site:
 *   • Price look           -> keyed on the plugin's own .si-original-price /
 *                             .si-discounted-price classes (only ever output by
 *                             the price shortcodes), so it works on any page,
 *                             with or without the .pricing-view wrapper.
 *   • Everything else       -> scoped under .pricing-view / the toggle classes,
 *                             which only exist on the pricing page.
 *   • The view show/hide    -> also guarded with body:not(.elementor-editor-active)
 *                             so all cards stay visible/editable in the backend.
 */

/* =============================================================
   1. PRICE LOOK — global, by plugin class (authoritative)
   ============================================================= */
.si-original-price,
.si-original-price .woocommerce-Price-amount,
.si-original-price .woocommerce-Price-amount bdi {
    text-decoration: line-through !important;
    opacity: 0.57 !important;
    margin-right: 3px !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
    color: #fff !important;
}
.si-discounted-price,
.si-discounted-price .woocommerce-Price-amount,
.si-discounted-price .woocommerce-Price-amount bdi {
    font-size: 25px !important;
    font-weight: 600 !important;
    color: #fff !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

/* Plain (non-discounted) single prices inside the cards. The :not() excludes the
   discounted/original prices so they are NOT styled twice — those are owned
   solely by the class rules above. */
.pricing-view .woocommerce-Price-amount bdi:not(.si-discounted-price bdi):not(.si-original-price bdi) {
    font-size: 25px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
}

/* White text for the "/ month" suffix and plain prices on the dark cards.
   Scoped to .pricing-view so it never forces other shortcodes on the site white. */
.pricing-view .elementor-shortcode {
    color: #fff !important;
}

/* =============================================================
   2. TOGGLE SWITCH (pricing page only — these classes exist nowhere else)
   ============================================================= */
.toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}
.style-toggle-container {
    display: flex;
    align-items: center;
    gap: 4px;
}
.toggle-text {
    font-size: 12px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
}
.toggle-text:hover { color: #ccc; }
.style-toggle-container:has(input:nth-of-type(1):checked) > label:nth-of-type(1),
.style-toggle-container:has(input:nth-of-type(2):checked) > label:nth-of-type(2) {
    color: #fff;
    font-weight: 500;
}
.pill-track {
    position: relative;
    width: 30px;
    height: 18px;
    background-color: #ffffff;
    border-radius: 24px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}
.pill-track input { display: none; }
.track-left, .track-right {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 2;
    display: none;
}
.pill-track input:nth-of-type(1):checked ~ .track-right { display: block; }
.pill-track input:nth-of-type(2):checked ~ .track-left { display: block; }
.pill-knob {
    position: absolute;
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: #000000;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}
.pill-track input:nth-of-type(2):checked ~ .pill-knob { transform: translateX(12px); }
.si-save-badge {
    background-color: #0E2BED;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* =============================================================
   3. VIEW TRANSITIONS
   The old view loses .visible-active synchronously, and pointer-events stops a
   stale card catching clicks during the swap (fixes "monthly added when annual
   selected"). Guarded so all cards stay visible/editable in the Elementor editor.
   ============================================================= */
body:not(.elementor-editor-active) .pricing-view {
    display: none !important;
    opacity: 0;
    transform: scale(0.99) translateY(5px);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}
body:not(.elementor-editor-active) .pricing-view.display-active { display: flex !important; }
body:not(.elementor-editor-active) .pricing-view.visible-active { opacity: 1; transform: scale(1) translateY(0); }
body:not(.elementor-editor-active) .pricing-view:not(.visible-active) { pointer-events: none !important; }

/* =============================================================
   4. LAYOUT — prevent page jump on view swap
   ============================================================= */
.pricing-card-container {
    min-height: 650px;
    transition: min-height 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
@media (max-width: 768px) {
    .pricing-card-container { min-height: 1400px; }
    .toggle-wrapper { flex-direction: row; flex-wrap: wrap; gap: 16px; }
}

/* =============================================================
   5. SINGLE-TOOL PLAN MINI TABS (Elementor tabs)
   ============================================================= */
.si-mini-tabs .elementor-tabs-wrapper,
.si-mini-tabs .e-n-tabs-heading {
    display: flex !important;
    background: #f2f2f2 !important;
    padding: 3px !important;
    border-radius: 4px !important;
    border: 1px solid #e0e0e0 !important;
    width: calc(100% - 50px) !important;
    margin: 0 auto 8px auto !important;
    gap: 0 !important;
    justify-content: space-between !important;
}
.si-mini-tabs .elementor-tab-title,
.si-mini-tabs .e-n-tab-title {
    flex: 1 !important;
    width: 50% !important;
    text-align: center !important;
    padding: 3px 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 3px !important;
    background: transparent !important;
    color: #666 !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 0 !important;
}
.si-mini-tabs .elementor-tab-title.elementor-active,
.si-mini-tabs .e-n-tab-title[aria-selected="true"] {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}
.si-mini-tabs .elementor-tab-title:before,
.si-mini-tabs .elementor-tab-title:after,
.si-mini-tabs .elementor-tab-content {
    display: none !important;
    border: none !important;
}
.si-mini-tabs .elementor-tab-content,
.si-mini-tabs .e-n-tabs-content {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    margin-top: 0px !important;
}
