/* =========================================
   Admin dashboard: блок новостей на дашборде
   ========================================= */

.admin-news-draft {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-news-draft > .admin-quick-actions__grid {
    margin: 0;
}

.project-news-admin-panel {
    display: grid;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.10);
    background:
        radial-gradient(circle at top right, rgba(80, 190, 120, 0.12), transparent 42%),
        rgba(25, 146, 65, 0.18);
}

.project-news-admin-panel .admin-section__head {
    margin: 0;
}

.project-news-admin-panel .admin-section__title {
    line-height: 1.2;
}

/* =========================================
   Admin: новости проекта
   ========================================= */

.admin-news-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.45fr);
    gap: 16px;
    align-items: start;
}

.admin-news-create,
.admin-news-list-card {
    padding: 18px;
}

.admin-news-create {
    position: sticky;
    top: 18px;
}

.admin-news-list {
    display: grid;
    gap: 12px;
}

.admin-news-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.admin-news-item__main {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.admin-news-item__top,
.admin-news-item__meta,
.admin-news-item__reactions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-news-item__title {
    margin: 0;
    color: rgba(255,255,255,0.96);
    font-size: 19px;
    line-height: 1.3;
}

.admin-news-item__body {
    color: rgba(255,255,255,0.76);
    font-size: 14px;
    line-height: 1.55;
}

.admin-news-item__meta,
.admin-news-item__reactions {
    color: rgba(255,255,255,0.70);
    font-size: 13px;
    line-height: 1.35;
}

.admin-news-item__meta strong,
.admin-news-item__reactions strong {
    color: rgba(255,255,255,0.94);
    font-weight: 400;
}

.admin-news-item__actions {
    display: flex;
    justify-content: flex-end;
}

.admin-news-item__actions form {
    margin: 0;
}

/* =========================================
   Project news: форма быстрого объявления
   ========================================= */

.project-news-admin-form {
    display: grid;
    gap: 12px;
}

.project-news-admin-form__select-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.project-news-admin-form__field {
    display: grid;
    gap: 6px;
    min-width: 0;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
}

.project-news-admin-form__field input,
.project-news-admin-form__field select,
.project-news-admin-form__field textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    color: inherit;
    outline: none;
}

.project-news-admin-form__field input:focus,
.project-news-admin-form__field select:focus,
.project-news-admin-form__field textarea:focus {
    border-color: rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

.project-news-admin-form__field select {
    color: rgba(255,255,255,0.92);
    color-scheme: dark;
    cursor: pointer;
}

.project-news-admin-form__field select option {
    background: #252b3a;
    color: #f8fafc;
}

.project-news-admin-form__field select option:checked {
    background: #4056c9;
    color: #ffffff;
}

.project-news-admin-form__field textarea {
    resize: vertical;
    min-height: 92px;
}

.project-news-admin-form__actions {
    display: grid;
    gap: 10px;
}

.project-news-admin-form__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 42px;
    box-sizing: border-box;

    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);

    font: inherit;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 400;
    text-align: center;
    text-decoration: none;

    cursor: pointer;
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.project-news-admin-form__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.14);
}

.project-news-admin-form__button--publish {
    background: rgba(69, 199, 91, 0.94);
    border-color: rgba(255,255,255,0.72);
    color: #1f2937;
}

.project-news-admin-form__button--publish:hover {
    background: #96f396;
    color: #111827;
}

.project-news-admin-form__button--link {
    background: rgba(51, 64, 92, 0.96);
    border-color: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.94);
}

.project-news-admin-form__button--link:hover {
    background: rgba(64, 79, 116, 0.98);
    border-color: rgba(255,255,255,0.14);
    color: #ffffff;
}

/* =========================================
   Admin dashboard: последние новости + реакции
   ========================================= */

.admin-news-draft__latest {
    display: grid;
    gap: 7px;
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.admin-news-draft__latest-title {
    color: rgba(255,255,255,0.78);
    font-size: 13px;
    font-weight: 800;
}

.admin-news-draft__latest-item {
    display: grid;
    gap: 7px;
    min-width: 0;
    max-width: 100%;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.045);
    font-size: 13px;
    line-height: 1.35;
    box-sizing: border-box;
}

.admin-news-draft__latest-item-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
    min-width: 0;
}

.admin-news-draft__latest-name {
    min-width: 0;
    max-width: 100%;
    color: rgba(255,255,255,0.88);
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.admin-news-draft__latest-status {
    flex: 0 0 auto;
    white-space: nowrap;
    color: rgba(255,255,255,0.56);
    font-size: 12px;
    line-height: 1.35;
}

.admin-news-draft__latest-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 7px;
    color: rgba(255,255,255,0.58);
    font-size: 11px;
    line-height: 1.25;
}

.admin-news-draft__latest-stats span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 21px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.055);
    white-space: nowrap;
}

.admin-news-draft__latest-stats strong {
    color: rgba(255,255,255,0.88);
    font-weight: 400;
}

/* =========================================
   Project news: текущая новость и история
   ========================================= */

