.news-widget {
  width: 100%;
  color: #0f172a;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.news-widget * {
  box-sizing: border-box;
}

.news-widget button,
.news-widget input,
.news-widget textarea,
.news-widget select {
  font: inherit;
}

.news-widget__inner {
  width: 100%;
  margin: 0;
  padding: 0;
}

.news-widget svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.news-tabs {
  display: flex;
  align-items: flex-end;
  gap: clamp(28px, 5vw, 62px);
  min-height: 52px;
  margin: 0 0 18px;
  padding: 0 4px;
  border-bottom: 1px solid #dfe9f5;
}

.news-tab {
  position: relative;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #19233d;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.news-tab.active {
  color: #0068ff;
}

.news-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: #0068ff;
}

.news-tab span {
  min-width: 27px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e4ebf4;
  color: #6a7892;
  font-size: 13px;
}

.news-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.82fr) minmax(520px, 1fr);
  gap: 18px;
  align-items: start;
}

.news-create-card,
.news-post,
.news-feed-top {
  border: 1px solid #e4edf8;
  background: #fff;
  box-shadow: 0 12px 34px rgba(37, 75, 118, 0.08);
}

.news-create-card {
  padding: 24px;
  border-radius: 16px;
}

.news-create-card--inline {
  margin: 0;
  box-shadow: none;
}

.news-create-card h3 {
  margin: 0 0 20px;
  color: #101b3a;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0;
}

.news-author,
.news-author-main,
.post-head,
.post-author-main,
.post-footer,
.post-metrics,
.post-footer-actions {
  display: flex;
  align-items: center;
}

.news-author {
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 22px;
}

.news-author-main,
.post-author-main {
  gap: 14px;
  min-width: 0;
}

.news-avatar,
.post-head img {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #4fa8e9, #5cb6ec);
}

.post-head img {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
}

.news-avatar-fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}

.news-author strong,
.post-head strong {
  display: block;
  color: #111b36;
  font-size: 15px;
  line-height: 1.25;
}

.news-author p,
.post-head p,
.post-head span {
  margin: 5px 0 0;
  color: #667392;
  font-size: 14px;
  line-height: 1.25;
}

.news-author-chevron {
  display: inline-flex;
  vertical-align: -4px;
  margin-left: 4px;
  color: #20314f;
}

.news-author-chevron svg {
  width: 14px;
  height: 14px;
}

.news-title-shell,
.news-textarea-shell {
  position: relative;
  width: 100%;
  border: 1px solid #dbe6f4;
  background: #fff;
}

.news-title-shell {
  height: 52px;
  display: flex;
  align-items: center;
  margin: 0 0 14px;
  border-radius: 12px;
}

.news-title-input,
.news-textarea {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #101b3a;
  font-size: 15px;
  font-weight: 400;
}

.news-title-input {
  height: 100%;
  padding: 0 72px 0 18px;
}

.news-title-shell span,
.news-body-count {
  position: absolute;
  right: 16px;
  color: #72809b;
  font-size: 14px;
  font-weight: 600;
}

.news-title-shell span {
  top: 50%;
  transform: translateY(-50%);
}

.news-textarea-shell {
  min-height: 260px;
  margin: 0 0 20px;
  border-radius: 12px;
  overflow: hidden;
}

.news-textarea {
  min-height: 170px;
  max-height: 420px;
  resize: none;
  padding: 18px 18px 42px;
  line-height: 1.55;
}

.news-body-count {
  right: 18px;
  bottom: 76px;
}

.news-title-shell:focus-within,
.news-textarea-shell:focus-within,
.news-upload:hover,
.news-visibility-select:focus-within,
.news-sort:focus {
  border-color: #0b72ff;
  box-shadow: 0 0 0 4px rgba(11, 114, 255, 0.10);
}

.news-actions {
  min-height: 67px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  border-top: 1px solid #e4edf8;
}

.news-tool {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 0;
  border: 0;
  background: transparent;
  color: #233654;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.news-tool svg {
  color: #0068ff;
}

