[hidden]{ display:none !important; }

/* =========================================================
   RIH DIL — Build Transfer (rih-build-transfer.css)
   Builder-only styling

   Scope:
   - builder layout
   - builder shells
   - upload / file card
   - preview area
   - placement tiles
   - inline controls
   - size guide / controls modals
   - file requirements modal
   - preset design library

   Important:
   - Uses global tokens from style.css
   - Uses global container tokens from style.css
   - Uses global button system from style.css
   - Does NOT redefine .rih-btn / .rih-btn-primary / .rih-btn-ghost
   ========================================================= */
/* =========================================================
   ASTRA WRAPPER OVERRIDE — BUILD TRANSFER ONLY
   Let the builder section go full bleed while keeping
   inner content controlled by .rih-bt-wrap
   ========================================================= */

.ast-separate-container .entry-content > .rih-page-shell,
.ast-separate-container .entry-content > .rih-page-shell > .rih-bt,
.site-content .rih-page-shell,
.site-content .rih-page-shell > .rih-bt{
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.ast-separate-container .entry-content > .rih-page-shell{
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: transparent;
}

.rih-bt{
  --line: rgba(37,99,235,0.16);
  --line2: rgba(37,99,235,0.10);

  --radius: 18px;
  --shadow: var(--rih-shadow-md);
  --shellInset: clamp(10px, 2.2vw, 18px);

  color: var(--rih-text);
  background: var(--rih-bg);
  padding: 28px 0 40px;

  position: relative;
  overflow: visible;
  isolation: isolate;
}

.rih-bt::before{
  content: "";
  position: absolute;
  inset: -260px -20vw auto -20vw;
  height: 760px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1100px 520px at 50% 0%, rgba(96,165,250,0.08), transparent 78%),
    radial-gradient(760px 360px at 82% 70px, rgba(96,165,250,0.04), transparent 78%);
}

.rih-bt > *{
  position: relative;
  z-index: 1;
}

.rih-bt,
.rih-bt *{
  box-sizing: border-box;
}

.rih-bt-wrap{
  max-width: var(--rihdil-container);
  margin-left: auto;
  margin-right: auto;
}

html,
body{
  overflow-x: hidden;
}
/* =========================================================
   BUILDER HERO
   ========================================================= */

.rih-bt-hero{
  margin-bottom: 18px;
}

.rih-bt-h1{
  margin: 0 0 6px;
  font-size: clamp(34px, 4.2vw, 56px);
  letter-spacing: -0.02em;
  font-weight: 800;
}

.rih-bt-sub{
  margin: 0;
  color: var(--rih-muted);
  font-size: 15px;
  line-height: 1.5;
}

/* =========================================================
   BUILDER GRID + SHARED SHELLS
   ========================================================= */

.rih-bt-grid{
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 18px;
  align-items: start;
}

@media (min-width: 1024px){
  .rih-bt-grid{
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-areas:
      "step1 preview"
      "step2 step3";
    align-items: stretch; /* IMPORTANT for equal height feeling */
    gap: 18px;
  }

  /* LEFT COLUMN */
  .rih-bt-grid > [data-step="1"]{
    grid-area: step1;
  }

  .rih-bt-grid > [data-step="2"]{
    grid-area: step2;
  }

  /* RIGHT COLUMN */
  .rih-bt-grid > [data-step="1b"]{
    grid-area: preview;
    display: flex;
    flex-direction: column;
  }

  .rih-bt-grid > [data-step="3"]{
    grid-area: step3;
    display: flex;
    flex-direction: column;
  }

  /* MAKE CONTENT FILL EVENLY */
  .rih-bt-grid > [data-step="1b"] .rih-bt-preview-shell{
    flex: 1 1 auto;
  }

  .rih-bt-grid > [data-step="3"] .rih-bt-wide-body{
    flex: 1 1 auto;
  }
  
}

@media (max-width: 980px){
  .rih-bt-grid{
    grid-template-columns: 1fr;
  }
  
  .rih-bt{
  padding: 28px 14px 40px;
}
}





.rih-bt-card-stack{
  padding: 14px 16px 16px;
}

.rih-bt-card-stack .rih-bt-wide-head{
  margin-bottom: 14px;
}

.rih-bt-wide-body{
  display: grid;
  gap: 14px;
}

.rih-bt-step3-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}


.rih-bt-shell{
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow:
  0 10px 30px rgba(15,23,42,0.06),
  0 2px 6px rgba(15,23,42,0.04);
  position: relative;
  overflow: hidden;
}

.rih-bt-shell:before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.68) 0%,
    rgba(255,255,255,0) 42%
  );
}

.rih-bt-card,
.rih-bt-wide{
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.rih-bt-card:before,
.rih-bt-wide:before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.68) 0%,
    rgba(255,255,255,0) 42%
  );
}


.rih-bt-card:before{
  border-radius: var(--radius);
  opacity: 0.8;
}

.rih-bt-wide:before{
  opacity: 0.7;
}

