.post-editor-card {
    max-width: 1180px;
}

.post-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.post-contexts {
    display: grid;
    gap: 12px;
    margin: 0;
    border: 0;
    padding: 0;
}

.post-contexts legend {
    color: var(--pp-ink);
    font-weight: 950;
}

.post-contexts__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.post-context-pill {
    position: relative;
    cursor: pointer;
}

.post-context-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.post-context-pill span {
    display: grid;
    gap: 4px;
    min-height: 74px;
    border: 1px solid rgba(91, 126, 178, 0.18);
    border-radius: 18px;
    background: rgba(245, 250, 255, 0.86);
    padding: 14px 16px;
    color: var(--pp-muted);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.post-context-pill strong {
    color: var(--pp-ink);
    font-weight: 950;
}

.post-context-pill small {
    line-height: 1.35;
    font-weight: 780;
}

.post-context-pill:hover span,
.post-context-pill input:checked + span {
    transform: translateY(-1px);
    border-color: rgba(65, 136, 245, 0.5);
    background: linear-gradient(115deg, rgba(106, 214, 247, 0.24), rgba(65, 136, 245, 0.12), rgba(151, 107, 234, 0.08));
    box-shadow: 0 14px 24px rgba(65, 136, 245, 0.12);
}

.post-context-pill input:checked + span strong {
    color: var(--pp-blue);
}

.post-fb-toggle {
    max-width: none;
    grid-template-columns: 50px minmax(0, 1fr);
    align-items: start;
    border: 1px solid rgba(91, 126, 178, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    padding: 14px 16px;
}

.post-fb-toggle .profile-toggle__slider {
    margin-top: 2px;
}

.post-fb-toggle__text {
    display: grid;
    gap: 5px;
}

.post-fb-toggle__text strong {
    color: var(--pp-ink);
    line-height: 1.25;
}

.post-fb-toggle__text small {
    color: var(--pp-muted);
    line-height: 1.4;
    font-weight: 780;
}

.post-fb-toggle input:checked ~ .post-fb-toggle__text strong {
    color: var(--pp-blue);
}

.post-type-list {
    display: grid;
    gap: 12px;
}

.post-type-card {
    border: 1px solid rgba(91, 126, 178, 0.18);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(237, 250, 255, 0.78));
    box-shadow: 0 16px 34px rgba(17, 43, 74, 0.06);
    overflow: hidden;
}

.post-type-card[hidden] {
    display: none;
}

.post-type-card summary {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    margin: 8px;
    border: 1px solid rgba(106, 214, 247, 0.34);
    border-radius: 18px;
    background:
        linear-gradient(100deg, rgba(106, 214, 247, 0.26), rgba(65, 136, 245, 0.1) 58%, rgba(246, 140, 203, 0.12)),
        rgba(255, 255, 255, 0.72);
    padding: 10px 12px 10px 18px;
    color: var(--pp-ink);
    cursor: pointer;
    list-style: none;
    box-shadow: 0 12px 28px rgba(65, 136, 245, 0.08);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.post-type-card summary::-webkit-details-marker {
    display: none;
}

.post-type-card summary::after {
    content: "v";
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--pp-blue);
    font-size: 0.78rem;
    font-weight: 950;
    box-shadow: 0 8px 18px rgba(65, 136, 245, 0.12);
    transition: transform 0.18s ease, background 0.16s ease, color 0.16s ease;
}

.post-type-card summary:hover {
    transform: translateY(-1px);
    border-color: rgba(65, 136, 245, 0.48);
    background:
        linear-gradient(100deg, rgba(106, 214, 247, 0.36), rgba(65, 136, 245, 0.16) 58%, rgba(246, 140, 203, 0.16)),
        rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 32px rgba(65, 136, 245, 0.12);
}

.post-type-card summary:hover::after {
    background: var(--pp-gradient);
    color: #fff;
}

.post-type-card[open] summary::after {
    transform: rotate(180deg);
}

.post-type-card summary span:first-child {
    display: grid;
    gap: 5px;
}

.post-type-card summary strong {
    color: var(--pp-ink);
    font-size: 1.05rem;
    font-weight: 950;
}

.post-type-card summary small {
    color: var(--pp-muted);
    font-weight: 780;
}

.post-type-card__status {
    display: inline-grid;
    min-width: 74px;
    min-height: 32px;
    place-items: center;
    border-radius: 999px;
    background: rgba(106, 214, 247, 0.16);
    color: var(--pp-blue);
    font-size: 0.82rem;
    font-weight: 950;
}

.post-type-card.is-selected .post-type-card__status {
    background: var(--pp-gradient);
    color: #fff;
    box-shadow: 0 10px 18px rgba(65, 136, 245, 0.16);
}

.post-type-card.is-selected .post-type-card__status::before {
    content: "Izbrano";
}

.post-type-card.is-selected .post-type-card__status {
    font-size: 0;
}

.post-type-card.is-selected .post-type-card__status::before {
    font-size: 0.82rem;
}

.post-type-card[open] {
    border-color: rgba(65, 136, 245, 0.34);
    box-shadow: 0 18px 34px rgba(65, 136, 245, 0.11);
}

.post-type-card__body {
    border-top: 1px solid rgba(91, 126, 178, 0.12);
    padding: 18px;
}

.post-type-card__body textarea[name="body"] {
    min-height: 220px;
}

.post-images-panel {
    display: grid;
    gap: 10px;
    border: 1px solid rgba(91, 126, 178, 0.14);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    padding: 14px;
}

.post-images-panel__title {
    color: var(--pp-ink);
    font-weight: 950;
}

.post-images-panel__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.post-images-panel .field-note:empty {
    display: none;
}

@media (max-width: 980px) {
    .post-contexts__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .post-contexts__grid {
        grid-template-columns: 1fr;
    }

    .post-type-card summary {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .post-type-card summary::after {
        grid-column: 2;
        grid-row: 1;
    }

    .post-type-card__status {
        grid-column: 1 / -1;
        width: max-content;
    }
}