.news-tool--dots {
  margin-left: auto;
  width: 34px;
}

.news-tool:hover,
.post-share:hover,
.post-menu:hover {
  color: #0068ff;
}

.news-upload {
  min-height: 132px;
  display: grid;
  place-items: center;
  gap: 6px;
  margin: 0 0 26px;
  padding: 18px;
  border: 1px dashed #cbd9eb;
  border-radius: 14px;
  background: #fbfdff;
  color: #667392;
  text-align: center;
  cursor: pointer;
}

.news-upload.is-dragover {
  border-color: #0b72ff;
  background: #f2f8ff;
}

.news-upload-mark {
  display: inline-grid;
  place-items: center;
  color: #0068ff;
}

.news-upload-mark svg {
  width: 28px;
  height: 28px;
}

.news-upload p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.news-upload strong {
  color: #0068ff;
  font-weight: 700;
}

.news-upload small {
  color: #8795ad;
  font-size: 14px;
}

.news-upload-preview {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.news-upload-preview img {
  width: 100%;
  height: auto;
  max-height: 240px;
  border-radius: 12px;
  object-fit: contain;
  background: #f5f9ff;
}

.news-create-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.news-visibility-select {
  height: 52px;
  flex: 1 1 246px;
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid #dbe6f4;
  border-radius: 10px;
  background: #fff;
  color: #253653;
  font-size: 14px;
  font-weight: 700;
}

.news-visibility-select > svg:first-child {
  color: #5d6a82;
}

.news-visibility-select > svg:last-child {
  width: 15px;
  height: 15px;
  margin-left: 2px;
}

.news-visibility-select select {
  min-width: 96px;
  border: 0;
  outline: none;
  appearance: none;
  background: transparent;
  color: #233654;
  font-weight: 700;
  cursor: pointer;
}

.news-create-submit {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 206px;
  min-width: 0;
}

.publish-split {
  height: 52px;
  width: 100%;
  min-width: 0;
  display: inline-flex;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg, #0b72ff, #0665ee);
  box-shadow: 0 10px 22px rgba(6, 101, 238, 0.22);
}

.publish-btn,
.publish-menu-btn,
.news-empty button,
.draft-publish-btn {
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.publish-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 24px;
  font-size: 15px;
}

.publish-menu-btn {
  width: 52px;
  display: inline-grid;
  place-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.32);
}

.news-cancel-btn {
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid #dbe6f4;
  border-radius: 10px;
  background: #fff;
  color: #253653;
  font-weight: 700;
  cursor: pointer;
}

.news-feed {
  display: block;
  min-width: 0;
}

.news-feed-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 8px;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 12px 34px rgba(37, 75, 118, 0.08);
}

.news-feed-top h3 {
  margin: 0;
  color: #101b3a;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0;
}

.news-sort {
  min-width: 150px;
  height: 36px;
  padding: 0 2px 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #667392;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.news-feed [data-news-feed] {
  display: grid;
  gap: 12px;
}

.news-feed-top + [data-news-feed] .news-post:first-child {
  border-top: 0;
  border-radius: 0 0 16px 16px;
  padding-top: 12px;
}

.news-post {
  position: relative;
  padding: 20px 22px;
  border-radius: 16px;
}

.post-head {
  position: relative;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.post-head span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.post-head span svg {
  width: 14px;
  height: 14px;
}

.post-menu {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #263a5a;
  cursor: pointer;
}

.post-menu-popover {
  position: absolute;
  z-index: 5;
  right: 12px;
  top: 46px;
  width: 168px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #e4edf8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.post-menu-popover[hidden] {
  display: none;
}

.post-menu-popover button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #344054;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.post-menu-popover button:hover {
  background: #f3f8fe;
  color: #0068ff;
}

.post-menu-popover .is-danger {
  color: #d92d20;
}

.draft-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 0 12px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef2f6;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.draft-badge.is-submitted {
  background: #fff7d6;
  color: #9a6500;
}

.draft-badge.is-published {
  background: #dcf8ed;
  color: #168575;
}