.rih-bt-card > *,
.rih-bt-wide > *{
  position: relative;
}

.rih-bt-card-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(37,99,235,0.10);
  background: rgba(255,255,255,0.55);
}

.rih-bt-step{
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2563EB;
  font-weight: 800;
}

.rih-step-complete .rih-bt-step{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rih-step-complete .rih-bt-step::after{
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(37,99,235,0.10);
  color: #1D4ED8;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,0.18);
}

.rih-bt-title{
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--rih-text);
}
/* =========================================================
   DROPZONE
   ========================================================= */

.rih-bt-dropzone{
  padding: 14px 16px 16px;
}

.rih-bt-dropzone-inner{
  border-radius: 16px;
  border: 1px dashed rgba(37,99,235,0.14);
  padding: 18px 14px;
  text-align: left;
  min-height: 150px;
  background: #f8fbff;
  transition: all .2s ease;
}
.rih-bt-dropzone-inner:hover{
  border-color: #60A5FA;
  background: #f0f6ff;
}

.rih-bt-dropzone-icon{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(37,99,235,0.16);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(15,23,42,0.05);
}

.rih-bt-dropzone-icon::before{
  content: "\f093";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 18px;
  color: #2563EB;
}

.rih-bt-dropzone-title{
  margin-top: 14px;
  font-weight: 800;
  color: var(--rih-text);
}

.rih-bt-dropzone-sub{
  margin-top: 2px;
  color: var(--rih-muted);
}

.rih-bt-dropzone-actions{
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* =========================================================
   FILE CARD
   ========================================================= */

.rih-bt-filecard{
  padding: 14px 16px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rih-bt-filethumb{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(37,99,235,0.14);
  background: #f5f8ff;
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}

.rih-bt-filemeta{
  min-width: 0;
  flex: 1 1 auto;
}

.rih-bt-filename{
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.rih-bt-filesub{
  margin-top: 2px;
  color: var(--rih-muted);
  font-size: 12px;
  line-height: 1.35;
}

.rih-bt-dot{
  margin: 0 6px;
  opacity: 0.6;
}

.rih-bt-remove{
  white-space: nowrap;
  flex: 0 0 auto;
}

.rih-bt-filedims{
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
  color: #475569;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.rih-bt-filewarn{
  font-weight: 800;
}

.rih-bt-filewarn.is-ok{ color: rgba(16,185,129,0.95); }
.rih-bt-filewarn.is-warn{ color: rgba(245,158,11,0.95); }
.rih-bt-filewarn.is-bad{ color: rgba(239,68,68,0.95); }

@media (max-width: 640px){
  .rih-bt-filecard{
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "thumb meta"
      "thumb remove";
    align-items: start;
    gap: 10px 12px;
  }
  
  .rih-bt{
  padding: 28px 14px 40px;
}

  .rih-bt-filethumb{
    grid-area: thumb;
  }

  .rih-bt-filemeta{
    grid-area: meta;
    min-width: 0;
  }

  .rih-bt-remove{
    grid-area: remove;
    justify-self: start;
    margin-top: 2px;
    white-space: normal;
  }

  .rih-bt-filename,
  .rih-bt-filesub{
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

/* =========================================================
   MINI GEAR / INLINE CONTROLS
   ========================================================= */

.rih-bt-mini-pill{
  width: 44px;
  height: 30px;
  border-radius: 12px;
  border: 1px solid rgba(37,99,235,0.18);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #2563EB;
}


.rih-bt-mini-pill i{
  font-size: 16px;
  color: #2563EB;
  transition: transform .18s ease;
  line-height: 1;
}

.rih-bt-mini-pill:hover i{
  transform: rotate(22deg);
}

.rih-bt-mini-pill:hover,
.rih-bt-mini-pill:focus,
.rih-bt-mini-pill:focus-visible,
.rih-bt-mini-pill[aria-expanded="true"],
.rih-bt-mini-pill.is-active{
  border-color: rgba(37,99,235,0.24);
  background: #ffffff;
  color: #2563EB;
  box-shadow: 0 8px 20px rgba(37,99,235,0.08);
  outline: none;
}

.rih-bt-inline-controls{
  padding: 10px 16px 6px;
  border-bottom: 1px solid rgba(37,99,235,0.10);
  display: grid;
  gap: 10px;
  background: rgba(96,165,250,0.05);
}

.rih-bt-inline-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rih-bt-inline-row-2{
  gap: 10px;
  align-items: stretch;
}

.rih-bt-inline-label{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--rih-text);
}

.rih-bt-inline-label i{
  color: #2563EB;
}

.rih-bt-inline-toggle{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  border: 1px solid rgba(37,99,235,0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--rih-text);
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 900;
  flex: 1 1 220px;
  min-width: 220px;
}

.rih-bt-inline-toggle:hover,
.rih-bt-inline-toggle:focus,
.rih-bt-inline-toggle:focus-visible,
.rih-bt-inline-toggle.is-active{
  border-color: rgba(37,99,235,0.24);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(37,99,235,0.08);
  outline: none;
  color: var(--rih-text);
}

.rih-bt-inline-toggle:hover .rih-bt-inline-toggle-left,
.rih-bt-inline-toggle:focus .rih-bt-inline-toggle-left,
.rih-bt-inline-toggle:focus-visible .rih-bt-inline-toggle-left,
.rih-bt-inline-toggle.is-active .rih-bt-inline-toggle-left{
  color: var(--rih-text);
}

.rih-bt-inline-toggle:hover .rih-bt-inline-toggle-left i,
.rih-bt-inline-toggle:focus .rih-bt-inline-toggle-left i,
.rih-bt-inline-toggle:focus-visible .rih-bt-inline-toggle-left i,
.rih-bt-inline-toggle.is-active .rih-bt-inline-toggle-left i{
  color: #2563EB;
}

.rih-bt-inline-toggle-left{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--rih-text);
}

.rih-bt-inline-toggle-left i{
  color: #2563EB;
}


.rih-bt-inline-slider{
  white-space: nowrap;
  flex: 1 1 240px;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
  border: 1px solid rgba(37,99,235,0.16);
  background: #ffffff;
  padding: 10px 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}

.rih-bt-inline-slider-text{
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--rih-text);
  min-width: 64px;
}

.rih-bt-inline-slider input[type="range"]{
  -webkit-appearance: none;
  appearance: none;
  width: 180px;
  max-width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  outline: none;
}

.rih-bt-inline-slider input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #60A5FA;
  border: 2px solid #2563EB;
  box-shadow: 0 6px 18px rgba(37,99,235,0.22);
  cursor: pointer;
}

.rih-bt-inline-slider input[type="range"]::-moz-range-thumb{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #60A5FA;
  border: 2px solid #2563EB;
  box-shadow: 0 6px 18px rgba(37,99,235,0.22);
  cursor: pointer;
}

.rih-bt-inline-slider input[type="range"]::-moz-range-track{
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
}

.rih-bt-controls-panel label,
.rih-bt-inline-controls label{
  white-space: nowrap;
}

.rih-bt-controls-panel .rih-bt-field{
  min-width: 140px;
}

.rih-bt select,
.rih-bt input[type="text"],
.rih-bt input[type="number"],
.rih-bt input[type="search"]{
  width: 100%;
  border: 1px solid rgba(37,99,235,0.14);
  background: #ffffff;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  caret-color: #2563EB;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  opacity: 1;
}

.rih-bt input[type="number"],
.rih-dl__search input,
#rih-dl-search{
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  font-weight: 600;
  opacity: 1;
}

