/* Blogya custom presentation layer; kept outside vendor/theme bundles. */
.blogya-author-card,
.blogya-feed-card {
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: .75rem;
    padding: 1rem;
    background: var(--bs-body-bg, #fff);
}

.blogya-author-card img {
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
}

.blogya-author-chip {
    display: inline-block;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 999px;
    padding: .35rem .75rem;
    text-decoration: none;
}

.blogya-mobile-tabbar { display: none; }
body.blogya-navigation-loading::after {
    content: "";
    position: fixed;
    z-index: 2000;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #f94d00 0 35%, transparent 35% 100%);
    animation: blogya-loading 1s linear infinite;
}

@media (max-width: 991.98px) {
    .blogya-mobile-tabbar {
        position: fixed;
        inset: auto 0 0;
        z-index: 1030;
        display: flex;
        justify-content: space-around;
        gap: .25rem;
        padding: .45rem .4rem calc(.45rem + env(safe-area-inset-bottom));
        border-top: 1px solid var(--bs-border-color, #dee2e6);
        background: var(--bs-body-bg, #fff);
        box-shadow: 0 -3px 14px rgb(0 0 0 / 8%);
    }
    .blogya-mobile-tabbar a {
        display: flex;
        min-width: 3rem;
        flex: 1 1 0;
        flex-direction: column;
        align-items: center;
        gap: .15rem;
        color: var(--bs-secondary-color, #6c757d);
        font-size: 1.2rem;
        line-height: 1.2;
        text-decoration: none;
    }
    .blogya-mobile-tabbar a small { font-size: .65rem; }
    .blogya-mobile-tabbar a.active { color: #f94d00; }
    .blogya-mobile-tabbar .avatar img { border-radius: 50%; object-fit: cover; }
}

@keyframes blogya-loading { to { background-position: 180px 0; } }

@media (max-width: 767.98px) {
    .footer-copyright { padding: 24px 0; }
    .footer-copyright .row { row-gap: 12px; }
    .footer-copyright .row > [class*="col-"] { text-align: center !important; }
    .footer-copyright .nav-footer ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
    }
    .footer-copyright .nav-footer ul li { margin: 0; }
}
/* Let longer post titles wrap without being visually clipped. */
.post-item .title,
.post-item .title a,
.fs-title,
.fs-title a,
.video-title { overflow-wrap: anywhere; }
.section-videos .card-horizontal { height: auto; min-height: 258px; }
.section-videos .card-horizontal .video-title {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
    overflow: visible;
}

/* Author and role badges replace category labels on post-listing images. */
.post-item .image,
.post-item-small .image,
.post-item-horizontal .image,
.post-featured,
.video-card,
.fs-card {
    position: relative;
}

.post-author-overlay {
    position: absolute;
    z-index: 5;
    top: auto;
    bottom: .75rem;
    right: .75rem;
    left: auto;
    display: flex;
    align-items: center;
    gap: .45rem;
    width: max-content;
    height: auto;
    max-width: calc(100% - 1.5rem);
    padding: .3rem .58rem .3rem .3rem;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 12px;
    background: rgb(15 23 42 / 92%);
    color: #fff;
    box-shadow: 0 2px 8px rgb(0 0 0 / 18%);
    line-height: 1.15;
}

/* Bootstrap's .ratio > * rule stretches children across the whole image. */
.ratio > .post-author-overlay {
    top: auto;
    right: .75rem;
    bottom: .75rem;
    left: auto;
    width: fit-content;
    height: auto;
    aspect-ratio: auto;
}

.post-author-overlay-avatar {
    display: block;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 48%);
    border-radius: 50%;
    background: rgb(255 255 255 / 12%);
}

.post-author-overlay-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-author-overlay-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: .24rem;
    min-width: 0;
}

.post-author-overlay-name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: .75rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

.post-author-overlay-name:hover,
.post-author-overlay-name:focus-visible { color: #fff; text-decoration: underline; }
.post-author-overlay-role {
    display: flex;
    align-items: center;
    gap: .32rem;
    min-width: 0;
    color: rgb(255 255 255 / 78%);
}

.post-author-overlay-role .premium-badge {
    display: inline-flex;
    flex: 0 0 14px;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--premium-badge-color) 40%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--premium-badge-color) 18%, transparent);
    line-height: 1;
}

.post-author-overlay-role .premium-badge .badge-icon,
.post-author-overlay-role .premium-badge svg,
.post-author-overlay-role .premium-badge i {
    display: block;
    width: 8px;
    height: 8px;
}

.post-author-overlay-role-name {
    overflow: hidden;
    font-size: .6rem;
    font-weight: 500;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-item-small .post-author-overlay { top: auto; right: .25rem; bottom: .25rem; left: auto; gap: .3rem; max-width: calc(100% - .5rem); padding: .2rem .36rem .2rem .2rem; border-radius: 9px; }
.post-item-small .ratio > .post-author-overlay { top: auto; right: .25rem; bottom: .25rem; left: auto; }
.post-item-small .post-author-overlay-avatar { flex-basis: 22px; width: 22px; height: 22px; }
.post-item-small .post-author-overlay-info { gap: .16rem; }
.post-item-small .post-author-overlay-name { font-size: .62rem; }
.post-item-small .post-author-overlay-role { gap: .2rem; }
.post-item-small .post-author-overlay-role .premium-badge { flex-basis: 11px; width: 11px; height: 11px; }
.post-item-small .post-author-overlay-role .premium-badge .badge-icon,
.post-item-small .post-author-overlay-role .premium-badge svg,
.post-item-small .post-author-overlay-role .premium-badge i { width: 7px; height: 7px; }
.post-item-small .post-author-overlay-role-name { font-size: .52rem; }

.post-author-role {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
    color: inherit;
    opacity: .78;
    line-height: 1;
}

.post-author-role .premium-badge {
    display: inline-flex;
    flex: 0 0 15px;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--premium-badge-color) 38%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--premium-badge-color) 12%, transparent);
}

