// Post Rating Form CSS
.aae--post-rating-form {
  svg {
    width: 1em;
    height: 1em;
  }

  .rating {
    display: inline-flex;
    flex-direction: row-reverse;
    color: #ddd;
    fill: #ddd;
    margin-bottom: 15px;
    margin-top: 15px;

    input {
      display: none;
    }

    label {
      cursor: pointer;
      transition: all 0.3s;
    }
  }

  .rating label:hover,
  .rating label:hover ~ label,
  .rating input:checked + label,
  .rating input:checked + label ~ label {
    fill: #ffc107;
    color: #ffc107;
  }

  .review-message {
    margin-top: 15px;
  }

  .review {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
  }

  .submit-btn {
    color: #fff;
    background: #121212;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
  }

  .anon-fields {
    gap: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    label {
      width: 100%;
    }

    input {
      width: 100%;
      padding: 10px;
      border: 1px solid #ddd;
      border-radius: 5px;
      outline: none;
    }

  }


}


// Post Rating CSS
.aae--post-rating {
  svg {
    width: 1em;
    height: 1em;
  }

  p {
    margin: 0;
    padding: 0;
  }

  &.average-rating {
    .rating {
      width: 80px;
      height: 80px;
      border: 1px solid #ddd;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      border-radius: 100%;
    }
  }

  &.list {
    display: grid;
    gap: 15px;

    .rating-item {
      border: 1px solid #ddd;
      padding: 20px;
      border-radius: 3px;
    }

    .content {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;

      @media (max-width: 767px) {
        flex-direction: column-reverse;
      }
    }

    .name-wrap {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .dash {
      width: 10px;
      height: 1px;
      background: currentColor;
    }

    .review {
      margin: 0;
    }

    .stars {
      display: flex;
      align-items: center;
      gap: 2px;
    }

  }


}

@media (max-width: 767px) {
  .align-dir-start .aae--post-rating.list .content {
    align-items: flex-start;
  }
  .align-dir-center .aae--post-rating.list .content {
    align-items: center;
  }
  .align-dir-end .aae--post-rating.list .content {
    align-items: flex-end;
  }
}

// Rating Login Modal
.aae-rating-login-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;

  .aae-rating-modal-backdrop {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1;
    cursor: pointer;
  }

  .aae-rating-modal-content {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    max-width: 440px;
    width: 100%;
    padding: 32px 28px;
    box-sizing: border-box;
    animation: aaeModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: #1f2937;
    font-family: inherit;

    .aae-rating-modal-close {
      position: absolute;
      top: 14px;
      right: 14px;
      background: transparent;
      border: none;
      font-size: 24px;
      line-height: 1;
      color: #6b7280;
      cursor: pointer;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 6px;
      transition: all 0.2s ease;

      &:hover {
        color: #111827;
        background: #f3f4f6;
      }
    }

    .aae-rating-modal-body {
      h3 {
        margin: 0 0 6px 0;
        font-size: 20px;
        font-weight: 700;
        color: #111827;
        line-height: 1.3;
      }

      > p {
        margin: 0 0 20px 0;
        font-size: 14px;
        color: #6b7280;
        line-height: 1.5;
      }

      form {
        margin: 0;

        p {
          margin: 0 0 16px 0;

          label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: #374151;
            margin-bottom: 6px;
          }

          input.input,
          input[type="text"],
          input[type="password"] {
            width: 100%;
            height: 42px;
            padding: 8px 14px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 14px;
            color: #1f2937;
            background: #fff;
            box-sizing: border-box;
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;

            &:focus {
              border-color: #2563eb;
              box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
            }
          }
        }

        .login-remember {
          margin: 0 0 18px 0;

          label {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            font-weight: 400;
            color: #4b5563;
            cursor: pointer;
            margin: 0;

            input[type="checkbox"] {
              margin: 0;
              width: 16px;
              height: 16px;
              accent-color: #2563eb;
              cursor: pointer;
            }
          }
        }

        .login-submit {
          margin: 0 0 10px 0;

          input[type="submit"] {
            width: 100%;
            height: 44px;
            padding: 0 20px;
            background: #111827;
            color: #ffffff;
            border: none;
            border-radius: 8px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s ease, transform 0.1s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

            &:hover {
              background: #1f2937;
            }

            &:active {
              transform: scale(0.99);
            }
          }
        }
      }

      .aae-login-register-link {
        margin: 16px 0 0 0;
        padding-top: 12px;
        border-top: 1px solid #f3f4f6;
        text-align: center;
        font-size: 13px;
        color: #6b7280;

        a {
          color: #2563eb;
          text-decoration: none;
          font-weight: 500;
          transition: color 0.2s;

          &:hover {
            color: #1d4ed8;
            text-decoration: underline;
          }
        }
      }
    }
  }
}

@keyframes aaeModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}