.news {
    padding-block: 2rem 4rem;
}

section.content.news--posts {
    padding-inline: clamp(20px, calc(10vw - 44px), 100px);
}

.news__post {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: clamp(.67rem, 2.67vw, 2rem);
    align-items: start;
    border-bottom: 1px solid #dedede;
    padding-block: 2rem;
}

.news__post--text-only {
    grid-template-columns: minmax(0, 1fr);
}

.news__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.news__body {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.news__post h1,
.news__post h2 {
    margin-block: .4rem .75rem;
    color: var(--grey-dark-color);
    font-size: 1.75rem;
    font-weight: 800;
}

.news__editor {
    max-width: 42rem;
    border: 1px solid #dedede;
    padding: 1rem;
    margin-block: 1rem;
}

.news__editor summary,
.news button {
    cursor: pointer;
}

.news__editor form {
    display: grid;
    gap: .6rem;
    margin-top: 1rem;
}

.news__editor fieldset label {
    display: block;
    margin-block: .35rem;
}

.news__editor input:not([type="checkbox"]),
.news__editor textarea {
    width: 100%;
}

.news button {
    justify-self: start;
}

.news__status {
    padding: .8rem 1rem;
    background: #f2f4f5;
}

@media (max-width: 680px) {
    .news__post {
        grid-template-columns: 1fr;
    }
}

.news__admin {
    display: grid;
    place-items: center;
    min-height: 55vh;
}

.news__login {
    width: min(100%, 28rem);
    box-sizing: border-box;
    padding: clamp(1rem, 4vw, 2rem);
}

.news__login button {
    margin-top: 10px;
}

.news__edit-form {
    display: grid;
    gap: .6rem;
    border: 0;
    padding: 0;
    row-gap: 0;
}

.news__edit-form > label {
    margin-block: 20px .6rem;
}

.news__edit-form > label[for="Body"] {
    margin-block-start: 30px;
}

.news__edit-form .validation-summary-valid {
    display: none;
}

.news__editor input:not([type="checkbox"]),
.news__editor textarea {
    box-sizing: border-box;
    padding: 12px;
    background: #fff;
    color: #333;
    border: 1px solid #c4c4c4;
    border-radius: 4px;
    font: inherit;
    font-size: 16px;
}

.news__editor textarea {
    resize: vertical;
}

.news button,
.news .news__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 48px;
    box-sizing: border-box;
    padding: 10px 20px 10px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--news-button-background, var(--grey-light-color));
    color: var(--grey-dark-color);
    font: inherit;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
}

.news__editor input[type="file"] {
    padding: 0;
    background: transparent;
    border: 0;
}

.news__editor input[type="file"]::file-selector-button {
    min-height: 48px;
    margin-inline-end: .75rem;
    padding: 10px 20px 10px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--news-button-background, var(--grey-light-color));
    color: var(--grey-dark-color);
    font: inherit;
    cursor: pointer;
}

.news__editor input[type="file"]:is(:hover, :focus-visible)::file-selector-button {
    background-color: var(--grey-color);
    color: #fff;
}

.news .news__primary {
    background: var(--blue-color);
    color: var(--black-color);
}

.news :is(button, .news__button):is(:hover, :focus-visible) {
    background: var(--grey-color);
    color: #fff;
}

.news__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .75rem;
}

.news__heading {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.news__heading > h1,
.news__login > h1 {
    color: var(--grey-dark-color);
    font-size: 2.2rem;
    font-weight: 500;
    line-height: 1.15;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.06);
}

.news__heading-actions {
    margin-inline-start: auto;
    justify-content: flex-end;
}

.news__heading:has(+ .news__intro) > h1 {
    margin-block-end: calc(.33em - 10px);
}

.news__edit-form > fieldset {
    margin: 20px 0;
}

.news__post time {
    align-self: flex-start;
    background: var(--green-color);
    color: var(--grey-dark-color);
    border-radius: 4px;
    padding: 6px 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-block-end: 20px;
}

.news__post-content {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    background: var(--image-background-color);
    border-radius: 4px;
    padding: 20px;
}

.news__post-content > .news__actions {
    margin-top: auto;
    padding-top: 1.5rem;
}

.news__emoji {
    margin-top: .6rem;
    min-width: 0;
}

.news__emoji emoji-picker {
    width: 100%;
    box-sizing: border-box;
    margin-top: .6rem;
}

.news .news__icon {
    width: 1.1em;
    height: 1.1em;
    flex: none;
    vertical-align: -.16em;
}

.news :is(button, .news__button) {
    gap: .45em;
}

.news__language-actions {
    margin-block: 1rem;
}

.news__language-actions select {
    min-height: 48px;
    padding-inline: .75rem;
    font: inherit;
}

.news--editor {
    --news-button-background: var(--green-color);
}

.news--editor .news__cancel {
    --news-button-background: var(--grey-light-color);
}

.news--editor .news__edit-form > :is(.news__image-label, .news__removal) {
    margin-block-start: 2rem;
}

.news__file-picker:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news__file-picker button {
    flex-shrink: 0;
}

.news__file-name {
    box-sizing: border-box;
    flex: 1;
    min-width: 0;
    padding: 12px;
    border: 1px solid #c4c4c4;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news__text-actions {
    margin-top: .6rem;
}

.news__text-actions .news__emoji {
    margin-top: 0;
}

.news button[data-news-retranslate]:disabled {
    background: var(--grey-light-color);
    color: var(--grey-dark-color);
    opacity: .65;
    cursor: not-allowed;
}

.news__retranslate-status {
    align-self: center;
    font-size: .875rem;
}

.news__expiry-note {
    margin: .6rem 0 0;
}

.news__edit-actions {
    margin-top: 1rem;
}

.news .news__social-icon {
    width: 2.2em;
    height: 2.2em;
    object-fit: contain;
    vertical-align: middle;
}

.news__editor .news__sharing label:not([hidden]) {
    display: grid;
    grid-template-columns: 1.15rem 2.2em minmax(0, 1fr);
    align-items: center;
    gap: .65rem;
    margin-block: .9rem;
}

.news__editor .news__sharing label[hidden] {
    display: none;
}

.news__sharing input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    flex: none;
    accent-color: var(--green-color);
}

.news__editor .news__removal {
    padding: 0;
    border: 0;
    min-width: 0;
}

.news__removal legend {
    margin-block-end: .6rem;
    padding: 0;
}

.news__removal-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
    gap: .75rem;
}

.news__removal-fields input::-webkit-calendar-picker-indicator {
    padding: 5px;
    border-radius: 4px;
    background-color: var(--green-color);
    cursor: pointer;
}


.news button[data-news-retranslate-submit][hidden] {
    display: none;
}

.news__suggestion {
    width: min(50rem, calc(100% - 2rem));
    max-height: 85vh;
    box-sizing: border-box;
    border: 1px solid #c4c4c4;
    border-radius: 8px;
    padding: 1.25rem;
}

.news__suggestion::backdrop {
    background: rgb(0 0 0 / 55%);
}

.news__suggestion-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: 1rem;
}

.news__suggestion-columns p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.news button[data-news-improve]:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.news button[data-news-publish]:disabled {
    background: var(--grey-light-color);
    color: var(--grey-dark-color);
    opacity: .65;
    cursor: not-allowed;
}