.draft-badge.is-rejected {
  background: #ffe4e6;
  color: #be123c;
}

.draft-badge.is-needs_update {
  background: #fff1e8;
  color: #c2410c;
}

.news-post h3 {
  margin: 0 0 10px;
  color: #101b3a;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 650;
  letter-spacing: 0;
}

.news-post__body {
  max-width: 72ch;
  margin: 0 0 14px;
  color: #24324d;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  white-space: pre-wrap;
}

.post-media-grid {
  display: grid;
  gap: 8px;
  margin: 12px 0 14px;
}

.post-media-grid.count-1 {
  grid-template-columns: 1fr;
}

.post-media-grid.count-2,
.post-media-grid.count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-media-grid.count-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-media-grid.count-3 img:first-child {
  grid-row: span 2;
}

.post-media-grid img,
.post-media-grid.count-1 img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  background: #f5f9ff;
  display: block;
}

.document-card,
.schedule-box {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 0 14px;
  padding: 15px 18px;
  border-radius: 12px;
  background: #edf6ff;
  color: #101b3a;
}

.document-card svg,
.schedule-box > svg {
  width: 30px;
  height: 30px;
  color: #0068ff;
}

.document-card span,
.schedule-box span {
  display: block;
  margin-top: 4px;
  color: #384a68;
  font-size: 14px;
}

.post-footer {
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding-top: 6px;
}

.post-metrics {
  gap: 16px;
  color: #667392;
  font-size: 15px;
  font-weight: 600;
}

.post-reactions {
  display: inline-flex;
  align-items: center;
  margin-right: -8px;
}

.post-reactions span {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #0068ff;
  color: #fff;
}

.post-reactions span + span {
  margin-left: -4px;
  background: #ff5578;
}

.post-reactions svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.3;
}

.post-comments,
.post-share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.post-comments svg,
.post-share svg {
  width: 18px;
  height: 18px;
}

.post-footer-actions {
  justify-content: flex-end;
  gap: 10px;
}

.post-share {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #667392;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.draft-publish-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0b72ff, #0665ee);
  color: #fff;
  font-size: 14px;
}

.news-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 34px 20px;
  border: 1px dashed #cbd9eb;
  border-radius: 0 0 16px 16px;
  background: #fff;
  text-align: center;
}

.news-empty svg {
  width: 88px;
  height: 88px;
  color: #0b72ff;
}

.news-empty h3 {
  margin: 0;
  font-size: 20px;
}

.news-empty p {
  max-width: 420px;
  margin: 0;
  color: #667392;
  line-height: 1.55;
}

.news-empty button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0b72ff, #0665ee);
}

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

  .news-feed-top {
    border-radius: 16px;
    border-bottom: 1px solid #e4edf8;
    padding-bottom: 18px;
  }

  .news-feed-top + [data-news-feed] .news-post:first-child {
    border-top: 1px solid #e4edf8;
    border-radius: 16px;
    padding-top: 20px;
  }
}

@media (max-width: 720px) {
  .news-create-footer,
  .news-visibility-select,
  .publish-split,
  .publish-btn,
  .news-cancel-btn {
    width: 100%;
  }

  .news-tabs {
    gap: 18px;
    overflow-x: auto;
  }

  .news-create-card,
  .news-post {
    padding: 18px;
    border-radius: 14px;
  }

  .news-textarea-shell {
    min-height: 252px;
  }

  .news-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 12px 16px;
  }

  .news-tool {
    justify-content: flex-start;
  }

  .news-tool--dots {
    margin-left: 0;
    width: auto;
  }

  .news-create-footer,
  .news-create-submit,
  .post-footer,
  .post-footer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .post-metrics {
    justify-content: space-between;
  }

  .post-media-grid,
  .post-media-grid.count-2,
  .post-media-grid.count-3,
  .post-media-grid.count-4 {
    grid-template-columns: 1fr;
  }

  .post-media-grid img,
  .post-media-grid.count-1 img {
    height: auto;
  }
}
