/* =========================================================
   MOVIE PAGE
   ========================================================= */

.movie-view {
  width: 100%;
}


/* =========================================================
   POSTER
   ========================================================= */

.poster-box {
  width: 270px;

  margin: 0 auto;

  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: var(--radius);

  background: var(--surface);

  box-shadow: var(--shadow-lg);
}

.poster {
  display: block;

  width: 100%;

  aspect-ratio: 2 / 3;

  object-fit: cover;

  background: #151a22;
}


/* =========================================================
   RATING ROW
   ========================================================= */

.rating-row {
  position: relative;

  min-height: 62px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;

  background: var(--surface);

  border-top: 1px solid var(--line);
}

.rating-side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-side:first-child {
  padding-left: 12px;
}

.rating-side:last-child {
  padding-right: 12px;
  justify-content: flex-end;
}


/* =========================================================
   RATING CIRCLE
   ========================================================= */

.rating-circle {
  position: absolute;

  left: 50%;
  top: -15px;

  width: 62px;
  height: 62px;

  transform: translateX(-50%);

  display: grid;
  place-items: center;

  border: 4px solid var(--accent);
  border-radius: 50%;

  background: var(--surface);

  color: var(--accent);

  font-size: 17px;
  font-weight: 800;

  box-shadow:
    0 5px 20px rgba(0, 0, 0, .35);
}


/* =========================================================
   VOTES
   ========================================================= */

.vote {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  color: #fff;

  font-size: 17px;
  font-weight: 700;
}

.vote.dislike {
  background: var(--danger);
}

.vote.like {
  background: var(--success);
}

.vote-count {
  color: var(--muted);
  font-size: 12px;
}


/* =========================================================
   TITLE
   ========================================================= */

.movie-title {
  margin: 24px 0 9px;

  color: var(--text);

  font-size: 28px;
  line-height: 1.15;
  font-weight: 750;
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.description {
  position: relative;

  max-height: 80px;

  overflow: hidden;

  margin: 0;

  color: var(--muted);

  font-size: 14px;
  line-height: 1.6;

  transition: max-height var(--transition);
}

.description:not(.is-expanded)::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  height: 30px;

  background:
    linear-gradient(
      transparent,
      var(--bg)
    );
}

.description.is-expanded {
  max-height: 600px;
}

.description.is-expanded::after {
  display: none;
}


/* =========================================================
   READ MORE
   ========================================================= */

.read-more {
  width: 100%;
  height: 38px;

  margin-top: 10px;

  border: 1px solid var(--line);
  border-radius: 9px;

  background: var(--surface);

  color: var(--text);

  font-size: 12px;
  font-weight: 650;

  cursor: pointer;

  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.read-more:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}


/* =========================================================
   DETAILS
   ========================================================= */

.details {
  margin-top: 22px;

  padding-top: 20px;

  border-top: 1px solid var(--line);
}

.details p {
  margin: 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.55;
}

.details strong {
  color: var(--text-soft);
}


/* =========================================================
   SCORES
   ========================================================= */

.scores {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 10px;

  margin-top: 13px;
}

.score {
  min-height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid;
  border-radius: 8px;

  background: var(--surface);

  font-size: 12px;
  font-weight: 700;
}

.score.kp {
  border-color: #ff7138;
}

.score.imdb {
  border-color: #e6b83f;
}


/* =========================================================
   ERROR
   ========================================================= */

.load-error {
  width: min(100%, 700px);

  margin: 50px auto;
  padding: 25px;

  border: 1px solid var(--line);
  border-radius: var(--radius);

  background: var(--surface);

  box-shadow: var(--shadow);
}

.load-error h1 {
  margin: 0 0 10px;

  font-size: 20px;
}

.load-error p {
  margin: 0;
  color: var(--muted);
}


/* =========================================================
   LOADING
   ========================================================= */

.loading {
  padding: 80px 15px;

  text-align: center;

  color: var(--muted);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {
  .poster-box {
    width: min(270px, 78vw);
  }

  .movie-title {
    font-size: 23px;
  }

  .description {
    font-size: 13px;
  }
}