:root {
  --yayrev-text-secondary: #64748b;
  --yayrev-rating-star-color-active: #ff9647;
}

.yayrev-review__media-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 15px 0;
}

/** Media Card */
.yayrev-media-card {
  cursor: pointer;
  aspect-ratio: 1/1;
}

.yayrev-media-card-wrapper {
  position: relative;
  aspect-ratio: 1/1;
}

.yayrev-media-card-inner {
  border-radius: 6px;
  background-color: #f5f5f5;
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

.yayrev-media-card-inner img {
  object-fit: contain;
  width: 100%;
  height: 100%;
  outline: 1.5px solid #0000000f;
  outline-offset: -1.5px;
  transition: all 0.2s;
  border-radius: 6px;
}

.yayrev-media-card.active .yayrev-media-card-inner img {
  outline-color: #000000af;
}

.yayrev-media-card__video-details {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #404040cc;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

.yayrev-media-card__video-details:empty {
  display: none;
}
.yayrev-media-card__video-details > * {
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.yayrev-media-card__video-details > :last-child {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.yayrev-review__media-item {
  width: 138px;
  height: 138px;
}

.yayrev-review__media-list .yayrev-review__media-item {
  width: 97px;
  height: 97px;
}

/** Review Details */

.yayrev-portal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 160000;
  width: 100%;
  height: 100%;
}

.yayrev-portal .yayrev-modal {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 80%;
  width: 60%;
  margin: auto;
  z-index: 160000;
  background-color: #ffffff;
  border-radius: 8px;
}

.yayrev-portal .yayrev-modal-backdrop {
  position: absolute;
  background-color: #00000075;
  width: 100%;
  height: 100%;
}

.yayrev-modal .yayrev-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #e4e4e7;
}

.yayrev-modal .yayrev-modal-content {
  flex: 1;
  height: 80%;
  position: relative;
}

.yayrev-modal .yayrev-modal-content .yayrev-modal-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top: 2px solid #000;
  border-radius: 50%;
  animation: yayrev-spin 1s linear infinite;
  margin-bottom: 4px;
}

.yayrev-modal .yayrev-modal-header h1 {
  padding: 0;
  font-size: 22px;
  line-height: 2.27272727;
  margin: 0;
  font-weight: 600;
}

.yayrev-review-details-portal .yayrev-modal-content {
  display: flex;
}

.yayrev-review-details__media-preview {
  position: relative;
  float: left;
  width: 65%;
  height: 100%;
  background-color: #f6f7f7;
  user-select: none;
}

.yayrev-review-details__media-preview
  .yayrev-review-details__media-preview-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: #f6f7f7;
  position: relative;
}

.yayrev-review-details__media-preview
  .yayrev-review-details__media-preview-item
  video {
  max-width: 100%;
  height: auto;
  padding: 1rem;
}

.yayrev-review-details__media-preview
  .yayrev-review-details__media-preview-item
  img {
  display: block;
  padding: 1rem;
  max-width: 100%;
  max-height: 90%;
  max-height: calc(100% - 42px);
}

.yayrev-review-details__main {
  overflow: auto;
  box-sizing: border-box;
  margin-bottom: 0;
  padding: 12px 16px 0;
  width: 35%;
  height: 100%;
}

.yayrev-review-details__main > * {
  margin-block-end: 16px;
}

.yayrev-review-details__review-info > * {
  margin-block-end: 6px;
}

.yayrev-review-details__review-info {
  font-size: 14px;
}

.yayrev-review-details__review-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yayrev-review-details__review-author__info {
  display: flex;
  align-items: center;
  gap: 4px;
}

.yayrev-review-details__review-author-avatar {
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: 100%;
}

.yayrev-review-details__review-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yayrev-review-details__review-date {
  color: var(--yayrev-text-secondary);
}

.yayrev-review-details__review-title {
  font-weight: 600;
}

.yayrev-review-details__media-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(80px), 1fr));
  gap: 10px;
}

/* Navigation Arrows */
.yayrev-nav-arrow {
  cursor: pointer;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
  box-shadow: 0px 10px 25px 0px #377e620d;
  transition: all 0.2s ease-in-out;
  position: absolute;
  top: 50%;
  z-index: 10;
  background: #fff;
  color: #808890;
  border-radius: 100%;
  padding: 0.25rem;
}

.yayrev-nav-arrow:hover {
  background: #eff2f4;
  box-shadow: 0px 10px 25px 0px #12294026;
  border: none;
  color: #000;
}

.yayrev-nav-prev {
  left: 1rem;
}

.yayrev-nav-next {
  right: 1rem;
}

.yayrev-nav-arrow svg path {
  stroke: #808890;
  fill: transparent;
  transition: all 0.2s ease-in-out;
}

.yayrev-nav-arrow:hover svg path {
  stroke: #122940;
  fill: transparent;
}

.yayrev-nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Show arrows when there are multiple media items */
.yayrev-modal-media-frame-content-left:has(.yayrev-nav-arrow)
  .yayrev-nav-arrow {
  opacity: 0;
  transition: all 0.2s ease-in-out;
}

.yayrev-modal-media-frame-content-left:hover .yayrev-nav-arrow {
  opacity: 1;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .yayrev-nav-arrow {
    width: 24px;
    height: 24px;
    left: 8px;
    right: 8px;
  }

  .yayrev-nav-prev {
    left: 8px;
  }

  .yayrev-nav-next {
    right: 8px;
  }
}

.yayrev-rating-html {
  display: flex;
  align-items: center;
  gap: 3px;
  cursor:pointer;
  position: relative;
  width: fit-content;
}

.yayrev-rating-html svg {
  width: 18px;
  height: 18px;
}

.yayrev-rating-html.large {
  gap: 7px;
}
.yayrev-rating-html.large svg {
  width: 30px;
  height: 30px;
}

.yayrev-rating-html.small {
  gap: 3px;
}
.yayrev-rating-html.small svg {
  width: 13px;
  height: 13px;
}

.yayrev-rating-html .yayrev-rating-star--active *[fill] {
  fill: var(--yayrev-rating-star-color-active);
}

/* Custom tooltip for rating HTML */
.yayrev-rating-html[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: 5px;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  animation: yayrev-tooltip-fade-in 0.2s ease-in-out forwards;
}

.yayrev-rating-html[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #333;
  margin-bottom: -5px;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  animation: yayrev-tooltip-fade-in 0.2s ease-in-out forwards;
}

@keyframes yayrev-tooltip-fade-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Review Location Badge */
.yayrev-review-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background-color: #f1f5f9;
  border-radius: 4px;
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
  vertical-align: middle;
  margin-top: 5px;
  user-select: none;
}

.yayrev-review-location__flag {
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.yayrev-review-location__country {
  font-weight: 500;
}

.yayrev-review-location--empty {
  opacity: 0.6;
  font-style: italic;
}