.post-author-role .premium-badge .badge-icon,
.post-author-role .premium-badge svg,
.post-author-role .premium-badge i {
    display: block;
    width: 8px;
    height: 8px;
}

.post-author-role-name {
    overflow: hidden;
    font-size: .68rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Role and badge labels must not inherit a custom font with an incomplete or
   incorrect Turkish glyph map (for example, rendering Ü as U). */
.premium-badge,
.post-author-role-name,
.post-author-overlay-role-name,
.writers-scope .writer-role-line {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.post-author-overlay-role .premium-badge,
.post-author-role .premium-badge,
.writers-scope .writer-role-line .premium-badge {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.post-details-author {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
}

.post-details-author-avatar { display: block; flex: 0 0 auto; }
.post-details-author-avatar img { display: block; }
.post-details-author-info { display: flex; min-width: 0; flex-direction: column; gap: .2rem; }
.post-details-author-name { color: inherit; font-weight: 600; text-decoration: none; }
.post-details-author-name:hover,
.post-details-author-name:focus-visible { text-decoration: underline; }
.post-details-author .post-author-role { gap: .28rem; }
.post-details-author .post-author-role-name { font-size: .62rem; }

.about-author-identity { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; margin-bottom: .5rem; }
.about-author .about-author-identity .username { margin-bottom: 0; }
.about-author .post-author-role-name { font-size: .68rem; }

@media (max-width: 575.98px) {
    .post-author-overlay,
    .ratio > .post-author-overlay {
        top: auto;
        right: .45rem;
        bottom: .45rem;
        left: auto;
        gap: .32rem;
        max-width: calc(100% - .9rem);
        padding: .2rem .42rem .2rem .2rem;
        border-radius: 10px;
    }

    .post-author-overlay-avatar { flex-basis: 22px; width: 22px; height: 22px; }
    .post-author-overlay-info { gap: .14rem; }
    .post-author-overlay-name { font-size: .64rem; }
    .post-author-overlay-role { gap: .2rem; }
    .post-author-overlay-role .premium-badge { flex-basis: 11px; width: 11px; height: 11px; }
    .post-author-overlay-role .premium-badge .badge-icon,
    .post-author-overlay-role .premium-badge svg,
    .post-author-overlay-role .premium-badge i { width: 7px; height: 7px; }
    .post-author-overlay-role-name { font-size: .53rem; }
}

/* The homepage hero has image text at the bottom, so keep its author marker top-right. */
.blogya-home-featured .post-author-overlay,
.blogya-home-featured .ratio > .post-author-overlay {
    top: .75rem;
    right: .75rem;
    bottom: auto;
    left: auto;
}

@media (max-width: 575.98px) {
    .blogya-home-featured .post-author-overlay,
    .blogya-home-featured .ratio > .post-author-overlay {
        top: .45rem;
        right: .45rem;
        bottom: auto;
        left: auto;
    }
}

/* Keep author identity in the same horizontal arrangement used on homepage cards. */
.post-details-meta .post-details-author {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: .55rem;
}
.post-details-meta .post-details-author-avatar { display: block !important; flex: 0 0 auto !important; }
.post-details-meta .post-details-author-avatar img { display: block !important; }
.post-details-meta .post-details-author-info {
    display: flex !important;
    min-width: 0;
    flex-direction: column !important;
    align-items: flex-start;
    gap: .2rem;
}
.post-details-meta .post-author-role {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    white-space: nowrap;
}
@media (max-width: 767.98px) {
    .post-details-meta {
        text-align: left !important;
    }
    .post-details-meta .post-details-author {
        display: inline-flex !important;
        align-self: flex-start !important;
        justify-content: flex-start !important;
        width: fit-content !important;
        max-width: 100%;
        margin: 0 !important;
        text-align: left !important;
    }
}
.mobile-nav-wrapper .user-details .mobile-user-role {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
    line-height: 1.25;
}
.mobile-nav-wrapper .mobile-user-role .premium-badge {
    display: inline-flex;
    flex: 0 0 15px;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    padding: 0;
}
.mobile-nav-wrapper .mobile-user-role .premium-badge .badge-icon,
.mobile-nav-wrapper .mobile-user-role .premium-badge svg,
.mobile-nav-wrapper .mobile-user-role .premium-badge i {
    display: block;
    width: 8px;
    height: 8px;
}
.mobile-nav-wrapper .mobile-user-role-name { min-width: 0; }

.swal2-popup.blogya-swal-popup {
    border: 1px solid var(--bs-border-color, #e5e5e5);
    border-radius: 1rem;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #222);
    box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, .2);
}
.swal2-popup.blogya-swal-popup .swal2-title,
.swal2-popup.blogya-swal-popup .swal2-html-container { color: var(--bs-body-color, #222); }
.swal2-popup.blogya-swal-popup .swal2-confirm.blogya-swal-confirm {
    border-radius: .65rem;
    font-weight: 650;
}
.swal2-popup.blogya-swal-popup .swal2-cancel.blogya-swal-cancel { border-radius: .65rem; }
.swal2-popup.blogya-swal-toast { border-radius: .8rem; box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .2); }
