/* reuse modal shell from question popup */
.r1-modal { position:fixed; inset:0; display:none; z-index:9999; }
.r1-modal.is-open { display:block; }
.r1-backdrop { position:absolute; inset:0; background:rgba(15,33,55,.45); }
.r1-dialog { position:relative; margin:5vh auto; background:#fff; border-radius:12px; padding:22px; max-width:760px; }
.r1-dialog.r1-lg{ max-width:780px; }
.r1-close{ position:absolute; right:10px; top:8px; font-size:28px; background:none; border:0; cursor:pointer; }

.r1-title{ text-align:center; font-size:26px; margin:4px 0 6px; }
.r1-sub{ text-align:center; color:#6b7a8a; margin:0 0 18px; }
.r1-product-mini{ text-align:center; }
.r1-product-mini img{ width:150px; height:150px; object-fit:cover; border-radius:4px; display:block; margin:0 auto 10px; }
.r1-product-name{ text-align:center; font-weight:600; margin-bottom:12px; }

.r1-stars-pick{ display:flex; justify-content:center; gap:18px; margin:8px 0 12px; font-size:0; }
.r1-stars-pick button{ font-size:40px; line-height:1; background:none; border:0; color:#0C486B; opacity:.35; cursor:pointer; }
.r1-stars-pick button.on{ opacity:1; }
.r1-stars-preview{ text-align:center; font-size:28px; color:#0C486B; margin-bottom:12px; }

.r1-input{ width:100%; padding:12px 14px; border:1px solid #dfe6ee; border-radius:8px; margin:8px 0 14px; }
.r1-chip label{ display:inline-block; background:#eef3f7; padding:6px 10px; border-radius:20px; margin:6px 6px 0 0; cursor:pointer; }
.r1-chip input{ margin-right:6px; }

.r1-step-nav{ display:flex; justify-content:space-between; margin-top:8px; }
.r1-btn{ padding:10px 16px; border-radius:8px; border:1px solid #c9d4df; background:#f4f7fb; cursor:pointer; }
.r1-btn[disabled]{ opacity:.5; cursor:not-allowed; }
.r1-primary{ background:#0C486B; color:#fff; border-color:#0C486B; }

.r1-done{ text-align:center; padding:34px 10px; }
.r1-success-title{ font-weight:700; font-size:20px; color:#0C486B; margin:10px 0; }

/* Khung modal 600x600, vẫn responsive ở màn nhỏ */
.r1-modal .r1-dialog{
  width: 600px;
  height: 600px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;           /* nội dung dài thì cuộn trong khung */
  border-radius: 12px;
}

/* Nếu bạn có biến thể .r1-lg, ép về cùng kích thước */
.r1-modal .r1-dialog.r1-lg{
  width: 600px;
  height: 600px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
}

@media (max-width: 540px){
  .r1-dialog{ margin:4vh 12px; padding:16px; }
  .r1-title{ font-size:22px; }
  .r1-stars-pick button{ font-size:34px; }
  .r1-modal .r1-dialog,
  .r1-modal .r1-dialog.r1-lg{
    width: 90vw;
    height: 90vh;
  }
}

/* Avatar hiển thị trong danh sách review */
.r1-avatar{
  width:40px;height:40px;border-radius:50%;
  object-fit:cover; display:inline-block; vertical-align:middle;
  margin-right:8px;
}

/* --- Dropzone --- */
.r1-dropzone{
  border:2px dashed #d8dde6;
  border-radius:8px;
  padding:20px;
  margin:8px 0 12px;
  text-align:center;
}
.r1-dropzone.is-drag{ background:#f8fafc; }
.r1-dz-box{ display:flex; flex-direction:column; align-items:center; gap:8px; padding:18px 0; }
.r1-dz-icon{ font-size:28px; }
.r1-dz-note{ color:#6b7280; font-size:12px; }

.r1-previews{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(5, 100px);
  gap:10px;
  justify-content:center;
}
.r1-previews .r1-thumb{
  width:100px; height:100px; border:1px solid #e5e7eb; border-radius:8px; overflow:hidden;
  display:flex; align-items:center; justify-content:center; font-size:12px; color:#374151;
}
.r1-previews img{ width:100%; height:100%; object-fit:cover; }

/* --- Gallery dưới review --- */
.r1-media{
  display:grid; grid-template-columns:repeat(5, 100px);
  gap:10px; margin-top:12px;
}
.r1-media-thumb{
  width:100px; height:100px; object-fit:cover; border-radius:8px; cursor:pointer;
}

/* mobile */
@media (max-width: 640px){
  .r1-previews, .r1-media{ grid-template-columns:repeat(3, 100px); }
}

/* --- Photo Modal (image + review on right) --- */
#r1-photo-modal .r1-dialog.r1-photo{
  width: min(960px, 95vw);
  height: min(640px, 95vh);
  display:flex; padding:0;
}
#r1-photo-modal .r1-photo-grid{
  display:grid; grid-template-columns: 1.2fr 1fr; width:100%; height:100%;
}
#r1-photo-modal .r1-photo-left{
  background:#000; display:flex; align-items:center; justify-content:center; overflow:hidden;
}
#r1-photo-modal #r1-photo-big{
  max-width:100%; max-height:100%;
}
#r1-photo-modal .r1-photo-right{
  padding:20px; overflow:auto; background:#fff;
}
#r1-photo-modal .r1-photo-author{ font-weight:600; margin-bottom:8px; }
#r1-photo-modal .r1-photo-title{ font-weight:600; margin:10px 0; }
#r1-photo-modal .r1-photo-date{ color:#6b7280; font-size:13px; margin-top:10px; }

/* Fix góc bị mất cho select country */
select.r1-input {
  appearance: none;           /* Ẩn style mặc định của trình duyệt */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;          /* bo góc đều */
  padding: 10px 40px 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  width: 100%;
  box-sizing: border-box;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='gray'><path d='M2 5l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

#r1-photo-big, #r1-video-big {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  background: #000;
}