.project-news-card {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(var(--journey-accent-rgb, 99, 215, 196), 0.28);
    background:
        radial-gradient(circle at top right, rgba(var(--journey-accent-rgb, 99, 215, 196), 0.13), transparent 38%),
        rgba(28, 36, 50, 0.54);
    box-shadow:
        0 16px 38px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.project-news-card::before {
    content: "";
    position: absolute;
    inset: 14px auto 14px 0;
    width: 4px;
    border-radius: 0 8px 8px 0;
    background: rgba(var(--journey-accent-rgb, 99, 215, 196), 0.78);
}

.project-news-card--important {
    border-color: rgba(251, 191, 36, 0.34);
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.16), transparent 38%),
        rgba(48, 39, 25, 0.66);
}

.project-news-card--feedback {
    border-color: rgba(169, 139, 255, 0.34);
    background:
        radial-gradient(circle at top right, rgba(169, 139, 255, 0.16), transparent 38%),
        rgba(34, 32, 54, 0.66);
}

.project-news-card__main {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
}

.project-news-card__top {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.project-news-card__type,
.project-news-card__pin,
.project-news-card__date,
.project-news-card__state {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    font-weight: 400;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.78);
}

.project-news-card__type {
    color: rgba(255,255,255,0.94);
    background: rgba(var(--journey-accent-rgb, 99, 215, 196), 0.16);
    border-color: rgba(var(--journey-accent-rgb, 99, 215, 196), 0.24);
}

.project-news-card__pin {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.13);
    border-color: rgba(245, 158, 11, 0.24);
}

.project-news-card__title {
    margin: 0;
    color: rgba(255,255,255,0.98);
    font-size: 22px;
    line-height: 1.25;
}

.project-news-card__body {
    color: rgba(255,255,255,0.82);
    font-size: 15px;
    line-height: 1.65;
}

.project-news-card__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.project-news-card__actions form {
    margin: 0;
}

.project-news-card__dismiss {
    margin-left: auto;
}

.project-news-card__dismiss button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.72);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.project-news-card__dismiss button:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.project-news-history {
    display: grid;
    gap: 18px;
}

.project-news-history__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.project-news-history__list {
    display: grid;
    gap: 14px;
}

.project-news-card--history {
    margin: 0;
}

/* =========================================
   Project news: компактные реакции
   ========================================= */

.project-news-reactions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.project-news-reactions form {
    margin: 0;
    width: auto;
}

.project-news-reaction {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    width: auto;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.86);
    font: inherit;
    font-size: 13px;
    line-height: 1;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        transform 0.16s ease,
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
}

.project-news-reaction:hover {
    transform: translateY(-1px);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(0,0,0,0.16);
}

.project-news-reaction--read {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.13);
    border-color: rgba(34, 197, 94, 0.26);
}

.project-news-reaction--read:hover {
    background: rgba(34, 197, 94, 0.20);
    border-color: rgba(34, 197, 94, 0.38);
}

.project-news-reaction--useful {
    color: #fae950;
    background: rgba(247, 148, 56, 0.13);
    border-color: rgba(190, 151, 80, 0.28);
}

.project-news-reaction--useful:hover {
    background: rgba(190, 179, 80, 0.20);
    border-color: rgba(190, 179, 80, 0.40);
}

.project-news-reaction--details {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.13);
    border-color: rgba(59, 130, 246, 0.28);
}

.project-news-reaction--details:hover {
    background: rgba(59, 130, 246, 0.20);
    border-color: rgba(59, 130, 246, 0.40);
}

.project-news-reaction--question {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.13);
    border-color: rgba(245, 158, 11, 0.28);
}

.project-news-reaction--question:hover {
    background: rgba(245, 158, 11, 0.20);
    border-color: rgba(245, 158, 11, 0.40);
}

.project-news-reaction--muted {
    color: rgba(255,255,255,0.66);
    background: rgba(255,255,255,0.055);
    border-color: rgba(255,255,255,0.08);
}

.project-news-reaction--muted:hover {
    color: rgba(255,255,255,0.88);
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.14);
}

.project-news-reaction--all {
    color: rgba(255,255,255,0.82);
    background: rgba(109, 93, 252, 0.13);
    border-color: rgba(109, 93, 252, 0.28);
}

.project-news-reaction--all:hover {
    background: rgba(109, 93, 252, 0.20);
    border-color: rgba(109, 93, 252, 0.40);
}

/* =========================================
   Адаптация
   ========================================= */

@media (max-width: 1180px) {
    .admin-news-layout {
        grid-template-columns: 1fr;
    }

    .admin-news-create {
        position: static;
    }
}

@media (max-width: 760px) {
    .project-news-card {
        padding: 16px;
        border-radius: 18px;
    }

    .project-news-card__title {
        font-size: 19px;
    }

    .project-news-card__actions {
        align-items: center;
        flex-direction: row;
        gap: 8px;
    }

    .project-news-reactions {
        width: auto;
        flex: 1 1 auto;
    }

    .project-news-card__actions .project-news-reactions form {
        width: auto;
    }

    .project-news-card__actions .project-news-reaction {
        width: auto;
    }

    .project-news-card__dismiss {
        width: auto;
        margin-left: 0;
    }

    .project-news-card__dismiss button {
        width: 34px;
        border-radius: 999px;
    }
}

@media (max-width: 520px) {
    .project-news-admin-form__select-row {
        grid-template-columns: 1fr;
    }
}