/* Карточки списков «Мы Минполит» */

.plc-scope-tabs,
.plc-rota-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0 0 1rem;
}

.plc-scope-tab,
.plc-rota-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(80, 70, 50, 0.22);
    background: #f3f0e8;
    color: #2f3439;
    text-decoration: none;
    font-size: 0.95rem;
}

.plc-scope-tab.is-active,
.plc-rota-tab.is-active {
    background: #2f6b4f;
    border-color: #2f6b4f;
    color: #fff;
}

.plc-count {
    font-size: 0.95rem;
}

.plc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.plc-about-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.plc-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.plc-card {
    position: relative;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) 140px;
    column-gap: 0.9rem;
    row-gap: 0.45rem;
    align-items: start;
    padding: 0.85rem 0.35rem 0.95rem;
    background: #fff8df;
    border-top: 1px solid rgba(120, 110, 90, 0.35);
    border-bottom: 1px solid rgba(120, 110, 90, 0.35);
    overflow: visible;
}

.plc-card + .plc-card {
    border-top: 0;
}

.plc-card-left,
.plc-card-right {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 140px;
}

.plc-card-left {
    grid-column: 1;
}

.plc-card-main {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-top: 0.1rem;
}

.plc-card-right {
    grid-column: 3;
}

.plc-photo {
    position: relative;
    margin: 0;
    width: 140px;
    height: 140px;
    background: #d7d7d7;
    border: 1px solid rgba(255, 255, 255, 0.85);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: zoom-in;
}

.plc-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.plc-photo--empty {
    padding: 0.5rem;
    font-size: 0.72rem;
    line-height: 1.3;
    color: #555;
    text-align: center;
    cursor: default;
}

/* Лайтбокс фото ×3 */
.plc-photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.plc-photo-lightbox[hidden] {
    display: none !important;
}

.plc-photo-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 18, 14, 0.72);
    cursor: zoom-out;
}

.plc-photo-lightbox-img {
    position: relative;
    z-index: 1;
    width: min(420px, 92vw);
    height: min(420px, 92vw);
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    cursor: zoom-out;
    background: #111;
}

.plc-photo-lightbox-x {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    z-index: 2;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

/* Траурная полоска на фото (правый нижний угол), не на карточке */
.plc-mourning-ribbon {
    position: absolute;
    right: -22px;
    bottom: 18px;
    width: 78px;
    height: 11px;
    background: #111;
    transform: rotate(-45deg);
    transform-origin: center center;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}

.plc-card--deceased {
    background: #f4f1ea;
}


.plc-card-name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #2f3439;
    line-height: 1.2;
}

.plc-card-aff {
    margin: 0.2rem 0 0.45rem;
    font-size: 1.02rem;
    font-weight: 700;
    color: #3a4046;
}

.plc-card-bio {
    flex: 1 1 auto;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #444;
    text-align: justify;
}

.plc-bio-more {
    display: inline;
    margin-left: 0.15rem;
    padding: 0;
    border: 0;
    background: none;
    color: #5a6b3a;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.plc-bio-more:hover {
    color: #3f4c28;
}

.plc-bio-modal-dialog {
    max-width: 36rem;
}

.plc-bio-modal-body {
    white-space: pre-wrap;
    font-size: 1rem;
    line-height: 1.55;
    color: #333;
    max-height: 70vh;
    overflow: auto;
}

.plc-card-status {
    font-size: 0.9rem;
    line-height: 1.3;
    color: #5a6066;
    width: 100%;
}

.plc-card-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem 0.75rem;
    margin-top: 0.55rem;
}

.plc-card-links a {
    font-size: 0.88rem;
    color: #1d5f9c;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.plc-card-edit {
    border: 1px solid #6a6a6a;
    background: #f0f0f0;
    color: #222;
    padding: 0.4rem 0.65rem;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    width: 100%;
}

.plc-card-edit:hover {
    background: #e4e4e4;
}

body.plc-modal-open {
    overflow: hidden;
}

/* Модалка правок */
.plc-modal[hidden] {
    display: none !important;
}

.plc-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.plc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 14, 10, 0.55);
}

.plc-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: #fffef8;
    border-radius: 10px;
    padding: 1.15rem 1.25rem 1.25rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.plc-modal-x {
    position: absolute;
    top: 0.4rem;
    right: 0.65rem;
    border: 0;
    background: transparent;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.plc-modal-title {
    margin: 0 1.5rem 0.35rem 0;
    font-size: 1.25rem;
}

.plc-modal-lead {
    color: #666;
    font-size: 0.92rem;
    margin-bottom: 0.85rem;
}

.plc-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.article-lists-btn,
.mg-lists-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.15rem;
    border-radius: 999px;
    background: #5a6b3a;
    border: 1px solid #4a5a30;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.article-lists-btn:hover,
.mg-lists-btn:hover {
    background: #4a5a30;
    color: #fff !important;
}

.mg-section-head,
.news-magazine-masthead.mg-section-head {
    position: relative;
}

.mg-section-head .mg-lists-btn,
.news-magazine-masthead.mg-section-head .mg-lists-btn {
    position: absolute;
    top: 0.15rem;
    right: 0;
    z-index: 2;
}

.plc-card-edit--login {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-size: 0.82rem;
    line-height: 1.25;
    padding: 0.4rem 0.5rem;
}

@media (max-width: 767px) {
    .mg-section-head .mg-lists-btn,
    .news-magazine-masthead.mg-section-head .mg-lists-btn {
        position: static;
        margin: 0.5rem auto 0;
        display: inline-flex;
    }
}

@media (max-width: 767px) {
    .plc-card {
        grid-template-columns: 1fr 1fr;
        padding: 0.75rem 0.25rem 1rem;
    }

    .plc-card-left,
    .plc-card-right {
        width: 100%;
    }

    .plc-card-left {
        grid-column: 1;
        grid-row: 1;
    }

    .plc-card-right {
        grid-column: 2;
        grid-row: 1;
    }

    .plc-photo,
    .plc-photo--left,
    .plc-photo--right {
        width: 100%;
        height: 42vw;
        max-height: 180px;
    }

    .plc-card-main {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .plc-card-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
