/* Small, intentional polish layer for the imported production build. */
:root {
  --mirbaa-border: rgb(17 24 39 / 18%);
  --mirbaa-soft: rgb(17 24 39 / 7%);
  --mirbaa-red: #ef4444;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  animation: site-enter 280ms ease-out both;
}

main {
  width: min(100%, 1440px);
  margin-inline: auto;
}

a,
button,
input,
select,
textarea,
[contenteditable="true"] {
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

button:not(:disabled):hover,
a[class*="bg-"]:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.site-search {
  position: relative;
  margin-inline-start: 12px;
}

.site-search-input {
  width: 142px;
  border: 1px solid var(--mirbaa-border);
  background: transparent;
  padding: 7px 10px;
  font-size: 12px;
  outline: none;
}

.site-search-input:focus {
  width: 190px;
  border-color: #111827;
  background: #fff;
}

.site-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: min(290px, 82vw);
  border: 1px solid var(--mirbaa-border);
  background: #fff;
  box-shadow: 0 12px 28px rgb(0 0 0 / 12%);
}

.site-search-result,
.site-search-empty {
  display: block;
  border-bottom: 1px solid rgb(17 24 39 / 10%);
  padding: 10px 11px;
  font-size: 12px;
  line-height: 1.55;
}

.site-search-result:last-child {
  border-bottom: 0;
}

.site-search-result:hover {
  background: rgb(239 68 68 / 9%);
}

.site-search-empty {
  margin: 0;
  color: rgb(17 24 39 / 60%);
}

.reading-progress {
  position: fixed;
  z-index: 60;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 3px;
  background: var(--mirbaa-red);
  transform: scaleX(0);
  transform-origin: right center;
  pointer-events: none;
}

[data-ad-slot][hidden],
[data-ad-slot] [aria-hidden="true"],
aside[hidden] {
  display: none !important;
}

.without-sidebar > article {
  grid-column: 1 / -1 !important;
}

article img,
article video {
  border-radius: 0;
  box-shadow: none !important;
  transform: none !important;
  transition: none;
}

.rich-article-content {
  overflow-wrap: anywhere;
}

.rich-article-content p,
.rich-article-content div {
  margin: 0;
}

.rich-editor [data-mirbaa-size="small"],
.rich-article-content [data-mirbaa-size="small"] {
  font-size: 0.86em;
}

.rich-editor [data-mirbaa-size="normal"],
.rich-article-content [data-mirbaa-size="normal"] {
  font-size: 1em;
}

.rich-editor [data-mirbaa-size="large"],
.rich-article-content [data-mirbaa-size="large"] {
  font-size: 1.28em;
}

.rich-editor figcaption[data-placeholder]:empty::before {
  color: rgb(255 255 255 / 48%);
  content: attr(data-placeholder);
  pointer-events: none;
}

.mirbaa-main-image-label {
  margin-top: 8px;
}

.mirbaa-admin-form label[hidden],
.mirbaa-admin-form select[hidden],
.mirbaa-admin-form textarea[hidden] {
  display: none !important;
}

.rich-article-content h2,
.rich-article-content h3 {
  margin: 1.9rem 0 0.65rem;
  font-family: "Tajawal", sans-serif;
  font-weight: 900;
  line-height: 1.35;
}

.rich-article-content h2 {
  font-size: 1.35rem;
}

.rich-article-content h3 {
  font-size: 1.12rem;
}

.rich-article-content ul,
.rich-article-content ol {
  padding-inline-start: 1.4rem;
}

.rich-article-content li {
  margin: 0.35rem 0;
}

