/* Warranty Registration Form v2.0 — frontend styles */

.wrf-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: #1a1a1a;
}

/* Header */
.wrf-header { display:flex; align-items:center; gap:14px; margin-bottom:2rem; padding-bottom:1.25rem; border-bottom:1px solid #e5e5e5; }
.wrf-logo { width:44px; height:44px; background:#0f6e56; border-radius:10px; display:flex; align-items:center; justify-content:center; color:#fff; flex-shrink:0; }
.wrf-header-text h2 { font-size:17px; font-weight:600; margin:0 0 3px; color:#1a1a1a; }
.wrf-header-text p  { font-size:13px; color:#666; margin:0; }

/* Steps */
.wrf-steps { display:flex; border:1px solid #e5e5e5; border-radius:8px; overflow:hidden; margin-bottom:1rem; }
.wrf-step { flex:1; padding:10px 12px; font-size:12px; font-weight:500; text-align:center; color:#999; background:#f9f9f9; border-right:1px solid #e5e5e5; display:flex; align-items:center; justify-content:center; gap:6px; transition:all 0.2s; }
.wrf-step:last-child { border-right:none; }
.wrf-step.active { background:#fff; color:#1a1a1a; }
.wrf-step.done   { color:#0f6e56; }

/* Progress */
.wrf-progress { height:3px; background:#e5e5e5; border-radius:2px; margin-bottom:2rem; overflow:hidden; }
.wrf-progress-bar { height:100%; background:#1d9e75; border-radius:2px; transition:width 0.35s ease; }

/* Sections */
.wrf-section { display:none; }
.wrf-section.visible { display:block; }
.wrf-section-title { font-size:11px; font-weight:600; letter-spacing:0.07em; text-transform:uppercase; color:#888; margin-bottom:1rem; }

/* Grid */
.wrf-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.wrf-grid.wrf-full { grid-template-columns:1fr; }

/* Fields */
.wrf-field { display:flex; flex-direction:column; gap:5px; }
.wrf-field label { font-size:13px; font-weight:500; color:#555; }
.wrf-field label span { color:#c0392b; margin-left:2px; }
.wrf-field input, .wrf-field select, .wrf-field textarea {
  font-family:inherit; font-size:14px; padding:9px 12px; border:1px solid #d5d5d5; border-radius:7px;
  background:#fff; color:#1a1a1a; outline:none; transition:border-color 0.15s, box-shadow 0.15s;
  width:100%; box-sizing:border-box; -webkit-appearance:none; appearance:none;
}
.wrf-field select { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; padding-right:32px; }
.wrf-field textarea { resize:vertical; min-height:80px; line-height:1.5; }
.wrf-field input:focus, .wrf-field select:focus, .wrf-field textarea:focus { border-color:#1d9e75; box-shadow:0 0 0 3px rgba(29,158,117,0.12); }
.wrf-field.wrf-error input, .wrf-field.wrf-error select { border-color:#e24b4a; box-shadow:0 0 0 3px rgba(226,75,74,0.1); }
.wrf-err-msg { font-size:12px; color:#a32d2d; display:none; }
.wrf-field.wrf-error .wrf-err-msg { display:block; }

/* Warranty preview banner (step 1) */
.wrf-warranty-preview {
  display:flex; align-items:center; gap:8px; padding:10px 14px; margin-top:8px;
  background:#e8f5f0; border:1px solid #b2dece; border-radius:8px;
  font-size:13px; color:#0a5540; font-weight:500;
}
.wrf-warranty-preview svg { flex-shrink:0; color:#0f6e56; }

/* Coverage box (step 3) */
.wrf-coverage-box {
  display:flex; align-items:flex-start; gap:12px; padding:14px 16px; margin-bottom:14px;
  background:#e8f5f0; border:1px solid #b2dece; border-radius:10px;
}
.wrf-coverage-icon { width:36px; height:36px; background:#0f6e56; border-radius:8px; display:flex; align-items:center; justify-content:center; color:#fff; flex-shrink:0; }
.wrf-coverage-box strong { font-size:13px; color:#0a5540; display:block; margin-bottom:4px; }
.wrf-coverage-detail { font-size:13px; color:#1a5540; }
.wrf-coverage-pill { display:inline-block; background:#0f6e56; color:#fff; font-size:11px; font-weight:600; padding:2px 8px; border-radius:10px; margin-right:4px; }

/* Summary */
.wrf-summary { background:#f9f9f9; border:1px solid #e5e5e5; border-radius:10px; padding:1rem 1.25rem; margin-bottom:14px; font-size:14px; }
.wrf-summary-row { display:flex; justify-content:space-between; padding:7px 0; border-bottom:1px solid #eee; gap:1rem; }
.wrf-summary-row:last-child { border-bottom:none; }
.wrf-summary-label { color:#888; font-size:13px; white-space:nowrap; }
.wrf-summary-value { font-size:13px; font-weight:500; text-align:right; word-break:break-word; max-width:65%; }

/* Checkboxes */
.wrf-checkbox-row { display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border-radius:7px; border:1px solid #e5e5e5; margin-bottom:10px; background:#fafafa; transition:border-color 0.2s, background 0.2s; }
.wrf-checkbox-row input[type="checkbox"] { width:16px; height:16px; margin-top:2px; accent-color:#1d9e75; cursor:pointer; flex-shrink:0; }
.wrf-checkbox-row label { font-size:13px; color:#444; cursor:pointer; line-height:1.5; }
.wrf-error-row { border-color:#e24b4a !important; background:#fff5f5 !important; }
.wrf-accepted-flash { background:#e8f5f0 !important; border-color:#1d9e75 !important; }
@keyframes wrf-flash { 0%,100%{background:#e8f5f0} 50%{background:#c8edd8} }
.wrf-accepted-flash { animation: wrf-flash 0.6s ease; }

/* Policy link button */
.wrf-policy-link {
  background:none; border:none; padding:0; margin:0; cursor:pointer;
  color:#0f6e56; font-size:13px; font-weight:600; text-decoration:underline; text-underline-offset:2px;
  font-family:inherit; display:inline;
}
.wrf-policy-link:hover { color:#085041; }

.wrf-terms-error { font-size:12px; color:#a32d2d; margin:-4px 0 8px 0; }

/* Buttons */
.wrf-btns { display:flex; justify-content:space-between; align-items:center; margin-top:1.5rem; padding-top:1.25rem; border-top:1px solid #e5e5e5; }
.wrf-btn-secondary { background:transparent; border:1px solid #d5d5d5; color:#555; font-family:inherit; font-size:14px; padding:9px 20px; border-radius:7px; cursor:pointer; transition:all 0.15s; }
.wrf-btn-secondary:hover { background:#f5f5f5; }
.wrf-btn-primary { background:#0f6e56; border:none; color:#fff; font-family:inherit; font-size:14px; font-weight:500; padding:9px 24px; border-radius:7px; cursor:pointer; transition:all 0.15s; display:inline-flex; align-items:center; gap:6px; }
.wrf-btn-primary:hover { background:#085041; }
.wrf-btn-primary:active { transform:scale(0.98); }
.wrf-btn-primary:disabled { opacity:0.65; cursor:not-allowed; }

/* Success */
.wrf-success { text-align:center; padding:3rem 1rem; }
.wrf-success-icon { width:60px; height:60px; background:#e1f5ee; border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 1rem; color:#0f6e56; }
.wrf-success h3 { font-size:20px; font-weight:600; color:#1a1a1a; margin:0 0 8px; }
.wrf-success p  { font-size:14px; color:#666; line-height:1.6; margin:0; }

/* ====================================================
   WARRANTY POLICY MODAL
   ==================================================== */
.wrf-policy-modal {
  position:fixed; inset:0; z-index:99999;
  display:none; align-items:center; justify-content:center;
  padding:16px;
}
.wrf-policy-overlay {
  position:absolute; inset:0; background:rgba(0,0,0,0.55); backdrop-filter:blur(3px);
}
.wrf-policy-box {
  position:relative; z-index:1; background:#fff; border-radius:14px;
  width:100%; max-width:620px; max-height:90vh;
  display:flex; flex-direction:column;
  box-shadow:0 24px 60px rgba(0,0,0,0.25);
  overflow:hidden;
}

/* Modal Header */
.wrf-policy-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px; border-bottom:1px solid #e5e5e5;
  background:#f8fdfb; flex-shrink:0;
}
.wrf-policy-header-left { display:flex; align-items:center; gap:12px; }
.wrf-policy-logo { width:38px; height:38px; background:#0f6e56; border-radius:9px; display:flex; align-items:center; justify-content:center; color:#fff; flex-shrink:0; }
.wrf-policy-header h3 { font-size:15px; font-weight:600; color:#1a1a1a; margin:0 0 2px; }
.wrf-policy-header p  { font-size:12px; color:#888; margin:0; }
.wrf-policy-close {
  background:none; border:1px solid #e5e5e5; width:32px; height:32px; border-radius:6px;
  cursor:pointer; font-size:14px; color:#888; display:flex; align-items:center; justify-content:center; flex-shrink:0;
  transition:all 0.15s;
}
.wrf-policy-close:hover { background:#fee; border-color:#f88; color:#c00; }

/* Modal Body (scrollable) */
.wrf-policy-body {
  flex:1; overflow-y:auto; padding:22px 24px;
  font-size:14px; line-height:1.7; color:#333;
  scroll-behavior:smooth;
}
.wrf-policy-section { margin-bottom:22px; }
.wrf-policy-section:last-child { margin-bottom:0; }
.wrf-policy-section h4 { font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:#0a5540; margin:0 0 8px; padding-bottom:6px; border-bottom:1px solid #e8f5f0; }
.wrf-policy-section p  { margin:0 0 8px; }
.wrf-policy-section ul { margin:6px 0; padding-left:20px; }
.wrf-policy-section li { margin-bottom:5px; }
.wrf-policy-note { background:#fff8e1; border:1px solid #ffe082; border-radius:6px; padding:8px 12px; font-size:13px; color:#7a5c00; margin-top:8px !important; }

/* Modal Footer */
.wrf-policy-footer {
  padding:14px 22px; border-top:1px solid #e5e5e5;
  background:#fafafa; flex-shrink:0;
}
.wrf-policy-scroll-hint {
  display:flex; align-items:center; gap:5px; font-size:12px; color:#888;
  margin-bottom:12px; animation:wrf-bounce 1.5s ease-in-out infinite;
}
@keyframes wrf-bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(3px)} }
.wrf-policy-footer-btns { display:flex; justify-content:flex-end; gap:10px; }
.wrf-policy-footer-btns .wrf-btn-primary { padding:10px 22px; font-size:14px; }
.wrf-policy-footer-btns .wrf-btn-secondary { padding:9px 18px; font-size:14px; }

/* Responsive */
@media (max-width:600px) {
  .wrf-grid { grid-template-columns:1fr; }
  .wrf-step { font-size:11px; padding:8px 6px; gap:4px; }
  .wrf-policy-box { max-height:95vh; border-radius:12px; }
  .wrf-policy-body { padding:16px; }
  .wrf-policy-footer-btns .wrf-btn-primary { font-size:13px; padding:9px 16px; }
}
