/* ============================================================
   Tariff Plans v3.0 — مینیمال، ظریف، سبک
   ============================================================ */

#ta.ta-container {
    --ta-primary: var(--e-global-color-primary, #00606C);
    --ta-secondary: var(--e-global-color-secondary, #BD1F5F);
    --ta-accent: var(--e-global-color-accent, #F9C606);
    --ta-bg: var(--e-global-color-97375e9, #FFFFFF);
    --ta-bg-soft: var(--e-global-color-9289798, #F1F2F3);
    --ta-border: #E8EAED;
    --ta-text: #1f2937;
    --ta-text-muted: var(--e-global-color-d3cbc3d, #9B9A9A);

    --ta-font: var(--e-global-typography-text-font-family, "ایران سنس", Tahoma, sans-serif);

    --ta-radius: 10px;
    --ta-gap: 20px;

    --plan-color: var(--ta-primary);
    --plan-color-soft: #F4F8F9;

    max-width: 1140px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: var(--ta-font);
    direction: rtl;
    box-sizing: border-box;
    color: var(--ta-text);
    contain: layout style;
}

#ta.ta-container *,
#ta.ta-container *::before,
#ta.ta-container *::after {
    box-sizing: border-box;
}

/* ===== گرید ===== */
#ta .ta-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--ta-gap);
    align-items: stretch;
}

/* ============================================================
   کارت پلن — بدون سایه، بدون هاور
   ============================================================ */
#ta .ta-plan {
    position: relative;
    background: var(--ta-bg);
    border: 1px solid var(--ta-border);
    border-radius: var(--ta-radius);
    padding: 28px 20px 20px;
    display: flex;
    flex-direction: column;
}

#ta .ta-plan--basic {
    --plan-color: #3B82F6;
    --plan-color-soft: #F4F8FF;
}

#ta .ta-plan--professional {
    --plan-color: #10B981;
    --plan-color-soft: #F3FBF7;
}

#ta .ta-plan--premium {
    --plan-color: var(--ta-secondary);
    --plan-color-soft: #FCF5F8;
}

#ta .ta-plan--featured {
    border-color: var(--ta-primary);
    border-width: 1.5px;
}

/* ============================================================
   بج — ساده و ظریف
   ============================================================ */
#ta .ta-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ta-primary);
    color: #fff;
    font-family: var(--ta-font);
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 16px;
    border-radius: 999px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

#ta .ta-badge::before {
    content: "★";
    font-size: 11px;
    color: var(--ta-accent);
}

/* ============================================================
   هدر کارت
   ============================================================ */
#ta .ta-plan__header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--ta-border);
}

#ta .ta-medal {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    position: relative;
}

#ta .ta-medal svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

#ta .ta-medal--bronze {
    background: linear-gradient(135deg, #D4A574 0%, #8B5E34 100%);
}

#ta .ta-medal--silver {
    background: linear-gradient(135deg, #C0C6CF 0%, #8A8F99 100%);
}

#ta .ta-medal--gold {
    background: linear-gradient(135deg, var(--ta-accent) 0%, #D4A00A 100%);
}

/* ============================================================
   اسم پلن — ظریف‌تر
   ============================================================ */
#ta .ta-plan__title {
    margin: 0 0 6px;
    font-family: var(--ta-font);
    font-size: 22px;
    font-weight: 700;
    color: var(--plan-color);
    letter-spacing: 3px;
    line-height: 1.3em;
    text-align: center;
}

#ta .ta-plan__subtitle {
    margin: 0;
    font-family: var(--ta-font);
    font-size: 12.5px;
    font-weight: 400;
    color: var(--ta-text-muted);
    line-height: 1.7em;
    min-height: 20px;
}

/* ============================================================
   ویژگی‌ها
   ============================================================ */
#ta .ta-plan__features {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#ta .ta-feature {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ta-border);
    font-family: var(--ta-font);
    font-size: 13px;
    line-height: 1.7em;
    color: var(--ta-text);
}

#ta .ta-feature:last-child {
    border-bottom: 0;
}

#ta .ta-feature__icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: var(--plan-color);
    background: var(--plan-color-soft);
    border-radius: 6px;
    overflow: hidden;
}

#ta .ta-feature__icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

#ta .ta-feature__icon svg {
    width: 14px;
    height: 14px;
}

#ta .ta-feature__text {
    flex: 1;
    padding-top: 2px;
}

#ta .ta-feature__text a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
    transition: color .15s;
}

#ta .ta-feature__text a:hover {
    color: var(--plan-color);
}

/* ============================================================
   Tooltip — سبک
   ============================================================ */
#ta [data-tip] {
    position: relative;
}

#ta [data-tip]:hover::after,
#ta [data-tip]:focus::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: #1f2937;
    color: #fff;
    font-family: var(--ta-font);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.6em;
    padding: 6px 10px;
    border-radius: 6px;
    max-width: 240px;
    white-space: normal;
    z-index: 10;
    pointer-events: none;
}

#ta [data-tip]:hover::before,
#ta [data-tip]:focus::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 1px);
    right: 10px;
    border: 5px solid transparent;
    border-top-color: #1f2937;
    z-index: 10;
}