.rich-article-content figure,
.article-media {
  margin: 1.5rem 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.rich-article-content figure img,
.rich-article-content figure video,
.article-media img,
.article-media video {
  display: block;
  width: 100%;
  max-height: 680px;
  margin: 0;
  background: #111;
  object-fit: contain;
}

.rich-article-content figcaption {
  padding-top: 0.45rem;
  color: rgb(17 24 39 / 60%);
  font-size: 0.78rem;
  line-height: 1.6;
}

.news-share-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.news-share-toolbar button {
  min-height: 52px;
  border: 2px solid var(--mirbaa-red);
  background: var(--mirbaa-red);
  color: #fff;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgb(239 68 68 / 16%);
}

.news-share-toolbar button:hover {
  background: #c62828;
  border-color: #c62828;
  color: #fff;
}

.news-share-status {
  color: rgb(127 127 127 / 90%);
  font-size: 12px;
}

.news-video {
  display: block;
  width: 100%;
  max-height: 620px;
  margin-top: 20px;
  background: #111;
  object-fit: contain;
}

.admin-settings-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
  padding: 8px 16px;
  color: rgb(255 255 255 / 58%);
  font-size: 11px;
}

.admin-settings-strip strong {
  color: rgb(255 255 255 / 82%);
}

.mirbaa-admin-form input:not([type="file"]),
.mirbaa-admin-form select,
.mirbaa-admin-form textarea {
  max-width: 100%;
}

.mirbaa-admin-form input:not([type="file"]),
.mirbaa-admin-form select,
.mirbaa-admin-form textarea,
.mirbaa-admin-form button {
  font-family: inherit;
}

.rich-source {
  display: none !important;
}

.rich-editor-shell {
  margin: 0 0 12px;
  border: 1px solid rgb(255 255 255 / 22%);
  background: rgb(255 255 255 / 3%);
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 5px;
  border-bottom: 1px solid rgb(255 255 255 / 14%);
  padding: 8px;
}

.rich-toolbar-group {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  border: 1px solid rgb(255 255 255 / 12%);
  padding: 5px;
}

.rich-toolbar-label {
  flex: 1 0 100%;
  color: rgb(255 255 255 / 58%);
  font-size: 10px;
  line-height: 1.4;
}

.rich-toolbar-button {
  min-height: 34px;
  border: 1px solid rgb(255 255 255 / 20%);
  padding: 5px 9px;
  color: inherit;
  font-size: 11px;
  white-space: nowrap;
}

.rich-toolbar-button:hover,
.rich-toolbar-button:focus-visible {
  border-color: var(--mirbaa-red);
  background: rgb(239 68 68 / 12%);
}

.rich-ad-menu {
  display: flex;
  flex: 1 0 100%;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border-top: 1px solid rgb(255 255 255 / 12%);
  padding-top: 7px;
}

.rich-ad-hint {
  flex: 1 0 100%;
  color: rgb(255 255 255 / 62%);
  font-size: 11px;
  line-height: 1.5;
}

.rich-ad-menu[hidden] {
  display: none !important;
}

.rich-ad-select,
.rich-ad-slot,
.rich-ad-insert {
  min-height: 34px;
  border: 1px solid rgb(255 255 255 / 20%);
  background: transparent;
  padding: 5px 8px;
  color: #111827;
  font-size: 11px;
}

.rich-ad-select {
  min-width: 165px;
  background: #fff !important;
  color: #111827 !important;
}

.rich-ad-select option {
  background: #fff !important;
  color: #111827 !important;
}

.rich-ad-slot {
  width: 135px;
  background: #fff;
  color: #111827;
}

.rich-ad-insert {
  border-color: var(--mirbaa-red);
  background: var(--mirbaa-red);
  color: #fff;
  font-weight: 700;
}

.rich-ad-insert:hover {
  background: var(--mirbaa-red);
}

.rich-editor {
  min-height: 290px;
  padding: 14px;
  color: inherit;
  font-size: 14px;
  line-height: 1.9;
  outline: none;
}

.rich-editor:focus {
  box-shadow: inset 0 0 0 1px var(--mirbaa-red);
}

.rich-editor p,
.rich-editor div {
  margin: 0 0 0.8rem;
}

.rich-editor figure {
  margin: 1rem 0;
}

