/* Scoped to plugin components. Native file input remains usable without JavaScript. */
.kyp-review-upload {
  --kyp-accent: #3b5847;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px 20px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #dedfd8;
  border-radius: 14px;
  background: #fafbf8;
  color: #26352c;
  text-align: start;
}
.kyp-review-upload *, .kyp-review-gallery *, .kyp-review-lightbox * { box-sizing: border-box; }
.kyp-review-upload label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 650; }
.kyp-review-upload p { margin: 8px 0; font-size: 13px; line-height: 1.6; }
.kyp-review-upload input[type="file"] { display: block; max-width: 100%; width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; color: #465247; font: inherit; font-size: 13px; }
.kyp-review-upload input[type="file"]::file-selector-button { min-height: 44px; margin-inline-end: 12px; padding: 10px 16px; border: 1px solid #b3c1b5; border-radius: 8px; background: #fff; color: #2c4937; font: inherit; font-weight: 600; cursor: pointer; }
.kyp-review-upload input[type="file"]::file-selector-button:hover { background: #eef3ed; }
.kyp-review-upload-count { display: block; margin-top: 10px; color: #5d665e; font-size: 12px; font-variant-numeric: tabular-nums; }
.kyp-review-selection-hint { color: #61685f; }
.kyp-review-previews { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.kyp-review-previews:empty { display: none; }
.kyp-review-preview { position: relative; flex: 0 0 88px; width: 88px; min-width: 0; border: 1px solid #dce1d9; border-radius: 10px; background: #fff; }
.kyp-review-upload .kyp-review-preview img { display: block; width: 86px; height: 86px; object-fit: cover; border-radius: 9px 9px 0 0; }
.kyp-review-preview-name { display: block; padding: 6px; overflow: hidden; color: #586053; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.kyp-review-upload .kyp-review-remove { position: absolute; top: -9px; right: -9px; display: grid; place-items: center; width: 36px; height: 36px; min-width: 36px; min-height: 36px; margin: 0; padding: 0; border: 1px solid #d1d8ce; border-radius: 50%; background: #fff; color: #29392d; font-size: 24px; line-height: 1; box-shadow: 0 2px 6px #00000014; cursor: pointer; }
.kyp-review-upload-error { margin-top: 12px; padding: 12px 14px; border: 1px solid #ebc5bf; border-radius: 8px; background: #fff5f3; color: #8a3025; font-size: 13px; line-height: 1.6; }
.kyp-review-upload-error:empty { display: none; }
.kyp-review-upload .kyp-review-error-dismiss { display: inline; min-height: 44px; padding: 4px 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.kyp-review-gallery { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin: 14px 0 6px; }
.kyp-review-gallery .kyp-review-photo { display: block; flex: 0 0 auto; width: 100px; height: 100px; max-width: 100%; min-width: 0; margin: 0; padding: 0; overflow: hidden; border: 1px solid #e0e3dc; border-radius: 10px; background: #f4f5f0; box-shadow: none; cursor: zoom-in; }
.kyp-review-gallery .kyp-review-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .18s ease; }
.kyp-review-gallery .kyp-review-photo:hover img { transform: scale(1.04); }
.kyp-review-receipt { margin: 20px 0; padding: 18px 20px; border: 1px solid #bed0b8; border-inline-start: 4px solid #4e6d43; border-radius: 10px; background: #f1f7ed; color: #304c2c; font-size: 15px; line-height: 1.65; scroll-margin-block: 120px; }
.kyp-review-receipt[hidden], .kyp-review-upload [hidden], .kyp-review-lightbox [hidden] { display: none !important; }
.kyp-review-lightbox-open { overflow: hidden; }
.kyp-review-lightbox { position: fixed; width: min(1000px, calc(100vw - 40px)); max-width: none; max-height: calc(100dvh - 40px); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 16px; background: #161b18; color: #fff; box-shadow: 0 24px 100px #0005; }
.kyp-review-lightbox::backdrop { background: #0a130de8; }
.kyp-review-lightbox-panel { position: relative; padding: 60px 24px 18px; }
.kyp-review-lightbox .kyp-review-lightbox-image { display: block; width: 100%; height: min(65vh, 700px); object-fit: contain; }
.kyp-review-lightbox button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 10px 16px; border: 1px solid #637369; border-radius: 8px; background: #29372e; color: #fff; font: inherit; font-size: 14px; line-height: 1.4; cursor: pointer; }
.kyp-review-lightbox button:hover { background: #3c5042; }
.kyp-review-lightbox .kyp-review-lightbox-close { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 28px; }
.kyp-review-lightbox-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.kyp-review-lightbox-controls span { flex: 1; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.kyp-review-upload :focus-visible, .kyp-review-gallery :focus-visible, .kyp-review-receipt:focus-visible { outline: 3px solid #417b4e; outline-offset: 4px; }
.kyp-review-lightbox :focus-visible { outline: 3px solid #d5efc4; outline-offset: 3px; }
@media (max-width: 600px) {
  .kyp-review-upload { padding: 16px; }
  .kyp-review-gallery { gap: 8px; }
  .kyp-review-gallery .kyp-review-photo { width: 76px; height: 76px; }
  .kyp-review-lightbox { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .kyp-review-lightbox-panel { padding: 60px 12px 14px; }
  .kyp-review-lightbox .kyp-review-lightbox-image { height: 60vh; }
  .kyp-review-lightbox button { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { .kyp-review-gallery .kyp-review-photo img { transition: none; } }

/* Compact even without JS; previews/errors expand below both columns. */
.kyp-review-upload-info, .kyp-review-upload-controls { min-width: 0; }
.kyp-review-upload .kyp-review-upload-info p { margin: 0; line-height: 1.5; }
.kyp-review-upload .kyp-review-upload-count { margin: 4px 0 0; }
.kyp-review-upload > .kyp-review-previews, .kyp-review-upload > .kyp-review-upload-error { grid-column: 1 / -1; margin: 0; }
.kyp-review-upload label span { font-weight: 400; }
.woocommerce-account-fields:has(> .kyp-checkout-account-help) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.woocommerce-account-fields:has(> .kyp-checkout-account-help) > p.create-account { flex: 0 0 auto; width: auto; margin: 0; padding: 0; }
.woocommerce-account-fields > .kyp-checkout-account-help { flex: 1 1 260px; margin: 0; color: #465247; font-size: 13px; line-height: 1.6; }
.woocommerce-account-fields:has(> .kyp-checkout-account-help) > div.create-account { flex-basis: 100%; }
@media (max-width: 600px) { .kyp-review-upload { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
