/* 8devices RMA – text-only design (no image) */
:root{
  --c-primary:#0b69ff;
  --c-primary-600:#0a5ae0;
  --c-text:#2D3645;
  --c-muted:#484F5A;
  --c-border:#e5e7eb;
  --c-bg:#f9fafb;
  --r:14px;
}

.rma *{box-sizing:border-box}
.rma a{color:var(--c-primary)}
.rma p{margin:0 0 .75rem; font-weight: 430; font-size:var(--r);}
.rma .success-p{margin:0 0 .75rem; font-weight: 400; font-size:18px;}
.rma label{font-weight:600;color:var(--c-text);}
.rma .submit-agree{font-size:var(--r); padding: .75rem 0;}
.is-hidden{display:none!important}


/* Intro spacing under the H1 coming from the theme */

.rma-lead{font-size:20px;line-height:1.5;color:#111827;margin-bottom:10px}
.rma-note{font-size:20px;line-height:1.5;color:#6b7280}
.rma-steps{display:flex;gap:28px;list-style:none;padding:0;margin:16px 0 22px}
.rma-steps li{font-size:28px;font-weight:800;color:#94a3b8}   
.rma-steps li.is-active{color:#0f172a}                         
.rma-section-title{font-size:28px;font-weight:800;color:#0f172a;margin:32px 0px;}
.rma-inputgroup--pill{
  display:flex;align-items:center;gap:10px;background:#fff;
  border:1px solid #e5e7eb;border-radius:9999px;padding:8px 8px 8px 16px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  transition: border-color 0.2s ease;
}
.rma-inputgroup--pill.has-error{
  border-color: #BE2C21;
}
.rma-inputgroup--pill .rma-input {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-radius: 24px !important;
}
.rma-inputgroup--pill .rma-input{
  flex:1;border:none;outline:none;height:46px;font-size:18px;padding:0 10px;
}
.rma-helper{color:#6b7280;text-align:center;margin-top:24px !important}
.initial-rma-form{padding:48px 0px !important}

/* Error message styling */
.rma-error-message{
  font-family: "Matter", sans-serif !important;
  color: #BE2C21;
  font-size: 14px;
  font-weight: 430;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.initial-rma-form .rma-error-message{
  margin-left: 16px;
}
.rma-error-message a{
  color: #BE2C21;
  text-decoration: underline;
}
.rma-error-message a:hover{
  color: #b91c1c;
}

/* Field validation errors */
.rma-field-error{
  color: #BE2C21;
  font-size: 14px;
  font-weight: 430;
  display: block;
}

.rma-field-error.is-hidden{
  display: none;
}

/* Input error styling */
.rma input.error,
.rma select.error,
.rma textarea.error{
  border-color: #BE2C21 !important;
}

/* Character counter styling */
.rma-char-counter{
  font-size: 12px;
  color: #6b7280;
  text-align: right;
  margin-top: 4px;
  font-weight: 400;
}
.rma-char-counter.warning{
  color: #f59e0b;
}
.rma-char-counter.error{
  color: #BE2C21;
}
/* Circular icon button on the right */
.rma-iconbtn{
  display:inline-flex;align-items:center;justify-content:center;
  width:46px;height:46px;border-radius:9999px;border:1px solid #e5e7eb;
  background:#2D3645;color:#fff;cursor:pointer;flex-shrink:0;
  transition:background .15s ease, transform .05s ease;
}
.rma-iconbtn:hover{background:#111827}
.rma-iconbtn:active{transform:scale(.98)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Keep your existing card/input styles … then add small tweaks */
.rma-device-card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:16px;margin:16px 0}

/* Device card – text only (already used in your JS) */
.rma-device__title{color:#2D3645;font-weight:670;margin-bottom:.35rem; font-size: 18px; line-height: 1.4;}
.rma-device__name{margin:0 0 .5rem 0;font-weight:800;color:#111827}
.rma-meta__row{margin:.25rem 0}
.rma-meta__row strong{margin-right:.5rem}

/* Pills for status */
.rma-pill{display:inline-block;padding:.2rem .55rem;border-radius:999px;font-size:16px;font-weight:800}
.rma-pill--ok{color:#047857}
.rma-pill--warn{color:#b45309}
.rma-pill--bad{color:#b91c1c}


/* Main grid (left/right cards) - keep single column */
.rma-grid{ grid-template-columns: 1fr !important; }

/* Step 2 main grid must stack */
#rma-step-details > .rma-grid{ grid-template-columns: 1fr !important; gap: 28px; }

/* Allow two-column layout for order information fields */
.rma-card .rma-grid--2{ 
  display: grid;
  grid-template-columns: 1fr 1fr; 
  gap: 16px; 
}

/* Stack on small screens */
@media (max-width: 900px){
  .rma-card .rma-grid--2{ 
    grid-template-columns: 1fr !important; 
    gap: 16px; 
  }
}

/* inputs */
.rma input[type="text"],
.rma input[type="email"],
.rma input[type="tel"],
.rma input[type="number"],
.rma input[type="date"],
.rma select,
.rma textarea{
  width:100%;
  padding:.7rem .8rem;
  border:1px solid var(--c-border);
  border-radius:10px;
  font-size:14px;
  background:#fff;
  margin: 8px 0 12px 0;
}


.rma #serial-number, .rma-check #acknowledge, .rma-check #form-access-checkbox
{
  margin: 0 !important;
}

.rma textarea{min-height:120px}
.rma input:focus,
.rma select:focus,
.rma textarea:focus{
  outline:none;
  border-color:#cfe0ff;
  box-shadow:0 0 0 3px rgba(11,105,255,.08);
}

/* checkboxes + actions */
.rma-check{display:flex;gap:.6rem;align-items:center;margin:.5rem 0; white-space: nowrap;}
.rma-check input{margin-top:0; order: -1; flex-shrink: 0;}
.rma-check span{flex: 1; white-space: normal;}
.rma-check.has-error span{color: #BE2C21;}

/* Default checkbox styling */
.rma-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.rma-actions{display:flex;flex-direction:column;gap:.6rem}
.rma-actions .rma-btn{align-self:flex-start}

/* success view */
.rma-success{
  text-align:center;
  padding:3rem 2rem;
}

.rma-success__title{
  font-size:24px;
  font-weight:670;
  color:#2D3645;
  margin:1rem 0;
}
.rma-success__id{
  color:#6b7280;
  font-size:16px;
  font-weight:500;
}

/* Loading state for the lookup pill */
.rma-inputgroup--pill {
  position: relative;
}

/* Disabled input look inside the pill */
.rma-inputgroup--pill .rma-input:disabled {
  background: transparent !important;
  color: #9ca3af !important;
  cursor: not-allowed;
}


/* Top confirmation banner */
/* --- Banner Styling --- */
.rma-banner {
  place-content: center;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #2f80ff;
  color: #fff;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 10px;
  margin: 20px 0;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease-out;
}
.rma-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
}
.rma-banner.is-fading {
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.5s ease-in;
}
.rma-banner__icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  filter: brightness(0) invert(1); /* makes the icon white */
}

/* --- Steps with Icons --- */
/* --- Steps with Icons & Number --- */
/* --- Progress (two columns) --- */
.rma-progress{
  display:grid;
  grid-template-columns:1fr 1fr;
  column-gap:48px;
  align-items:start;
padding: 24px 0 42px;
}

/* each step label */
.rma-step{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:600;
  font-size:16px;
  color:#9ca3af;  
}

/* icons/text */
.rma-step-icon{ width:16px; height:16px; filter:brightness(0); }
.rma-step-index{ font-weight:800; color:#9ca3af; }

/* active/done coloring */
.rma-step.is-active span,
.rma-step.is-done span{ color:#2D3645; }
.rma-step.is-done .rma-step-icon{ filter:brightness(0); }

/* rail under each step */
.rma-rail{
  position:absolute;
  left:0; right:0;
  top: calc(100% + 6px);
  height:4px;
  background:#e5e7eb;  
  border-radius:999px;
}
.rma-rail__fill{
  display:block;
  height:100%;
  width:0;
  background:#111827; 
  border-radius:999px;
  transition:width .2s ease;
}

/* step 1 (left) becomes fully filled when done */
#rma-step-left.is-done .rma-rail__fill{ width:100%; }

/* step 2 (right) only fills when the whole process is done */
#rma-step-right.is-done .rma-rail__fill{ width:100%; }

/* hide the old step list if it’s still in the DOM */
.rma-steps{ display:none !important; }


/* Device card: make sure it’s a single border (no picture used) */
#rma-device-card .rma-card{ margin-top:10px; }


/* Loading state on the magnifier button */
/* Spinner inside the button */
.rma-iconbtn.is-loading {
  position: relative;
  pointer-events: none;
}

/* hide the magnifier icon while loading */
.rma-iconbtn.is-loading svg {
  opacity: 0;
}

/* properly centered spinner */
.rma-iconbtn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%); /* this fixes the jump */
  animation: rma-spin 0.8s linear infinite;
}

/* spin animation */
.rma-iconbtn.is-loading::after {
  transform: translate(-50%, -50%);
}
@keyframes rma-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- Step 2 Layout (two-column form refinement) --- */
#rma-step-details .rma-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 24px;
}

/* Card headings */
.rma-card > h3 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 670;
  color: #2D3645;
  margin-bottom: 16px;
}
.rma-card > h2 {
    padding: 12px 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 670;
  color: #484F5A;
}

/* Field labels */
.rma-grid .rma-card label {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 570;
  color: #2D3645;
  margin-bottom: 10px;
  display: block;
}

/* Inputs spacing */
.rma-card input,
.rma-card select,
.rma-card textarea {
  width: 100%;
  margin-bottom: 18px;
}

/* Inside contact info card, nested grid */
.rma-card .rma-grid--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Checkbox and submit area */
.rma-top-boarder {
  border-top: 1px solid #EEEFEF;
}

/* Button style */
.rma-btn--primary {
    text-decoration: none !important;
padding: 14px 24px !important;
background: #1570ef;
border: none;
border-radius: 100px;
color: #fff;
font-size: 18px !important;
    cursor: pointer;
}

.rma-btn--primary:hover {
  background: #2886F5;
}

.rma-btn--primary:disabled {
  background: #EEEFEF !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
}

/* Checkbox text */
.rma-check span {
  font-size: 16px;
  line-height: 1.5;
  color: #2D3645;
  font-weight: 400;
}

/* Small screen (stacked layout) */
@media (max-width: 900px) {
  #rma-step-details .rma-grid {
    grid-template-columns: 1fr;
  }
}
.rma-form .wp-block-columns{ display:block !important; gap:0 !important; }
.rma-form .wp-block-column{ flex:0 0 100% !important; width:100% !important; margin:0 !important; }

/* Two-up rows inside cards */
.rma-card .rma-grid--2{
  display:grid;
  grid-template-columns:minmax(260px,1fr) minmax(260px,1fr);
  gap:20px;              
}

/* Inputs look/height consistent across text/select/date */
.rma-card input,
.rma-card select,
.rma-card textarea{
  width:100%;
  height:44px;             
  padding:.65rem .8rem;
  border:1px solid var(--c-border);
  border-radius:10px;
  font-size:14px;
  background:#fff;
}
.rma-card textarea{ height:auto; min-height:80px; margin: 0 !important;}

/* Let a field span both columns when you want a full-width row */
.rma-span-2{ grid-column:1 / -1; }

/* Stack on small screens */
@media (max-width:900px){
  .rma-card .rma-grid--2{ grid-template-columns:1fr !important; }
  .rma-span-2{ grid-column:auto; }
}
