@media (min-width: 781px) {
    .reviews-section {
      width: 500px;
      padding: 20px;
      background-color: rgb(248, 238, 238);
      border-radius: 10px;
      margin-top: 30px;
      margin-bottom: 30px;
      box-shadow: 6px 6px 0 rgba(0,0,0,0.26);
    }

    /* Form */
    .review-form {
      margin-top: 20px;
      background: #fff;
      padding: 20px;
      border-radius: 8px;
    }
    .review-form h4 {
      margin: 0 0 5px 0; /*margin bottom 4px, others 0*/
    }


    .review-form-upper-row {
      display: flex;
      gap: 12px;
      align-items: flex-start;
    }

    /* Name input */
    #review-form-name {
      flex: 1;
      padding: 8px;
      font-size: 14px;
      border: 1px solid #ccc;
      border-radius: 6px;
      font-family: "Maven Pro";
    }

    /* =========================
      DROPDOWN
    ========================= */

    .review-form-rating-container {
      position: relative;
      width: 140px;
      font-family: "Maven Pro";
    }

    /* Closed state */
    .review-form-rating-display {
      padding: 8px;
      font-size: 14px;
      border: 1px solid #ccc;
      border-radius: 6px;
      background: #fff;
      cursor: pointer;
      user-select: none;
    }

    /* Arrow */
    .review-form-rating-display::after {
      content: "▼";
      float: right;
      font-size: 10px;
      margin-top: 2px;
    }

    /* Open list */
    .review-form-rating-container .rating-options {
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      width: 100%;
      background: #fff;
      border: 1px solid #ccc;
      border-radius: 6px;
      box-shadow: 4px 4px 0 rgba(0,0,0,0.18);
      z-index: 20;
    }

    /* Items */
    .review-form-rating-container .rating-chip {
      display: block;
      padding: 7px;
      text-align: center;
      font-size: 14px;
      cursor: pointer;
      border-bottom: 1px solid #eee;
    }

    .review-form-rating-container .rating-chip:last-child {
      border-bottom: none;
    }

    .review-form-rating-container .rating-chip:hover {
      background: #ff9800;
      color: #fff;
    }

    /* Hidden state */
    .hidden {
      display: none;
    }











    .review-form textarea {
      width: 100%;
      padding: 8px;
      margin-top: 5px;
      font-size: 14px;
      box-sizing: border-box;
      border: 1px solid #ccc;
      border-radius: 6px;
      font-family: "Maven pro";
      height: 120px;       
      resize: none;        
      line-height: 1.2;
    }

    .review-form button {
      margin-top: 15px;
      width: 100%;
      padding: 7px;
      background: #ff9800;
      color: #fff;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      font-size: 20px;
      font-weight: bold;
    }

    .review-form button:hover {
      background: #e28900;
    }



    .reviews-display {
      margin-top: 25px;
      padding-top: 15px;
      border-top: 1px solid #ddd;
    }

    .reviews-display h3 {
      margin-bottom: 15px;
      font-size: 20px;
      font-weight: 600;
    }

    .reviews-container {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    /* Each review box */
    .review-item {
      border: 1px solid #ddd;
      padding: 12px 15px;
      border-radius: 8px;
      background: #fafafa;
    }

    .review-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .review-name {
      font-weight: bold;
    }

    .review-rating {
      font-size: 16px;
      font-weight: bold;
      color: white;
      background-color: #f39c12;
      padding: 4px;
      border-radius: 3px;
    }
    .rating-high {
      background-color: #27ae60 !important; /* green */
    }
    .rating-mid {
      background-color: #f39c12 !important; /* orange */
    }
    .rating-low {
      background-color: #c0392b !important; /* red */
    }

    .avg-rating {
      font-size: 18px;
      font-weight: bold;
      padding: 4px 6px;
      border-radius: 4px;
      color: white;
    }
    /* Colors borrowed from review-rating logic */
    .avg-high { background-color: #27ae60 !important; } /* green */
    .avg-mid  { background-color: #f39c12 !important; } /* orange */
    .avg-low  { background-color: #c0392b !important; } /* red */


    .review-date {
      color: #777;
      font-size: 12px;
      margin-top: 4px;
    }

    .review-text {
      margin-top: 8px;
      font-size: 14px;
      line-height: 1.4;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
    }


    /* =========================
      OWNER REPLY STYLING
    ========================= */

    .review-reply {
      margin-top: 12px;
      margin-left: 15px;              /* child indentation */
      padding: 8px 14px;
      background: white;         /* whiter than review */
      border-radius: 5px;
      font-size: 13px;                /* smaller than review */
      font-style: italic;
      font-family: "Manrope";
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .reply-inline {
      color: #444;
    }

    .reply-inline strong {
      font-weight: bold;
    }

    .reply-date {
      color: #777;
      margin-left: 4px;
    }

    /* =========================
      REPLY FORM
    ========================= */

    .reply-box {
      margin-top: 10px;
      margin-left: 25px;
    }

    .reply-btn {
      outline: 0;
      grid-gap: 8px;
      align-items: center;
      background-color: #ff90e8;
      color: #000;
      border: 1px solid #000;
      border-radius: 4px;
      cursor: pointer;
      display: inline-flex;
      flex-shrink: 0;
      font-size: 16px;
      gap: 8px;
      justify-content: center;
      line-height: 1.5;
      overflow: hidden;
      padding: 7px 9px;
      text-decoration: none;
      text-overflow: ellipsis;
      transition: all .14s ease-out;
      white-space: nowrap;   
      font-family: "Pattaya";           
    }
    .reply-btn:hover {
        box-shadow: 4px 4px 0 #000;
        transform: translate(-4px,-4px);
    }
    .reply-btn:focus-visible{
        outline-offset: 1px;
    }


    .reply-form {
      margin-top: 8px;
    }

    .reply-textarea {
      width: 100%;
      height: 80px;
      resize: none;
      padding: 8px;
      font-size: 13px;
      font-family: "Maven Pro";
      border: 1px solid #ccc;
      border-radius: 6px;
      box-sizing: border-box;
      line-height: 1.3;
    }

    .send-reply {
      margin-top: 6px;
      padding: 6px 10px;
      font-size: 13px;
      font-weight: bold;
      background: #ff9800;
      color: #fff;
      border: none;
      border-radius: 6px;
      cursor: pointer;
    }

    .send-reply:hover {
      background: #e28900;
    }

    .cancel-reply {
      margin-top: 6px;
      margin-left: 15px;
      padding: 6px 10px;
      font-size: 13px;
      font-weight: bold;
      background: #ff9800;
      color: #fff;
      border: none;
      border-radius: 6px;
      cursor: pointer;
    }

    .cancel-reply:hover {
      background: #e28900;
    }

    .delete-reply-btn {
      padding: 3px;
      font-size: 11px;
      background: #c0392b;
      color: #fff;
      border: none;
      border-radius: 3px;
      cursor: pointer;
      font-weight: bold;
    }

    .delete-reply-btn:hover {
      background: #600c03;
    }
}



@media (max-width: 780px) {
    .reviews-section {
      width: 98%;
      margin-top: 15px;
      padding: 6px;
      background-color: rgb(248, 238, 238);
      border-radius: 10px;
      box-shadow: 6px 6px 0 rgba(0,0,0,0.26);
    }

    /* Form */
    .review-form {
      background: #fff;
      padding: 10px;
      border-radius: 8px;
    }
    .review-form h4 {
      margin: 0 0 5px 0; /*margin bottom 4px, others 0*/
    }


    .review-form-upper-row {
      display: flex;
      gap: 12px;
      align-items: flex-start;
    }

    /* Name input */
    #review-form-name {
      flex: 1;
      padding: 8px;
      font-size: 14px;
      border: 1px solid #ccc;
      border-radius: 6px;
      font-family: "Maven Pro";
    }

    /* =========================
      DROPDOWN
    ========================= */

    .review-form-rating-container {
      position: relative;
      width: 140px;
      font-family: "Maven Pro";
    }

    /* Closed state */
    .review-form-rating-display {
      padding: 8px;
      font-size: 14px;
      border: 1px solid #ccc;
      border-radius: 6px;
      background: #fff;
      cursor: pointer;
      user-select: none;
    }

    /* Arrow */
    .review-form-rating-display::after {
      content: "▼";
      float: right;
      font-size: 10px;
      margin-top: 2px;
    }

    /* Open list */
    .review-form-rating-container .rating-options {
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      width: 100%;
      background: #fff;
      border: 1px solid #ccc;
      border-radius: 6px;
      box-shadow: 4px 4px 0 rgba(0,0,0,0.18);
      z-index: 20;
    }

    /* Items */
    .review-form-rating-container .rating-chip {
      display: block;
      padding: 7px;
      text-align: center;
      font-size: 14px;
      cursor: pointer;
      border-bottom: 1px solid #eee;
    }

    .review-form-rating-container .rating-chip:last-child {
      border-bottom: none;
    }

    .review-form-rating-container .rating-chip:hover {
      background: #ff9800;
      color: #fff;
    }

    /* Hidden state */
    .hidden {
      display: none;
    }

    .review-form textarea {
      width: 100%;
      padding: 8px;
      margin-top: 5px;
      font-size: 14px;
      box-sizing: border-box;
      border: 1px solid #ccc;
      border-radius: 6px;
      font-family: "Maven pro";
      height: 120px;       
      resize: none;        
      line-height: 1.2;
    }

    .review-form button {
      margin-top: 15px;
      width: 100%;
      padding: 7px;
      background: #ff9800;
      color: #fff;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      font-size: 20px;
      font-weight: bold;
    }

    .review-form button:hover {
      background: #e28900;
    }



    .reviews-display {
      margin-top: 25px;
      padding-top: 15px;
      border-top: 1px solid #ddd;
    }

    .reviews-display h3 {
      margin-bottom: 15px;
      font-size: 20px;
      font-weight: 600;
    }

    .reviews-container {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    /* Each review box */
    .review-item {
      border: 1px solid #ddd;
      padding: 12px 15px;
      border-radius: 8px;
      background: #fafafa;
    }

    .review-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .review-name {
      font-weight: bold;
    }

    .review-rating {
      font-size: 16px;
      font-weight: bold;
      color: white;
      background-color: #f39c12;
      padding: 4px;
      border-radius: 3px;
    }
    .rating-high {
      background-color: #27ae60 !important; /* green */
    }
    .rating-mid {
      background-color: #f39c12 !important; /* orange */
    }
    .rating-low {
      background-color: #c0392b !important; /* red */
    }
    .avg-rating {
      font-size: 18px;
      font-weight: bold;
      padding: 4px 6px;
      border-radius: 4px;
      color: white;
    }
    /* Colors borrowed from review-rating logic */
    .avg-high { background-color: #27ae60 !important; } /* green */
    .avg-mid  { background-color: #f39c12 !important; } /* orange */
    .avg-low  { background-color: #c0392b !important; } /* red */


    .review-date {
      color: #777;
      font-size: 12px;
      margin-top: 4px;
    }

    .review-text {
      margin-top: 8px;
      font-size: 14px;
      line-height: 1.2;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
    }


    /* =========================
      OWNER REPLY STYLING
    ========================= */

    .review-reply {
      margin-top: 12px;
      margin-left: 15px;              /* child indentation */
      padding: 8px 14px;
      background: white;         /* whiter than review */
      border-radius: 5px;
      font-size: 13px;                /* smaller than review */
      font-style: italic;
      font-family: "Manrope";
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .reply-inline {
      color: #444;
    }

    .reply-inline strong {
      font-weight: bold;
    }

    .reply-date {
      color: #777;
      margin-left: 4px;
    }

    /* =========================
      REPLY FORM
    ========================= */

    .reply-box {
      margin-top: 10px;
      margin-left: 25px;
    }

    .reply-btn {
      outline: 0;
      grid-gap: 8px;
      align-items: center;
      background-color: #ff90e8;
      color: #000;
      border: 1px solid #000;
      border-radius: 4px;
      cursor: pointer;
      display: inline-flex;
      flex-shrink: 0;
      font-size: 16px;
      gap: 8px;
      justify-content: center;
      line-height: 1.5;
      overflow: hidden;
      padding: 7px 9px;
      text-decoration: none;
      text-overflow: ellipsis;
      transition: all .14s ease-out;
      white-space: nowrap;   
      font-family: "Pattaya";           
    }
    .reply-btn:hover {
        box-shadow: 4px 4px 0 #000;
        transform: translate(-4px,-4px);
    }
    .reply-btn:focus-visible{
        outline-offset: 1px;
    }


    .reply-form {
      margin-top: 8px;
    }

    .reply-textarea {
      width: 100%;
      height: 80px;
      resize: none;
      padding: 8px;
      font-size: 13px;
      font-family: "Maven Pro";
      border: 1px solid #ccc;
      border-radius: 6px;
      box-sizing: border-box;
      line-height: 1.3;
    }

    .send-reply {
      margin-top: 6px;
      padding: 6px 10px;
      font-size: 13px;
      font-weight: bold;
      background: #ff9800;
      color: #fff;
      border: none;
      border-radius: 6px;
      cursor: pointer;
    }

    .send-reply:hover {
      background: #e28900;
    }

    .cancel-reply {
      margin-top: 6px;
      margin-left: 15px;
      padding: 6px 10px;
      font-size: 13px;
      font-weight: bold;
      background: #ff9800;
      color: #fff;
      border: none;
      border-radius: 6px;
      cursor: pointer;
    }

    .cancel-reply:hover {
      background: #e28900;
    }

    .delete-reply-btn {
      padding: 3px;
      font-size: 11px;
      background: #c0392b;
      color: #fff;
      border: none;
      border-radius: 3px;
      cursor: pointer;
      font-weight: bold;
    }

    .delete-reply-btn:hover {
      background: #600c03;
    }
}