@media (hover: none) and (pointer: coarse) {
    #ta [data-tip]:active::after,
    #ta [data-tip]:active::before {
        display: block;
    }
}

/* ============================================================
   📦 دکمه لایه باز — ظریف، بدون هاور اضافه
   ============================================================ */
#ta .ta-feature--layer {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--ta-border);
}

#ta .ta-feature--layer:last-child {
    border-bottom: 0;
}

#ta .ta-layer-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: var(--plan-color-soft);
    color: var(--plan-color);
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: var(--ta-font);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4em;
    transition: background .2s, color .2s, border-color .2s;
    -webkit-tap-highlight-color: transparent;
}

#ta .ta-layer-btn:hover {
    background: color-mix(in srgb, var(--plan-color-soft) 60%, var(--plan-color));
    border-color: color-mix(in srgb, var(--plan-color) 25%, transparent);
    color: var(--plan-color);
}

#ta .ta-layer-btn__icon {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    background: var(--plan-color);
    color: #fff;
    border-radius: 6px;
    transition: background .2s;
}

#ta .ta-layer-btn:hover .ta-layer-btn__icon {
    background: color-mix(in srgb, var(--plan-color) 80%, black);
}

#ta .ta-layer-btn__icon svg {
    width: 13px;
    height: 13px;
}

#ta .ta-layer-btn__text {
    flex: 1;
    text-align: right;
}

#ta .ta-layer-btn__arrow {
    font-size: 14px;
    font-weight: 600;
    opacity: .55;
    transition: opacity .2s;
}

#ta .ta-layer-btn:hover .ta-layer-btn__arrow {
    opacity: .9;
}

/* ============================================================
   قیمت
   ============================================================ */
#ta .ta-plan__price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 7px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    font-family: var(--ta-font);
}

#ta .ta-plan__price-old {
    color: var(--ta-text-muted);
    text-decoration: line-through;
    font-size: 13px;
    font-weight: 400;
}

#ta .ta-plan__price-current {
    font-size: 22px;
    font-weight: 700;
    color: var(--plan-color);
    line-height: 1.2em;
    letter-spacing: 0.3px;
}

#ta .ta-plan__price-unit {
    font-size: 12px;
    font-weight: 400;
    color: var(--ta-text-muted);
}

#ta .ta-plan__price-current .woocommerce-Price-currencySymbol {
    font-size: 13px;
    font-weight: 500;
}

/* ============================================================
   دکمه خرید — بدون سایه، بدون هاور پرزور
   ============================================================ */
#ta .ta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 22px;
    font-family: var(--ta-font);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--plan-color);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background .18s, opacity .18s;
    line-height: 1.4em;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}

#ta .ta-btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--plan-color) 88%, black);
}

#ta .ta-btn:active:not(:disabled) {
    opacity: .9;
}

#ta .ta-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

#ta .ta-btn.loading {
    opacity: .8;
    cursor: wait;
}

#ta .ta-btn__spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ta-spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes ta-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   📱 موبایل
   ============================================================ */
@media (max-width: 980px) {
    #ta.ta-container {
        margin: 28px auto;
        padding: 0 14px;
    }

    #ta .ta-plans {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 420px;
        margin: 0 auto;
    }

    #ta .ta-plan {
        padding: 26px 18px 18px;
    }

    #ta .ta-badge {
        font-size: 11px;
        padding: 4px 14px;
        top: -11px;
    }

    #ta .ta-medal {
        width: 44px;
        height: 44px;
        margin-bottom: 10px;
    }

    #ta .ta-medal svg {
        width: 20px;
        height: 20px;
    }

    #ta .ta-plan__title {
        font-size: 20px;
        letter-spacing: 2.5px;
    }

    #ta .ta-feature {
        font-size: 13px;
        padding: 9px 0;
    }

    #ta .ta-plan__price-current {
        font-size: 21px;
    }

    #ta .ta-btn {
        padding: 14px 22px;
        font-size: 14.5px;
        min-height: 48px;
    }

    #ta .ta-layer-btn {
        padding: 12px 12px;
        font-size: 13px;
        min-height: 46px;
    }
    #ta .ta-layer-btn__icon {
        flex: 0 0 24px;
        width: 24px;
        height: 24px;
    }
}

/* ============================================================
   📱 موبایل کوچک
   ============================================================ */
@media (max-width: 400px) {
    #ta.ta-container {
        padding: 0 12px;
        margin: 20px auto;
    }

    #ta .ta-plan {
        padding: 24px 15px 16px;
    }

    #ta .ta-plan__title {
        font-size: 19px;
        letter-spacing: 2px;
    }

    #ta .ta-plan__subtitle {
        font-size: 12px;
    }

    #ta .ta-feature {
        font-size: 12.5px;
        gap: 8px;
    }

    #ta .ta-feature__icon {
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
    }

    #ta .ta-plan__price-current {
        font-size: 20px;
    }
}

/* ============================================================
   کاهش انیمیشن
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    #ta *,
    #ta *::before,
    #ta *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   چاپ
   ============================================================ */
@media print {
    #ta .ta-plan {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
    #ta .ta-btn { display: none; }
}