.rih-bt input[type="number"]::placeholder,
.rih-dl__search input::placeholder,
#rih-dl-search::placeholder{
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
  opacity: 1 !important;
}

.rih-bt input[type="number"]::-webkit-input-placeholder,
.rih-dl__search input::-webkit-input-placeholder,
#rih-dl-search::-webkit-input-placeholder{
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
  opacity: 1 !important;
}

.rih-bt input[type="number"]::-moz-placeholder,
.rih-dl__search input::-moz-placeholder,
#rih-dl-search::-moz-placeholder{
  color: #94A3B8 !important;
  opacity: 1 !important;
}



.rih-bt input[type="number"]::selection,
.rih-bt input[type="search"]::selection,
.rih-dl__search input::selection,
#rih-dl-search::selection{
  background: rgba(37,99,235,0.18);
  color: #0F172A;
}

.rih-bt input[type="number"]::-moz-selection,
.rih-bt input[type="search"]::-moz-selection,
.rih-dl__search input::-moz-selection,
#rih-dl-search::-moz-selection{
  background: rgba(37,99,235,0.18);
  color: #0F172A;
}

.rih-bt input[type="number"]:not(:placeholder-shown),
.rih-bt input[type="number"]:valid{
  color: var(--rih-text);
}

.rih-bt select{
  background-image:
    linear-gradient(45deg, transparent 50%, #64748B 50%),
    linear-gradient(135deg, #64748B 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.rih-bt select:focus,
.rih-bt input[type="text"]:focus,
.rih-bt input[type="number"]:focus,
.rih-bt input[type="search"]:focus{
  outline: none;
  border-color: rgba(37,99,235,0.28);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.14);
}

.rih-bt select option{
  color: var(--rih-text);
  background: #ffffff;
}

.rih-bt select option[value=""]{
  color: #94A3B8;
}

.rih-bt select:required:invalid,
.rih-bt select:invalid{
  color: #94A3B8;
}

.rih-bt select:focus,
.rih-bt select:active{
  color: var(--rih-text);
}

.rih-bt input[type="number"]::-webkit-outer-spin-button,
.rih-bt input[type="number"]::-webkit-inner-spin-button{
  opacity: 1;
}

.rih-bt input::placeholder,
.rih-bt select:invalid{
  color: #94A3B8;
}

/* Hide opacity controls when realism is OFF */
.rih-bt.is-realism-off [data-action="realism-opacity"],
.rih-bt.is-realism-off .rih-bt-inline-slider{
  display: none !important;
}



/* =========================================================
   PREVIEW SHELL
   ========================================================= */

.rih-bt-preview-shell{
  margin: 14px var(--shellInset) 12px !important;
  border-radius: 16px;
  border: 1px solid rgba(37,99,235,0.10);
  background: #fff !important;
  position: relative;
  overflow: hidden;
  aspect-ratio: 257 / 265;
}

.rih-bt-preview-shell::after{
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.18) !important;
  pointer-events: none;
}

.rih-bt .rih-bt-preview-shell{
  background: #fff !important;
  border-color: rgba(0,0,0,0.18) !important;
}

.rih-bt-layer{
  position: absolute;
  inset: 0;
}

.rih-bt-layer img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.rih-bt-layer-base{
  background: transparent;
  border-radius: inherit;
  transition: background .15s ease;
}

.rih-bt.is-base-bg-light .rih-bt-layer-base{
  background: rgba(255,255,255,0.92);
}

.rih-bt-layer-realism{
  opacity: var(--rih-realism-opacity, 0.22);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.rih-bt-preview-shell .rih-bt-layer-base > svg,
.rih-bt-preview-shell .rih-bt-layer-base > img{
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 100% !important;
  height: 100% !important;
  transform: translate(-50%,-50%) scale(0.84) !important;
  transform-origin: center center !important;
  display: block !important;
  pointer-events: none !important;
}

.rih-bt-boundary{
  position: absolute;
  border: 2px solid rgba(37,99,235,0.90);
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(96,165,250,0.16);
  display: none;
  pointer-events: none;
}

/* =========================================================
   ARTWORK BOX
   ========================================================= */

.rih-bt-artbox{
  position: absolute;
  border: 2px solid rgba(37,99,235,0.95);
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(96,165,250,0.16);
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
  user-select: none;
}

.rih-bt-artbox:active{
  cursor: grabbing;
}

.rih-bt-artbox img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.rih-bt-handle{
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #60A5FA;
  border: 2px solid #2563EB;
  box-shadow: 0 2px 10px rgba(37,99,235,0.28);
}

.rih-bt-handle.nw{ left: -7px; top: -7px; cursor: nwse-resize; }
.rih-bt-handle.ne{ right: -7px; top: -7px; cursor: nesw-resize; }
.rih-bt-handle.sw{ left: -7px; bottom: -7px; cursor: nesw-resize; }
.rih-bt-handle.se{ right: -7px; bottom: -7px; cursor: nwse-resize; }

/* =========================================================
   MEASUREMENT OVERLAY
   ========================================================= */

.rih-bt-measure{
  position: absolute;
  pointer-events: none;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0.98;
}

.rih-bt-measure-x{
  position: absolute;
  max-width: calc(100% - 24px);
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rih-bt-measure-y{
  position: absolute;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left top;
}

.rih-bt-measure-label{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  min-width: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: #111;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}

.rih-bt-measure-x::before,
.rih-bt-measure-y::before{
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140px;
  max-width: 90vw;
  height: 1px;
 background: rgba(37,99,235,0.18);
  transform: translate(-50%, -50%);
  border-radius: 999px;
  opacity: 0.55;
}

@media (max-width: 600px){
  .rih-bt-measure-x{
    top: 10px;
    font-size: 12px;
    padding: 6px 10px;
  }
  
  .rih-bt{
  padding: 28px 14px 40px;
}
}

@media (max-width: 560px){
  .rih-bt-measure-x{
    top: 10px;
  }
  
  .rih-bt{
  padding: 28px 14px 40px;
}

  .rih-bt-measure-y{
    left: 10px;
  }

  .rih-bt-measure-label{
    font-size: 11px;
    padding: 6px 9px;
  }

  .rih-bt-measure-x::before,
  .rih-bt-measure-y::before{
    width: 110px;
  }
}

/* =========================================================
   STEP 2 / WIDE PANEL
   ========================================================= */

.rih-bt-wide{
  margin-top: 18px;
  padding: 14px 16px 16px;
}

.rih-bt-wide-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line2);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.rih-bt-placements{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}

@media (max-width: 980px){
  .rih-bt-placements{
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}

@media (max-width: 560px){
  .rih-bt-placements{
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

/* =========================================================
   STEP 3 / TIER PRICING PANEL
   ========================================================= */

.rih-tier-panel{
  margin-top: 14px;
  padding: 0;
}

.rih-tier-card{
  border-radius: 18px;
  border: 1px solid rgba(37,99,235,0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 16px 18px;
  box-shadow:
    0 10px 24px rgba(15,23,42,0.05),
    inset 0 1px 0 rgba(255,255,255,0.65);
}

.rih-tier-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
}

.rih-tier-row + .rih-tier-row{
  border-top: 1px solid rgba(37,99,235,0.08);
}

.rih-tier-label{
  font-size: 15px;
  font-weight: 700;
  color: var(--rih-muted);
}

.rih-tier-value{
  font-size: 16px;
  font-weight: 900;
  color: var(--rih-text);
  text-align: right;
  white-space: nowrap;
}

.rih-tier-total{
  font-size: 17px;
  font-weight: 900;
  color: #2563EB;
  text-align: right;
  white-space: nowrap;
}

.rih-tier-helper{
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(37,99,235,0.20);
  background: #f5f8ff;
  color: #1D4ED8;
  font-size: 15px;
  line-height: 1.45;
}

.rih-tier-helper:empty{
  display: none;
}

.rih-tier-panel .rih-bt-summary-actions{
  margin-top: 14px;
}

.rih-tier-panel .rih-btn{
  min-width: 136px;
}

@media (max-width: 640px){
  .rih-tier-card{
    padding: 14px 14px;
  }

  .rih-tier-row{
    gap: 12px;
    padding: 7px 0;
  }

  .rih-tier-label{
    font-size: 14px;
  }

  .rih-tier-value,
  .rih-tier-total{
    font-size: 15px;
  }

  .rih-tier-helper{
    font-size: 14px;
    padding: 12px 14px;
  }
}

/* =========================================================
   PLACEMENT TILES
   ========================================================= */

.rih-bt-place{
  border-radius: 16px;
  border: 1px solid rgba(37,99,235,0.10);
  background: #f8fbff;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  color: var(--rih-text);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.rih-bt-place:hover{
  border-color: rgba(37,99,235,0.24);
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(37,99,235,0.10);
}

.rih-bt-place.is-active{
  outline: 2px solid rgba(37,99,235,0.22);
  border-color: rgba(37,99,235,0.28);
  background: #ffffff;
}

.rih-bt-place-img{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(37,99,235,0.10);
  background-position: center;
  background-color: #ffffff;
  background-size: contain;
  background-repeat: no-repeat;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.rih-bt-tile-layers{
  position: absolute;
  inset: 0;
}

.rih-bt-tile-layer{
  position: absolute;
  inset: 0;
}

.rih-bt-tile-layer svg{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82%;
  height: auto;
  transform: translate(-50%,-50%);
  display: block;
}

.rih-bt-tile-layer img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Hidden until upload exists */
.rih-bt-place .rih-bt-place-art{
  position: absolute;
  left: 50%;
  top: 50%;
  transform:
    translate(-50%, -50%)
    translate(var(--art-x, 0px), var(--art-y, 0px))
    scale(var(--art-s, 1));
  width: 26%;
  height: auto;
  object-fit: contain;
  display: none;
  pointer-events: none;
}

.rih-bt-place.has-art .rih-bt-place-art{
  display: block;
}

.rih-bt-upload-note{
  margin-top: 10px;
  font-size: 13px;
  opacity: .75;
}

.rih-bt-place[data-placement="front"]{
  --art-x: 0px;
  --art-y: -20px;
  --art-s: 0.95;
}

.rih-bt-place[data-placement="back"]{
  --art-x: 0px;
  --art-y: -20px;
  --art-s: 0.95;
}

.rih-bt-place[data-placement="left_chest"]{
  --art-x: 15px;
  --art-y: -20px;
  --art-s: 0.60;
}

.rih-bt-place[data-placement="left_sleeve"]{
  --art-x: 10px;
  --art-y: 0px;
  --art-s: 0.65;
}

.rih-bt-place[data-placement="right_sleeve"]{
  --art-x: -10px;
  --art-y: 0px;
  --art-s: 0.65;
}

.rih-bt-place[data-placement="back_collar"]{
  --art-x: 2px;
  --art-y: -43px;
  --art-s: 0.40;
}

.rih-bt-place-label{
  font-weight: 900;
  color: var(--rih-text);
}

.rih-bt-preview-foot{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 var(--shellInset) 14px;
}

.rih-bt-sizeguide{
  margin-top: 0;
}



.rih-bt-dpi-inline{
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.rih-bt-dpi-inline.is-ok{ color: rgba(16,185,129,0.95); }
.rih-bt-dpi-inline.is-warn{ color: rgba(245,158,11,0.95); }
.rih-bt-dpi-inline.is-bad{ color: rgba(239,68,68,0.95); }

.rih-bt-note{
  color: var(--rih-muted);
  padding: 6px 0;
}

/* Always fit artwork inside placement tiles */
.rih-bt-place img,
.rih-bt-place .rih-bt-art,
.rih-bt-place .rih-art,
.rih-bt-place .artwork,
.rih-bt-place .preview-art{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.rih-bt-place .rih-bt-art,
.rih-bt-place .rih-art,
.rih-bt-place .artwork,
.rih-bt-place .preview-art{
  display: flex;
  align-items: center;
  justify-content: center;
}



@media (max-width: 640px){
  .rih-bt-place{
    align-items: center;
  }

  .rih-bt-place .rih-bt-place__img,
  .rih-bt-place .rih-bt-thumb,
  .rih-bt-place .thumb,
  .rih-bt-place .preview{
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* =========================================================
   ROW ICON / SWATCHES
   ========================================================= */

.rih-bt-rowhead{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 8px;
}

.rih-bt-rowicon{
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(37,99,235,0.10);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rih-bt-rowicon::before{
  content: "\f553";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 14px;
  color: #2563EB;
}

.rih-bt-rowtitle{
  font-weight: 900;
}

.rih-bt-swatches{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.rih-bt-swatch{
  width: 38px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(37,99,235,0.10);
  cursor: pointer;
  background: #111;
  padding: 0;
  position: relative;
}

.rih-bt-swatch.is-active{
  outline: 2px solid rgba(37,99,235,0.24);
}

.rih-bt-swatch.is-custom{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #60A5FA 0%, #2563EB 100%);
}

.rih-bt-swatch.is-custom i{
  color: rgba(0,0,0,0.85);
  font-size: 14px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
  pointer-events: none;
}

.rih-bt-color-input{
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  border: 0;
  padding: 0;
  margin: 0;
}

/* =========================================================
   CONTROLS MODAL
   ========================================================= */

.rih-bt-controls-modal{
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}

.rih-bt.is-controls-open .rih-bt-controls-modal{
  display: block;
}

.rih-bt-controls-overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(6px);
}

.rih-bt-controls-panel{
  position: fixed;

  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* center */

  width: min(420px, calc(100% - 32px));

  z-index: 1000000;

  border-radius: 18px;
  border: 1px solid rgba(37,99,235,0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 30px 80px rgba(15,23,42,0.25);

  overflow: hidden;

  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  outline: none;
}

.rih-bt.is-controls-open .rih-bt-controls-panel{
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.rih-bt-controls-panel{
  transform: translate(-50%, -52%) scale(0.96);
}

.rih-bt-controls-panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(37,99,235,0.10);
  background: rgba(96,165,250,0.05);
}

.rih-bt-controls-panel-title{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--rih-text);
}

.rih-bt-controls-close,
.rih-bt-sz-head .rih-close-btn{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(37,99,235,0.18) !important;
  background: #ffffff !important;
  color: #2563EB !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 8px 20px rgba(15,23,42,0.06);
}

.rih-bt-controls-close:hover,
.rih-bt-sz-head .rih-close-btn:hover{
  background: #f5f8ff !important;
  border-color: rgba(37,99,235,0.24) !important;
  color: #1D4ED8 !important;
}

.rih-bt-controls-close:focus-visible,
.rih-bt-sz-head .rih-close-btn:focus-visible{
  outline: 2px solid rgba(96,165,250,0.18) !important;
  outline-offset: 2px;
}

.rih-bt-controls-panel-body{
  padding: 12px 14px 14px;
}

.rih-bt-actions{
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.rih-bt-action{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(37,99,235,0.14);
  background: #ffffff;
  color: var(--rih-text);
  font-weight: 900;
  cursor: pointer;
  text-align: left;
  transition: transform .08s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

.rih-bt-action:hover{
  transform: translateY(-1px);
  border-color: rgba(37,99,235,0.24);
  background: #f8fbff;
  box-shadow: 0 10px 22px rgba(37,99,235,0.10);
}

.rih-bt-action:hover,
.rih-bt-action:focus,
.rih-bt-action:focus-visible,
.rih-bt-action.is-active{
  color: var(--rih-text) !important;
}

.rih-bt-action:hover .rih-bt-action-left,
.rih-bt-action:focus .rih-bt-action-left,
.rih-bt-action:focus-visible .rih-bt-action-left,
.rih-bt-action.is-active .rih-bt-action-left{
  color: var(--rih-text) !important;
}

.rih-bt-action:hover .rih-bt-action-left span,
.rih-bt-action:hover .rih-bt-action-left strong,
.rih-bt-action:hover .rih-bt-action-left b,
.rih-bt-action:focus .rih-bt-action-left span,
.rih-bt-action:focus .rih-bt-action-left strong,
.rih-bt-action:focus .rih-bt-action-left b,
.rih-bt-action:focus-visible .rih-bt-action-left span,
.rih-bt-action:focus-visible .rih-bt-action-left strong,
.rih-bt-action:focus-visible .rih-bt-action-left b,
.rih-bt-action.is-active .rih-bt-action-left span,
.rih-bt-action.is-active .rih-bt-action-left strong,
.rih-bt-action.is-active .rih-bt-action-left b{
  color: var(--rih-text) !important;
}

.rih-bt-action:hover i,
.rih-bt-action:focus i,
.rih-bt-action:focus-visible i,
.rih-bt-action.is-active i{
  color: #2563EB !important;
}

.rih-bt-action .rih-bt-action-left{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--rih-text);
}

.rih-bt-action i{
  color: #2563EB;
}

.rih-bt-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37,99,235,0.16);
  background: #f5f8ff;
  color: var(--rih-muted);
  font-size: 12px;
  font-weight: 900;
  min-width: 56px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.rih-bt-pill.is-on{
  background: rgba(37,99,235,0.10);
  border-color: rgba(37,99,235,0.28);
  color: #1D4ED8;
}

.rih-bt-hint{
  margin-top: 2px;
  font-size: 12px;
  color: var(--rih-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(37,99,235,0.12);
  background: #f5f8ff;
}
.rih-bt-hint--preview{
  margin: 0 var(--shellInset) 14px;
}
@media (min-width: 1024px){
  .rih-bt-grid > [data-step="1b"],
  .rih-bt-grid > [data-step="3"]{
    display: flex;
    flex-direction: column;
  }

  .rih-bt-grid > [data-step="1b"] .rih-bt-preview-shell{
    flex: 1 1 auto;
  }

  .rih-bt-grid > [data-step="3"] .rih-bt-wide-body{
    flex: 1 1 auto;
  }

  .rih-bt-grid > [data-step="3"] .rih-bt-hint{
    margin-top: 12px;
  }
}

.rih-bt-hint b{
  color: #2563EB;
}

.rih-bt-hint--preview{
  margin: 0 var(--shellInset) 14px;
}

/* =========================================================
   SIZE GUIDE MODAL
   ========================================================= */

.rih-bt-sz-modal{
  position: fixed;
  inset: 0;
  z-index: 999998;
  display: none;
}

.rih-bt.is-sizeguide-open .rih-bt-sz-modal{
  display: block;
}

.rih-bt-sz-overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.70);
  backdrop-filter: blur(6px);
}

.rih-bt-sz-panel{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(760px, calc(100% - 28px));
  max-height: min(80vh, 640px);
  border-radius: 18px;
  border: 1px solid rgba(37,99,235,0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 18px 40px rgba(15,23,42,0.10);
  overflow: hidden;
  opacity: 0;
  transition: transform .16s ease, opacity .16s ease;
  outline: none;
}

.rih-bt.is-sizeguide-open .rih-bt-sz-panel{
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rih-bt-sz-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(37,99,235,0.10);
  background: rgba(96,165,250,0.05);
}

.rih-bt-sz-title{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--rih-text);
}

.rih-bt-sz-body{
  padding: 14px;
  background: #ffffff;
  max-height: calc(min(80vh, 640px) - 56px);
  overflow: auto;
}

.rih-bt-sz-body img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(37,99,235,0.10);
  background: #f8fbff;
}

/* =========================================================
   FILE REQUIREMENTS MODAL
   ========================================================= */

.rih-modal{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.rih-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}

.rih-modal__panel{
  position: relative;
  max-width: 720px;
  width: calc(100% - 32px);
  margin: 64px auto;
  padding: 18px 18px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(37,99,235,0.16);
  box-shadow: 0 20px 44px rgba(15,23,42,0.10);
}

.rih-modal__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.rih-modal__title{
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.rih-modal__close{
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.rih-modal__body{
  padding: 6px 0 10px;
}

.rih-req-list{
  margin: 0 0 14px 18px;
}

.rih-req-list li{
  margin: 10px 0;
}

.rih-modal__note{
  opacity: 0.85;
  margin-top: 6px;
}

.rih-modal__foot{
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 10px;
}

.rih-modal-open{
  overflow: hidden;
}

/* =========================================================
   PRESET DESIGN LIBRARY
   ========================================================= */
.rih-dl{
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(37,99,235,0.10);
  border-radius: 14px;
  background: #f8fbff;
}

.rih-dl__head{
  margin-bottom: 10px;
}

.rih-dl__title{
  margin: 0;
  font-size: 18px;
  color: var(--rih-text);
}

.rih-dl__sub{
  margin: 4px 0 0;
  opacity: 1;
  font-size: 13px;
  color: var(--rih-muted);
}

.rih-dl__controls{
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 12px 0 10px;
}

.rih-dl__cats{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rih-dl__search input{
  width: min(340px, 100%);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(37,99,235,0.14);
  background: #ffffff;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  caret-color: #2563EB;
  opacity: 1;
}

.rih-dl__grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  min-height: 40px;
}

@media (min-width: 720px){
  .rih-dl__grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.rih-dl__pager{
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
  opacity: 1;
}

.rih-dl__count{
  font-size: 12px;
  color: var(--rih-muted);
  margin-left: 10px;
  align-self: center;
}

.rih-dl__card{
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(37,99,235,0.10);
  background: #ffffff;
  overflow: hidden;
  padding: 0;
  text-align: left;
  color: var(--rih-text);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

.rih-dl__card:hover{
  transform: translateY(-2px);
  border-color: rgba(37,99,235,0.22);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(37,99,235,0.10);
}

.rih-dl__card.is-selected{
  border-color: rgba(37,99,235,0.28);
  box-shadow: 0 0 0 2px rgba(96,165,250,0.12);
}

.rih-dl__img{
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5f8ff;
  border-radius: 14px;
  border-bottom: 1px solid rgba(37,99,235,0.08);
}

@media (min-width: 720px){
  .rih-dl__img{
    height: 120px;
  }
}

@media (max-width: 640px){
  .rih-dl__img{
    height: 140px;
  }
}

.rih-dl__meta{
  padding: 12px 12px 14px;
  background: #ffffff;
}

.rih-dl__name{
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  margin: 0;
  color: var(--rih-text);
}

.rih-dl__hint{
  margin-top: 6px;
  font-size: 12px;
  color: var(--rih-muted);
  opacity: 1;
}

.rih-dl__badge{
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(37,99,235,0.16);
  background: rgba(255,255,255,0.92);
  color: #2563EB;
  backdrop-filter: blur(6px);
}

.rih-dl__chip{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37,99,235,0.12);
  background: #ffffff;
  color: var(--rih-text);
  cursor: pointer;
  font-size: 12px;
}

.rih-dl__chip.is-active{
  border-color: rgba(37,99,235,0.24);
  background: rgba(37,99,235,0.08);
  color: #1D4ED8;
}

.rih-dl__page{
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(37,99,235,0.12);
  background: #ffffff;
  color: var(--rih-text);
  cursor: pointer;
  font-size: 12px;
}

.rih-dl__page.is-active{
  border-color: rgba(37,99,235,0.24);
  background: rgba(37,99,235,0.08);
  color: #1D4ED8;
}

.rih-dl__page.is-disabled{
  opacity: .45;
  pointer-events: none;
}

.rih-dl__empty,
.rih-dl__loading{
  padding: 12px;
  color: var(--rih-muted);
  font-size: 13px;
  opacity: 1;
}

.rih-dl__note{
  margin: 6px 0 0;
  color: var(--rih-muted);
  font-size: 12px;
  opacity: 1;
}

.rih-dl-selected{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(37,99,235,0.16);
  background: #f5f8ff;
  font-size: 13px;
  font-weight: 700;
  color: var(--rih-text);
}

.rih-dl-selected span{
  font-weight: 800;
  color: #2563EB;
}

.rih-dl-search-wrap{
  position: relative;
  max-width: 340px;
}

#rih-dl-search{
  width: 100%;
  padding-right: 44px;
}

#rih-dl-search::-webkit-search-cancel-button{
  display: block;
  cursor: pointer;
}

.rih-dl-clear{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(37,99,235,0.14);
  background: #ffffff;
  color: #2563EB;
  font-size: 14px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  display: none;
}

.rih-dl-clear:hover{
  background: #f5f8ff;
}

#rih-dl-clear{
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(37,99,235,0.14) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #2563EB !important;
  font-size: 16px !important;
  line-height: 1 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

#rih-dl-clear:hover{
  background: #f5f8ff !important;
}

/* =========================================================
   DESIGN LIBRARY MODAL
   ========================================================= */

html.rih-dl-lock,
.rih-dl-lock{
  overflow: hidden;
}

.rih-dl-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.rih-dl-modal.is-open{
  display: block;
}

.rih-dl-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
}

.rih-dl-modal__panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(920px, calc(100% - 26px));
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(37,99,235,0.16);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(15,23,42,0.12);
}

.rih-dl-modal__x{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(37,99,235,0.16);
  background: #ffffff;
  color: #2563EB;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(15,23,42,0.06);
}

.rih-dl-modal__x:hover{
  background: #f5f8ff;
  border-color: rgba(37,99,235,0.24);
}

.rih-dl-modal__body{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 0;
}

@media (max-width: 820px){
  .rih-dl-modal__body{
    grid-template-columns: 1fr;
  }
}

.rih-dl-modal__imgwrap{
  padding: 14px;
  background: #f5f8ff;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rih-dl-modal__img{
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(37,99,235,0.10);
  background: #ffffff;
}

.rih-dl-modal__info{
  padding: 16px 16px 18px;
  color: var(--rih-text);
}

.rih-dl-modal__title{
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--rih-text);
}

.rih-dl-modal__meta{
  font-size: 13px;
  color: var(--rih-muted);
  opacity: 1;
  margin-bottom: 10px;
}

.rih-dl-modal__desc{
  font-size: 13px;
  color: var(--rih-muted);
  opacity: 1;
  line-height: 1.4;
  min-height: 40px;
}

.rih-dl-modal__actions{
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.rih-dl-modal__use{
  padding: 12px 18px;
  font-size: 14px;
  border-radius: 12px;
  border: 1px solid rgba(37,99,235,0.16);
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(37,99,235,0.20);
}

.rih-dl-modal__use:hover{
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.rih-dl-modal__cancel{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(37,99,235,0.14);
  background: #ffffff;
  color: var(--rih-text);
  cursor: pointer;
}

.rih-dl-modal__cancel:hover{
  background: #f5f8ff;
  border-color: rgba(37,99,235,0.22);
}

.rih-dl-modal__note{
  margin-top: 10px;
  font-size: 12px;
  color: var(--rih-muted);
  opacity: 1;
}

@media (max-width: 640px){
  .rih-dl-modal__x{
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    font-size: 18px;
    border-radius: 10px;
    border: 1px solid rgba(37,99,235,0.16);
  }

  .rih-dl-modal__x:hover{
    background: #f5f8ff;
  }
}