@import url('https://fonts.googleapis.com/css2?family=Cookie&family=Vazirmatn:wght@400;500;600;700&display=swap');

:root {
    --ig-bg: #fafafa;
    --ig-card: #fff;
    --ig-border: #dbdbdb;
    --ig-text: #262626;
    --ig-muted: #8e8e8e;
    --ig-blue: #0095f6;
    --ig-blue-hover: #1877f2;
    --ig-like: #ed4956;
    --ig-nav: 244px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

html[dir="rtl"],
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

body.yk-body {
    margin: 0;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--ig-bg);
    color: var(--ig-text);
    -webkit-font-smoothing: antialiased;
    direction: rtl;
    text-align: right;
}

a { color: inherit; }

.ig-logo {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--ig-text);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.03em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ig-logo img,
.ig-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    background: #fff;
}

.ig-topbar .ig-logo img,
.ig-topbar .ig-logo-img {
    width: 32px;
    height: 32px;
}

.ig-ico {
    width: 24px;
    height: 24px;
    display: block;
    flex-shrink: 0;
    overflow: visible;
}

html[dir="rtl"] .ig-ico-flip {
    transform: scaleX(-1);
}

/* ---- desktop sidebar ---- */
.ig-sidebar {
    display: none;
}

.ig-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 54px;
    padding: 0 16px;
    background: var(--ig-card);
    border-bottom: 1px solid var(--ig-border);
}

.ig-top-live {
    color: var(--ig-text);
    display: flex;
    align-items: center;
    padding: 6px;
    flex-shrink: 0;
}
.ig-top-live.is-active .ig-ico {
    stroke-width: 2.4;
}

.ig-search-mini {
    flex: 1;
    max-width: 268px;
}

.ig-search-mini input,
.ig-explore-search input,
.ig-auth-card input[type="text"],
.ig-auth-card input[type="password"],
.ig-auth-card input[type="email"],
.ig-modal-box input[type="text"],
.ig-modal-box input[type="password"],
.form-control,
textarea.form-control {
    width: 100%;
    border: 1px solid var(--ig-border);
    background: #fafafa;
    border-radius: 8px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    text-align: right;
    direction: rtl;
}

.form-control:focus {
    border-color: #a8a8a8;
}

.ig-main {
    max-width: 470px;
    margin: 0 auto;
    padding: 16px 0 84px;
}

.ig-main.ig-wide {
    max-width: 935px;
    padding-left: 12px;
    padding-right: 12px;
}

.ig-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--ig-card);
    border-top: 1px solid var(--ig-border);
}

.ig-bottom a,
.ig-nav-item {
    color: var(--ig-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.ig-nav-item.is-active .ig-ico,
.ig-bottom a.is-active .ig-ico {
    stroke-width: 2.4;
}

.ig-avatar-nav {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.ig-avatar-nav.is-active {
    outline: 1px solid #111;
    outline-offset: 2px;
}

.ig-side-tags {
    display: none;
}

.ig-hashtag {
    color: #00376b;
    text-decoration: none;
    font-weight: 600;
}
.ig-hashtag:hover { text-decoration: underline; }

.ig-tag-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 4px 20px;
    direction: rtl;
}
.ig-tag-mark {
    width: 72px;
    height: 72px;
    border: 1px solid var(--ig-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    flex-shrink: 0;
}
.ig-tag-mark .ig-ico { width: 32px; height: 32px; }
.ig-tag-head h1 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
    word-break: break-word;
}
.ig-tag-head p {
    margin: 0;
    color: var(--ig-muted);
    font-size: 14px;
}

/* ---- stories ---- */
.ig-stories {
    display: flex;
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: var(--ig-card);
    border: 1px solid var(--ig-border);
    border-radius: 8px;
    scrollbar-width: none;
    direction: rtl;
}
.ig-stories::-webkit-scrollbar { display: none; }

.ig-story {
    flex: 0 0 auto;
    width: 74px;
    text-align: center;
    text-decoration: none;
    color: var(--ig-text);
    font-size: 12px;
}

.ig-story-ring {
    width: 66px;
    height: 66px;
    margin: 0 auto 6px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
}

.ig-story-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    display: block;
}

.ig-story span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- post card ---- */
.ig-card {
    background: var(--ig-card);
    border: 1px solid var(--ig-border);
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}

.ig-card-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    direction: rtl;
    text-align: right;
}

