/*
  使用view：
  - web/app/views/reviews/edit.html.erb
  - web/app/views/reviews/index.html.erb
  - web/app/views/reviews/new.html.erb
  - web/app/views/reviews/posted.html.erb
  - web/app/views/reviews/thanks.html.erb
*/

/*
  MEMO: フッター、postedページの新しいクチコミの黄色帯をページ下部に固定させるためのスタイル
        影響範囲が広いため、共通スタイルにはしないで、review_pages.css範囲内のみにしています。
  TODO: 全ページを対象にリファクタリングする際に、確認お願いします。
*/
html{
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

footer {
  margin-top: auto;
}

body:has(.review-posted) footer {
  margin-top: 0
}

/*
  - web/app/views/reviews/edit.html.erb
  - web/app/views/reviews/index.html.erb
*/
.review-post .content_title {
  margin-bottom: 48px;
}

.review-post-form{
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.review-post-label {
  display: inline-block;
  font-size: 14px;
  font-weight: bold;
}

.review-post-recommend-point-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  border-top: 1px solid #C3C3C3;
  border-left: 1px solid #C3C3C3;
}

.review-post-recommend-point-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #C3C3C3;
  border-right: 1px solid #C3C3C3;
}

.review-post-recommend-point-item label{
  color: #5F5F5F;
}

.review-post-recommend-point-fivestars {
  display: block;
  text-align: center;
}

.review-post-recommend-point-star {
  width: auto;
  height: 24px;
}

/* form */
.review-post input[type="text"],
.review-post select,
.review-post textarea {
  box-sizing: border-box;
  color: #343434;
  border-radius: 4px;
  border: 1px solid #C3C3C3;
  font-size: 14px;
}

.review-post input::placeholder,
.review-post textarea::placeholder{
  color: #B2B2B2;
}

.review-post input[type="text"] {
  width: 100%;
  height: 48px;
  padding: 0 16px;
}

.review-post select{
  width: 50%;
  height: 48px;
  padding: 0 16px;
}

.review-post textarea{
  width: 100%;
  padding: 16px;
}

.review-post-textarea-counter {
  position: absolute;
  right: 8px;
  bottom: 12px;
}

@media screen and (max-width: 767.8px) {
  .review-post .layout_inner {
    padding: 32px 0;
  }

  .review-post select{
    width: 100%;
  }
}

/* レビュー投稿がないとき */
.review_no_post_text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  padding-bottom: 24px;
}

/*
  - web/app/views/reviews/index.html.erb
*/
.review_no_post {
  padding: 0 0 30px 0;
}

.review_no_post .section_first_headline {
  margin-top: 38px;
}

@media screen and (min-width: 700px) {
  .review_no_post .section_first_headline {
    margin-top: 35px;
  }
}

/*
  - web/app/views/reviews/posted.html.erb
*/
.review-posted .content_title {
  margin-bottom: 48px;
}

.new-review-induction {
  position: sticky;
  bottom: -1px;
  margin-top: auto;
}

.new-review-induction .yellow_button{
  margin: 0;
}

@media screen and (max-width: 767.8px) {
  .new-review-induction > p {
    width: 100%;
    text-align: center;
  }
}

/*
  - web/app/views/reviews/thanks.html.erb
*/
.review-thanks-container {
  width: 95%;
  max-width: 560px;
  margin: 48px auto;
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  border-radius: 8px;
  box-shadow: 0px 2px 8px 3px rgba(0, 0, 0, 0.08), 0px 2px 16px 0px rgba(0, 0, 0, 0.16);
}
