/* ==========================================================================
   Elementor Price Table – Annual/Monthly Toggle
   Frontend Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Toggle wrapper injected above the price table
   -------------------------------------------------------------------------- */

.ept-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   2. Period labels (Monthly / Annual)
   -------------------------------------------------------------------------- */

.ept-label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: color 0.25s ease;
    line-height: 1;
    user-select: none;
}

.ept-label.ept-active {
    color: #333;
}

/* --------------------------------------------------------------------------
   3. Toggle switch
   -------------------------------------------------------------------------- */

.ept-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.ept-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.ept-slider {
    position: absolute;
    inset: 0;
    background-color: #ccc;
    border-radius: 28px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ept-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 4px;
    top: 4px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.ept-switch input:checked + .ept-slider {
    background-color: #6c63ff; /* Accent colour – override with CSS custom property */
}

.ept-switch input:checked + .ept-slider::before {
    transform: translateX(24px);
}

/* Custom property override for easy brand colour matching */
:root {
    --ept-accent: #6c63ff;
}

.ept-switch input:checked + .ept-slider {
    background-color: var(--ept-accent);
}

/* --------------------------------------------------------------------------
   4. Savings badge
   -------------------------------------------------------------------------- */

.ept-savings-badge {
    display: inline-block;
    background-color: #e8f5e9;
    color: #2e7d32;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    vertical-align: middle;
    margin-left: 4px;
}

/* --------------------------------------------------------------------------
   5. Strike-through original price
   -------------------------------------------------------------------------- */

.ept-original-price {
    display: inline-block;
    text-decoration: line-through;
    color: #aaa;
    font-size: 0.75em;
    margin-left: 6px;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   6. Price transition animation
   -------------------------------------------------------------------------- */

.elementor-price-table__price {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.ept-price-changing {
    opacity: 0;
    transform: translateY(-6px);
}

/* --------------------------------------------------------------------------
   7. Responsive adjustments
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
    .ept-toggle-wrapper {
        gap: 8px;
    }

    .ept-label {
        font-size: 13px;
    }
}