.ig-card-head img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.ig-card-head a.ig-uname {
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.ig-more {
    margin-inline-start: auto;
    position: relative;
}

.ig-icon-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--ig-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ig-menu {
    display: none;
    position: absolute;
    right: 0;
    left: auto;
    top: 100%;
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--ig-border);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.12);
    z-index: 5;
    overflow: hidden;
    text-align: right;
}

.ig-more.open .ig-menu { display: block; }

.ig-menu a, .ig-menu button {
    display: block;
    width: 100%;
    text-align: right;
    padding: 12px 16px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    text-decoration: none;
    color: var(--ig-text);
    cursor: pointer;
}

.ig-menu a.danger { color: var(--ig-like); font-weight: 600; }

.ig-media {
    background: #000;
    position: relative;
}

.ig-media img,
.ig-media video {
    width: 100%;
    max-height: 585px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.ig-video-box {
    cursor: pointer;
}

.ig-video-btn {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 72px;
    height: 72px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.ig-video-btn .ig-ico {
    width: 28px;
    height: 28px;
    fill: #111;
    stroke: none;
}

.ig-video-play .ig-ico { margin-inline-end: -2px; }
.ig-video-pause { display: none; }

.ig-video-box.is-playing .ig-video-play { display: none; }
.ig-video-box.is-playing .ig-video-pause { display: flex; }
.ig-video-box.is-playing .ig-video-btn { opacity: 0; }
.ig-video-box.is-playing:hover .ig-video-btn { opacity: 1; }

.ig-feed-more {
    text-align: center;
    color: var(--ig-muted);
    padding: 18px 12px 32px;
    font-size: 13px;
    min-height: 24px;
}

.ig-feed-more span { display: none; }
.ig-feed-more.is-loading span { display: inline; }

.ig-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 0 12px;
    direction: rtl;
}

.ig-actions .ig-icon-btn { padding: 6px; }

.ig-actions .ig-ico {
    width: 24px;
    height: 24px;
}

.ig-stat-btn {
    gap: 5px;
}

.ig-stat {
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    min-width: 0.6em;
}

.ig-actions .ig-bm { margin-inline-start: auto; }

.ig-icon-btn.is-on { color: var(--ig-like); }
.ig-icon-btn.is-on[data-react="dislike"] { color: #262626; }
.ig-icon-btn.is-on[data-bookmark] {
    color: var(--ig-text);
}
.ig-icon-btn.is-on[data-bookmark] .ig-ico,
.ig-icon-btn.is-on[data-react="like"] .ig-ico {
    fill: currentColor;
}

.ig-icon-btn.copied { color: var(--ig-blue); }

.ig-caption {
    padding: 6px 16px 0;
    font-size: 14px;
    line-height: 1.85;
    word-break: break-word;
    text-align: right;
    direction: rtl;
}

.ig-uname {
    font-weight: 600;
    text-decoration: none;
    unicode-bidi: isolate;
    margin-inline-end: 6px;
}

.ig-caption .ig-uname {
    font-weight: 600;
    text-decoration: none;
    margin-left: 0;
    margin-inline-end: 6px;
}

.ig-comment-body {
    text-align: right;
    direction: rtl;
    min-width: 0;
}

.ig-comment-text {
    unicode-bidi: plaintext;
}

.ig-caption-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ig-caption-text.is-open {
    display: block;
    overflow: visible;
}

.ig-caption-more {
    background: none;
    border: none;
    color: var(--ig-muted);
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

.ig-view-comments,
.ig-time {
    display: block;
    padding: 6px 16px 12px;
    color: var(--ig-muted);
    font-size: 12px;
    text-decoration: none;
    text-transform: none;
    text-align: right;
    direction: rtl;
}

.ig-view-comments { padding-bottom: 0; font-size: 14px; }

/* ---- profile ---- */
.ig-profile {
    padding: 16px 16px 0;
}

.ig-profile-head {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
    direction: rtl;
}

.ig-profile-ava {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    object-fit: cover;
}

.ig-profile-meta {
    text-align: right;
}

.ig-profile-meta h1 {
    font-size: 20px;
    font-weight: 400;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ig-stats {
    display: flex;
    gap: 18px;
    font-size: 14px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}

.ig-stats strong { font-weight: 600; }

.ig-bio {
    font-size: 14px;
    margin: 0;
}

.ig-btn {
    display: inline-block;
    border: 1px solid var(--ig-border);
    background: #efefef;
    color: var(--ig-text);
    border-radius: 8px;
    padding: 6px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.ig-btn-blue {
    background: var(--ig-blue);
    border-color: var(--ig-blue);
    color: #fff;
}

.ig-btn-blue:hover { background: var(--ig-blue-hover); }

.ig-btn-danger {
    background: #fff;
    border-color: var(--ig-border);
    color: var(--ig-like);
}

.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 12px;
}

.ig-grid a {
    position: relative;
    display: block;
    aspect-ratio: 1;
    background: #efefef;
}

.ig-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ig-grid .ig-play {
    position: absolute;
    top: 8px;
    right: 8px;
    left: auto;
    color: #fff;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}

.ig-grid .ig-play .ig-ico { fill: #fff; stroke: none; width: 18px; height: 18px; }

.ig-tabs {
    display: flex;
    justify-content: center;
    gap: 48px;
    border-top: 1px solid var(--ig-border);
    margin-top: 8px;
}

.ig-tabs a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--ig-muted);
    text-decoration: none;
    border-top: 1px solid transparent;
    margin-top: -1px;
}

.ig-tabs a.is-on {
    color: var(--ig-text);
    border-top-color: #111;
}

/* ---- post page ---- */
.ig-post-page {
    background: var(--ig-card);
    border: 1px solid var(--ig-border);
    border-radius: 4px;
    overflow: hidden;
}

.ig-post-side .ig-card {
    border: none;
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--ig-border);
}

@media (min-width: 736px) {
    .ig-post-page {
        display: grid;
        grid-template-columns: 1fr 340px;
        min-height: 450px;
        max-height: 80vh;
    }
    .ig-post-page .ig-media {
        display: flex;
        align-items: center;
        background: #000;
        min-height: 450px;
    }
    .ig-post-page .ig-media img,
    .ig-post-page .ig-media video {
        max-height: 80vh;
    }
    .ig-post-side {
        display: flex;
        flex-direction: column;
        border-right: 1px solid var(--ig-border);
        min-height: 0;
    }
    .ig-comments-scroll {
        flex: 1;
        overflow: auto;
        padding: 12px 16px;
    }
}

.ig-comment {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 14px;
    direction: rtl;
    text-align: right;
}

.ig-comment img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.ig-comment-form {
    display: flex;
    flex-direction: row;
    gap: 8px;
    border-top: 1px solid var(--ig-border);
    padding: 10px 12px;
    direction: rtl;
}

.ig-comment-form textarea {
    flex: 1;
    border: none;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    min-height: 36px;
    text-align: right;
    direction: rtl;
}

.ig-comment-form button {
    background: none;
    border: none;
    color: var(--ig-blue);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

/* ---- auth ---- */
body.ig-auth {
    background: #fafafa;
}

.ig-auth-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.ig-auth-card {
    width: 100%;
    max-width: 350px;
    background: #fff;
    border: 1px solid var(--ig-border);
    padding: 36px 40px 24px;
    margin-bottom: 10px;
    text-align: center;
}

.ig-auth-card .ig-logo {
    font-size: 1.8rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.ig-auth-card .ig-logo img,
.ig-auth-card .ig-logo-img {
    width: 88px;
    height: 88px;
}

.ig-auth-card .form-group { text-align: right; margin-bottom: 8px; }

.ig-auth-card .btn,
.ig-auth-card button[type="submit"] {
    width: 100%;
    margin-top: 10px;
    background: var(--ig-blue);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px;
    font-family: inherit;
    cursor: pointer;
}

.ig-or {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ig-muted);
    font-size: 13px;
    font-weight: 600;
    margin: 16px 0;
}

.ig-or::before, .ig-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ig-border);
}

.ig-switch {
    width: 100%;
    max-width: 350px;
    background: #fff;
    border: 1px solid var(--ig-border);
    padding: 20px;
    text-align: center;
    font-size: 14px;
}

.ig-switch a { color: var(--ig-blue); font-weight: 600; text-decoration: none; }

.ig-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ig-modal.is-open { display: flex; }
body.ig-modal-open { overflow: hidden; }

.ig-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.ig-modal-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px 22px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.ig-modal-box .ig-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 1.7rem;
    margin-bottom: 8px;
}

.ig-modal-box .ig-logo img,
.ig-modal-box .ig-logo-img {
    width: 72px;
    height: 72px;
}

.ig-modal-box h2 {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 700;
}

.ig-modal-box input[type="text"],
.ig-modal-box input[type="password"] {
    margin-bottom: 8px;
}

.ig-modal-x {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--ig-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.ig-modal-x:hover { background: #f2f2f2; }
.ig-modal-x .ig-ico { width: 18px; height: 18px; }

.ig-login-remember {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 10px 0 6px;
    font-size: 13px;
    color: var(--ig-text);
    direction: rtl;
    text-align: right;
}
.ig-login-remember input { width: auto; margin: 0; }

.ig-login-error {
    color: var(--ig-like);
    font-size: 13px;
    margin: 6px 0 0;
    min-height: 1.2em;
}

.ig-modal-box button[type="submit"] {
    width: 100%;
    margin-top: 12px;
    background: var(--ig-blue);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    padding: 9px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}
.ig-modal-box button[type="submit"]:disabled { opacity: .65; cursor: wait; }

.ig-modal-switch {
    margin: 16px 0 0;
    font-size: 14px;
}
.ig-modal-switch a { color: var(--ig-blue); font-weight: 600; text-decoration: none; }

/* ---- create / report ---- */
.ig-panel {
    background: #fff;
    border: 1px solid var(--ig-border);
    border-radius: 12px;
    padding: 20px;
    max-width: 470px;
    margin: 0 auto;
}

.ig-panel h1 {
    font-size: 16px;
    text-align: center;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ig-border);
}

.ig-empty {
    text-align: center;
    padding: 64px 16px;
    color: var(--ig-muted);
}

.ig-empty h2 { color: var(--ig-text); font-weight: 400; }

.alert {
    max-width: 470px;
    margin: 12px auto;
    border-radius: 8px;
}

.pagination {
    justify-content: center;
    margin-top: 16px;
}

.help-block { color: var(--ig-like); font-size: 12px; }

/* ---- desktop ---- */
@media (min-width: 768px) {
    .ig-topbar, .ig-bottom { display: none; }

    .ig-sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: var(--ig-nav);
        height: 100vh;
        padding: 28px 12px 20px;
        border-left: 1px solid var(--ig-border);
        background: #fff;
        z-index: 50;
        overflow-y: auto;
    }

    .ig-sidebar .ig-logo {
        padding: 0 12px 22px;
        font-size: 1.55rem;
    }

    .ig-sidebar .ig-logo img,
    .ig-sidebar .ig-logo-img {
        width: 42px;
        height: 42px;
    }

    .ig-nav-item {
        justify-content: flex-start;
        gap: 16px;
        padding: 12px;
        border-radius: 12px;
        font-size: 16px;
        margin-bottom: 4px;
        direction: rtl;
        text-align: right;
    }

    .ig-nav-item .ig-ico {
        width: 24px;
        height: 24px;
    }

    .ig-nav-item:hover { background: #f2f2f2; }

    .ig-nav-item.is-active { font-weight: 700; }

    .ig-nav-item.is-active .ig-ico {
        stroke-width: 2.15;
    }

    .ig-nav-foot { margin-top: auto; }

    .ig-side-tags {
        display: block;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        margin-top: 6px;
        padding-top: 8px;
        border-top: 1px solid var(--ig-border);
    }
    .ig-side-tags-title {
        font-size: 11px;
        color: var(--ig-muted);
        font-weight: 600;
        padding: 0 12px 4px;
    }
    .ig-side-tags .ig-nav-item {
        padding: 2px 12px;
        font-size: 13px;
        gap: 6px;
        margin-bottom: 0;
        min-height: 26px;
        border-radius: 8px;
    }
    .ig-side-tags .ig-nav-item .ig-ico {
        width: 18px;
        height: 18px;
    }
    .ig-side-tags .ig-nav-item span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }

    .ig-nav-item form { display: contents; }

    button.ig-nav-item,
    button.ig-nav-btn {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        width: 100%;
        background: none;
        border: none;
        box-shadow: none;
        font: inherit;
        color: inherit;
        cursor: pointer;
        padding: 12px;
        border-radius: 12px;
        text-align: right;
        direction: rtl;
    }

    button.ig-nav-item:hover,
    button.ig-nav-btn:hover {
        background: #f2f2f2;
    }

    body.yk-body { padding-right: var(--ig-nav); }

    .ig-main {
        max-width: 630px;
        padding: 32px 20px 40px;
    }

    .ig-profile-head {
        grid-template-columns: 150px 1fr;
        gap: 40px;
        padding: 0 40px 20px;
    }

    .ig-profile-ava { width: 150px; height: 150px; }

    .ig-grid { gap: 4px; }

    .ig-main.ig-wide { max-width: 935px; }
}

@media (min-width: 1264px) {
    :root { --ig-nav: 244px; }
}

@media (max-width: 767px) {
    .ig-card, .ig-stories {
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
}

html[dir="rtl"] .form-check {
    padding-left: 0;
    padding-right: 1.4rem;
    text-align: right;
}

html[dir="rtl"] .form-check-input {
    margin-left: 0;
    margin-right: -1.4rem;
    position: relative;
    float: right;
}

html[dir="rtl"] .custom-control {
    padding-left: 0;
    padding-right: 1.5rem;
    text-align: right;
}

html[dir="rtl"] .custom-control-label::before,
html[dir="rtl"] .custom-control-label::after {
    left: auto;
    right: -1.5rem;
}

html[dir="rtl"] .ig-panel,
html[dir="rtl"] .ig-panel label,
html[dir="rtl"] .help-block,
html[dir="rtl"] .alert {
    text-align: right;
    direction: rtl;
}

.ig-icon-btn.is-on[data-react="dislike"] .ig-ico {
    fill: none;
    stroke-width: 2.1;
}

.ig-tabs a {
    direction: rtl;
}

.ig-explore-search {
    direction: rtl;
}

.ig-nav-live span {
    white-space: normal;
    line-height: 1.3;
}

.live-page {
    padding: 4px 2px 28px;
}
.live-head {
    text-align: center;
    margin: 4px 0 22px;
}
.live-head h1 {
    font-size: 1.35rem;
    margin: 0 0 6px;
    font-weight: 700;
}
.live-head p {
    color: var(--ig-muted);
    margin: 0;
    font-size: 14px;
}
.live-head-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    text-align: right;
}
.live-head-row .live-ico {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}
.live-head-row h1 {
    margin: 0 0 4px;
    font-size: 1.2rem;
}
.live-back {
    display: block;
    margin-bottom: 14px;
    color: var(--ig-muted);
    text-decoration: none;
    font-size: 13px;
    text-align: right;
}
.live-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.live-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--ig-text);
    background: #fff;
    border: 1px solid var(--ig-border);
    border-radius: 18px;
    padding: 18px 10px 16px;
    position: relative;
    min-height: 176px;
}
.live-card:hover {
    background: #fafafa;
}
.live-card.is-off {
    opacity: .78;
}
.live-card strong {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.45;
}
.live-card > span {
    color: var(--ig-muted);
    font-size: 12px;
    margin-top: 2px;
}
.live-ico {
    display: block;
    width: 84px;
    height: 84px;
}
.live-ico svg {
    width: 100%;
    height: 100%;
    display: block;
}
.live-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
}
.live-stage {
    position: relative;
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    min-height: 220px;
}
.live-stage iframe,
.live-stage video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}
.live-hls-msg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, .45);
    font-size: 14px;
    pointer-events: none;
}
.live-hls-msg[hidden] {
    display: none;
}
.live-empty {
    height: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    text-align: center;
    padding: 24px;
}
.live-empty .live-ico {
    width: 72px;
    height: 72px;
}
.live-empty h2 {
    margin: 8px 0 0;
    font-size: 1.05rem;
}
.live-empty p {
    margin: 0;
    color: #bbb;
    font-size: 13px;
}

@media (min-width: 700px) {
    .live-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
    .live-card {
        min-height: 198px;
        padding: 22px 12px 18px;
    }
    .live-ico {
        width: 96px;
        height: 96px;
    }
}