.rich-editor figure img,
.rich-editor figure video {
  display: block;
  max-width: 100%;
  max-height: 360px;
  background: #111;
  object-fit: contain;
}

.rich-editor figcaption {
  min-height: 1.3em;
  color: rgb(255 255 255 / 60%);
  font-size: 11px;
}

.rich-ad-marker {
  margin: 1rem 0;
  border: 1px dashed var(--mirbaa-red);
  padding: 12px;
  color: rgb(255 255 255 / 72%);
  font-size: 11px;
  text-align: center;
}

.inline-ad {
  min-height: 90px;
  margin: 2rem 0;
  overflow: hidden;
  text-align: center;
}

.inline-ad .adsbygoogle {
  min-height: 90px;
}

.rich-editor-hint {
  margin: 0;
  border-top: 1px solid rgb(255 255 255 / 12%);
  padding: 8px 12px;
  color: rgb(255 255 255 / 55%);
  font-size: 11px;
  line-height: 1.6;
}

.rich-toolbar-links,
.rich-toolbar-ads,
.rich-toolbar-media {
  align-content: flex-start;
}

.admin-media-help {
  margin: -4px 0 12px;
  color: rgb(255 255 255 / 55%);
  font-size: 11px;
  line-height: 1.7;
}

.admin-media-status {
  min-height: 1.5em;
  margin: -4px 0 12px;
  color: rgb(255 255 255 / 70%);
  font-size: 11px;
  line-height: 1.6;
}

.rich-editor a {
  text-decoration: underline;
}

.rich-editor:empty::before {
  color: rgb(255 255 255 / 35%);
  content: "ابدأ بكتابة الخبر هنا…";
}

.news-share-toolbar button:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[contenteditable="true"]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@keyframes site-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 760px) {
  header,
  nav {
    max-width: 100%;
  }

  .site-search {
    flex: 1 0 100%;
    margin: 2px 0 0;
  }

  .site-search-input,
  .site-search-input:focus {
    width: 100%;
    min-height: 42px;
  }

  .site-search-results {
    width: 100%;
  }

  .admin-settings-strip {
    gap: 5px 12px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.65;
  }

  .mirbaa-admin-form {
    width: 100%;
    padding: 12px !important;
  }

  .mirbaa-admin-form input:not([type="file"]),
  .mirbaa-admin-form select,
  .mirbaa-admin-form textarea,
  .mirbaa-admin-form button {
    min-height: 44px;
    font-size: 14px;
  }

  .mirbaa-admin-form textarea {
    line-height: 1.75;
  }

  .mirbaa-admin-form input[type="file"] {
    min-height: 44px;
    font-size: 12px;
  }

  .rich-editor-shell {
    margin-inline: -2px;
  }

  .rich-editor {
    min-height: 250px;
    padding: 12px;
    font-size: 15px;
  }

  .rich-toolbar {
    gap: 6px;
    padding: 7px;
  }

  .rich-toolbar-group {
    flex: 1 1 100%;
    width: 100%;
  }

  .rich-toolbar-button {
    min-height: 40px;
    padding: 7px 10px;
  }

  .rich-ad-menu {
    align-items: stretch;
  }

  .rich-ad-select,
  .rich-ad-slot,
  .rich-ad-insert {
    min-height: 42px;
  }

  .rich-ad-select,
  .rich-ad-slot,
  .rich-ad-insert {
    flex: 1 1 100%;
    width: 100%;
  }

  .rich-ad-hint {
    padding-bottom: 2px;
  }

  .news-share-toolbar {
    align-items: stretch;
  }

  .news-share-toolbar button {
    width: 100%;
    min-height: 58px;
    font-size: 18px;
  }

  .news-share-status {
    width: 100%;
  }

  .rich-article-content {
    font-size: 16px;
  }

  .rich-article-content figure,
  .article-media {
    margin-inline: 0;
  }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Categories are not shown anywhere on the site. */
.divide-y > a span.text-press,
article span.bg-press {
  display: none !important;
}
