/* Malavia Beta Zero — owner-requested mobile polish v2 */

/* Compact poster rails must never let one card paint text into its neighbor. */
.fz-poster-rail {
  align-items: flex-start;
  gap: 14px;
}

.fz-poster-card {
  flex: 0 0 126px;
  width: 126px;
  max-width: 126px;
  min-width: 126px;
  overflow: hidden;
  contain: paint;
}

.fz-poster-card > a {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.fz-poster-card .fz-card-title,
.fz-poster-card strong {
  display: -webkit-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 2.9em;
  max-height: 2.9em;
  margin-top: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  unicode-bidi: isolate;
  text-align: start;
  box-sizing: border-box;
  padding-inline: 4px;
}

.fz-poster-card .fz-card-en {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 1.35em;
  max-height: 1.35em;
  margin-top: 2px;
  overflow: hidden;
  color: #818994;
  font-size: 10.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  box-sizing: border-box;
  padding-inline: 4px;
}

.fz-poster-card .fz-card-meta {
  margin-top: 2px;
}

.fz-poster-card .fz-card-meta,
.fz-poster-card > a > small,
.fz-poster-card > a > span {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  unicode-bidi: isolate;
  box-sizing: border-box;
  padding-inline: 4px;
}

/* Rating choices stay neutral until they are actually selected. */
.fz-rating-option[data-rating-score] {
  border-color: #343a43;
  background: #171b20;
  color: #e6e1d8;
}

.fz-rating-option.is-selected[data-rating-score="10"] {
  border-color: rgb(70 190 105 / 78%);
  background: rgb(45 148 78 / 24%);
  color: #bff3ce;
  box-shadow: inset 0 0 0 1px rgb(70 190 105 / 24%);
}

.fz-rating-option.is-selected[data-rating-score="8"] {
  border-color: rgb(132 198 88 / 78%);
  background: rgb(104 164 65 / 22%);
  color: #d6f1bd;
  box-shadow: inset 0 0 0 1px rgb(132 198 88 / 24%);
}

.fz-rating-option.is-selected[data-rating-score="6"] {
  border-color: rgb(84 157 228 / 78%);
  background: rgb(53 120 190 / 23%);
  color: #c7e2ff;
  box-shadow: inset 0 0 0 1px rgb(84 157 228 / 24%);
}

.fz-rating-option.is-selected[data-rating-score="4"] {
  border-color: rgb(234 151 64 / 82%);
  background: rgb(196 112 35 / 23%);
  color: #ffd6aa;
  box-shadow: inset 0 0 0 1px rgb(234 151 64 / 24%);
}

.fz-rating-option.is-selected[data-rating-score="2"] {
  border-color: rgb(225 84 84 / 82%);
  background: rgb(184 54 54 / 24%);
  color: #ffc5c5;
  box-shadow: inset 0 0 0 1px rgb(225 84 84 / 24%);
}

/* Lightweight Jalali date picker. */
.mlv-jalali-trigger {
  min-height: 44px;
  flex: 1;
  border: 1px solid #2a3038;
  border-radius: 10px;
  padding: 8px 10px;
  background: #171b20;
  color: #f2ede4;
  text-align: right;
  cursor: pointer;
}

.mlv-jalali-trigger.is-empty {
  color: #9aa2ab;
}

.mlv-jalali-dialog {
  width: min(92vw, 390px);
  padding: 0;
  border: 1px solid rgb(244 174 43 / 28%);
  border-radius: 18px;
  background: #171b20;
  color: #f2ede4;
  box-shadow: 0 24px 72px rgb(0 0 0 / 52%);
}

.mlv-jalali-dialog::backdrop {
  background: rgb(5 7 10 / 72%);
  backdrop-filter: blur(3px);
}

.mlv-jalali-card {
  padding: 16px;
}

.mlv-jalali-head,
.mlv-jalali-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mlv-jalali-title {
  font-weight: 950;
  text-align: center;
}

.mlv-jalali-nav,
.mlv-jalali-action {
  min-width: 42px;
  min-height: 40px;
  border: 1px solid #303740;
  border-radius: 10px;
  background: #111419;
  color: #e5e0d8;
  cursor: pointer;
}

.mlv-jalali-action {
  min-width: 76px;
  padding-inline: 10px;
}

.mlv-jalali-weekdays,
.mlv-jalali-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.mlv-jalali-weekdays {
  margin-top: 14px;
  color: #8f97a0;
  font-size: 11px;
  text-align: center;
}

.mlv-jalali-days {
  margin-top: 7px;
}

.mlv-jalali-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #e7e2d9;
  cursor: pointer;
}

.mlv-jalali-day:hover,
.mlv-jalali-day:focus-visible {
  background: #252b32;
  outline: none;
}

.mlv-jalali-day.is-selected {
  background: #f4ae2b;
  color: #241700;
  font-weight: 950;
}

.mlv-jalali-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1px rgb(244 174 43 / 68%);
  color: #ffd36d;
}

.mlv-jalali-spacer {
  aspect-ratio: 1;
}

.mlv-jalali-actions {
  margin-top: 14px;
}

/* Avatar remains intentionally small; no large-view surface is exposed. */
.fz-profile-avatar.has-photo,
.fz-settings-identity .fz-avatar.has-photo,
.avatar-link.fz-avatar.has-photo {
  overflow: hidden;
  padding: 0;
  background: #171b20;
}

.fz-profile-avatar.has-photo img,
.fz-settings-identity .fz-avatar.has-photo img,
.avatar-link.fz-avatar.has-photo img,
.mlv-avatar-preview {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.mlv-avatar-editor {
  display: grid;
  gap: 10px;
  margin: 14px 0 20px;
  padding: 13px;
  border: 1px solid #2a3038;
  border-radius: 12px;
  background: #15191e;
}

.mlv-avatar-editor-title {
  font-weight: 900;
}

.mlv-avatar-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.mlv-avatar-picker-button {
  width: fit-content;
  min-width: 132px;
  cursor: pointer;
}

.mlv-avatar-editor small,
.mlv-avatar-status {
  color: #8f97a0;
  font-size: 11.5px;
}

.mlv-avatar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  .mlv-jalali-dialog::backdrop {
    backdrop-filter: none;
  }
}
