/* x.ticktock-style composer on YasGod (below admin bar) */
.yg-x-compose {
  display: none;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #fff;
  border-bottom: 1px solid #eff3f4;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

.yg-x-compose.is-owner {
  display: block;
}

.yg-x-compose-accent {
  height: 3px;
  background: #1d9bf0;
  width: 56px;
  margin: 0 auto;
}

.yg-x-compose-inner {
  display: flex;
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 16px 10px;
  box-sizing: border-box;
}

.yg-x-compose-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #cfd9de;
  color: #fff;
  font: 700 14px/40px system-ui, sans-serif;
  text-align: center;
  text-transform: uppercase;
}

.yg-x-compose-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yg-x-compose-body {
  flex: 1;
  min-width: 0;
}

.yg-x-compose-text {
  display: block;
  width: 100%;
  min-height: 72px;
  max-height: 280px;
  margin: 0;
  padding: 4px 0 8px;
  border: 0;
  resize: vertical;
  outline: none;
  background: transparent;
  color: #0f1419;
  font: 400 20px/1.35 system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}

.yg-x-compose-text::placeholder {
  color: #536471;
}

.yg-x-compose-media {
  display: none;
  grid-gap: 4px;
  margin: 0 0 10px;
  overflow: hidden;
  border: 1px solid #eff3f4;
  border-radius: 16px;
}

.yg-x-compose-media.is-on {
  display: grid;
}

.yg-x-compose-media[data-count="1"] {
  grid-template-columns: 1fr;
}

.yg-x-compose-media[data-count="2"] {
  grid-template-columns: 1fr 1fr;
}

.yg-x-compose-media[data-count="3"],
.yg-x-compose-media[data-count="4"],
.yg-x-compose-media[data-count="5"],
.yg-x-compose-media[data-count="6"] {
  grid-template-columns: 1fr 1fr;
}

.yg-x-compose-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #f7f9f9;
}

.yg-x-compose-thumb img,
.yg-x-compose-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yg-x-compose-thumb-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 20, 25, 0.75);
  color: #fff;
  font: 700 16px/28px system-ui, sans-serif;
  cursor: pointer;
}

.yg-x-compose-err {
  display: none;
  margin: 0 0 8px;
  color: #f4212e;
  font: 500 13px/1.35 system-ui, sans-serif;
}

.yg-x-compose-err.is-on {
  display: block;
}

.yg-x-compose-ok {
  display: none;
  margin: 0 0 8px;
  color: #00ba7c;
  font: 500 13px/1.35 system-ui, sans-serif;
}

.yg-x-compose-ok.is-on {
  display: block;
}

.yg-x-compose-ok a {
  color: #1d9bf0;
}

.yg-x-compose-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #eff3f4;
}

.yg-x-compose-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
}

.yg-x-compose-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1d9bf0;
  cursor: pointer;
}

.yg-x-compose-tool:hover {
  background: rgba(29, 155, 240, 0.1);
}

.yg-x-compose-tool svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yg-x-compose-post {
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  background: #1d9bf0;
  color: #fff;
  font: 700 15px/1 system-ui, sans-serif;
  cursor: pointer;
}

.yg-x-compose-post:disabled {
  opacity: 0.5;
  cursor: default;
  background: #8ecdf7;
}

.yg-x-compose-emoji {
  display: none;
  position: absolute;
  left: 0;
  bottom: 42px;
  z-index: 20;
  width: min(280px, 70vw);
  padding: 8px;
  border: 1px solid #eff3f4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
}

.yg-x-compose-emoji.is-on {
  display: grid;
}

.yg-x-compose-emoji button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1.4;
  cursor: pointer;
  padding: 4px;
}

.yg-x-compose-emoji button:hover {
  background: #f7f9f9;
}

@media (max-width: 640px) {
  .yg-x-compose-inner {
    padding: 10px 12px;
  }
  .yg-x-compose-text {
    font-size: 18px;
    min-height: 64px;
  }
}
