/* =====================================================================
   THOR Forms V1.3: standalone and iframe visual layer
   Original return_form.css and warranty_form.css remain untouched.
   Active on all dedicated THOR return and warranty form pages.
   ===================================================================== */
html.thor-forms-embedded {
    --thor-yellow: #fcdc2f;
    --thor-yellow-hover: #efcd1d;
    --thor-ink: #151515;
    --thor-muted: #626971;
    --thor-line: #e3e5e8;
    --thor-surface: #ffffff;
    --thor-soft: #f8f9fa;
    --thor-radius: 10px;
    color-scheme: light;
    background: #fff !important;
}
html.thor-forms-embedded body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    min-height: 0 !important;
    background: #fff !important;
    color: var(--thor-ink) !important;
    font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}
html.thor-forms-embedded .rf-page,
html.thor-forms-embedded .wf-page {
    background: #fff !important;
    font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif !important;
    color: var(--thor-ink) !important;
    width: 100%;
    max-width: 1160px;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 6px 12px 18px !important;
}
html.thor-forms-embedded .rf-header,
html.thor-forms-embedded .wf-page > h1.wf-section-header {
    display: none !important;
}

/* Return cards and layout */
html.thor-forms-embedded .rf-container {
    max-width: none;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    flex: initial;
}
html.thor-forms-embedded .rf-section,
html.thor-forms-embedded .wf-card {
    background: var(--thor-surface) !important;
    border: 1px solid var(--thor-line) !important;
    box-shadow: 0 4px 15px rgba(20,24,30,.045) !important;
    border-radius: var(--thor-radius) !important;
    padding: 27px 30px !important;
    margin: 0 0 18px !important;
}
html.thor-forms-embedded .rf-section__header {
    margin: 0 0 23px;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 16px;
}
html.thor-forms-embedded .rf-section__title,
html.thor-forms-embedded .wf-section-header {
    color: var(--thor-ink) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.4;
    letter-spacing: -.15px;
}
html.thor-forms-embedded .rf-step {
    width: 34px;
    height: 34px;
    background: var(--thor-yellow);
    color: #111;
    font-size: 14px;
}
html.thor-forms-embedded .rf-row { gap: 16px; align-items: flex-start; }
html.thor-forms-embedded .rf-field { min-width: 0; }
html.thor-forms-embedded .rf-row > .rf-field:nth-child(2) { flex: 0 1 29%; }
html.thor-forms-embedded .rf-field--bottom { align-self: stretch; }
html.thor-forms-embedded .rf-grid { gap: 20px; }
html.thor-forms-embedded .rf-label,
html.thor-forms-embedded .wf-page label {
    color: #25282c;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0;
    text-transform: none !important;
    line-height: 1.45;
    margin-bottom: 7px;
}
html.thor-forms-embedded .rf-input,
html.thor-forms-embedded .rf-select,
html.thor-forms-embedded .rf-textarea,
html.thor-forms-embedded .wf-page input:not([type='radio']):not([type='checkbox']):not([type='file']),
html.thor-forms-embedded .wf-page select,
html.thor-forms-embedded .wf-page textarea {
    border: 1px solid #d5d9de !important;
    background: #fff !important;
    color: var(--thor-ink) !important;
    border-radius: 7px !important;
    padding: 11px 13px !important;
    min-height: 46px;
    height: auto;
    font-family: inherit;
    font-size: 14px !important;
    line-height: 1.4;
    box-shadow: none !important;
    transition: border-color .17s ease, box-shadow .17s ease;
}
html.thor-forms-embedded .rf-textarea,
html.thor-forms-embedded .wf-page textarea {
    min-height: 120px;
    resize: vertical;
}
html.thor-forms-embedded .rf-input[readonly],
html.thor-forms-embedded .wf-page input[readonly] {
    background: #f4f5f7 !important;
    color: #616973 !important;
}
html.thor-forms-embedded .rf-input:focus,
html.thor-forms-embedded .rf-select:focus,
html.thor-forms-embedded .rf-textarea:focus,
html.thor-forms-embedded .wf-page input:focus,
html.thor-forms-embedded .wf-page select:focus,
html.thor-forms-embedded .wf-page textarea:focus {
    outline: none !important;
    border-color: #a98700 !important;
    box-shadow: 0 0 0 3px rgba(252,220,47,.25) !important;
}
html.thor-forms-embedded .rf-required,
html.thor-forms-embedded .wf-required { color: #bf2630 !important; }
html.thor-forms-embedded .rf-btn,
html.thor-forms-embedded .wf-btn {
    font: 700 14px/1.2 Arial, 'Helvetica Neue', Helvetica, sans-serif !important;
    color: #111 !important;
    background: var(--thor-yellow) !important;
    border: 1px solid transparent !important;
    border-radius: 7px !important;
    min-height: 46px;
    padding: 12px 22px !important;
    white-space: normal;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
html.thor-forms-embedded .rf-btn:hover:not(:disabled),
html.thor-forms-embedded .wf-btn:hover:not(:disabled) { background: var(--thor-yellow-hover) !important; }
html.thor-forms-embedded .rf-btn:focus-visible,
html.thor-forms-embedded .wf-btn:focus-visible { outline: 3px solid #222 !important; outline-offset: 2px; }
html.thor-forms-embedded .rf-btn:disabled,
html.thor-forms-embedded .wf-btn:disabled { opacity: .5; cursor: not-allowed; }
html.thor-forms-embedded .rf-btn--submit { max-width: 100%; }
html.thor-forms-embedded .rf-submit-row { margin: 6px 0 20px; }
html.thor-forms-embedded .rf-footer {
    padding: 8px 10px 10px;
    color: var(--thor-muted);
    font-size: 13px;
}
html.thor-forms-embedded .rf-footer a { color: #222; text-underline-offset: 3px; }
html.thor-forms-embedded .rf-hint,
html.thor-forms-embedded .rf-upload-hint,
html.thor-forms-embedded .rf-upload-names { color: var(--thor-muted); }
html.thor-forms-embedded .rf-upload-section {
    background: #fafafa;
    border-color: #d7dadd;
    border-radius: var(--thor-radius);
}
html.thor-forms-embedded .rf-upload-btn { background: var(--thor-yellow); border-radius: 6px; }
html.thor-forms-embedded .rf-upload-label:hover .rf-upload-btn { background: var(--thor-yellow-hover); }
html.thor-forms-embedded .rf-order-status--success,
html.thor-forms-embedded .wf-msg--ok { background: #eaf5ee; border-color: #b9deca; color: #1f6b46; }
html.thor-forms-embedded .rf-product-card:has(input:checked) { background: #fffbea; border-color: #d5b514; }
html.thor-forms-embedded .rf-success-card {
    box-shadow: none;
    border-color: var(--thor-line);
    border-radius: var(--thor-radius);
    margin: 10px auto 15px;
}

/* Warranty layout and controls */
html.thor-forms-embedded .wf-page { padding-top: 4px !important; }
html.thor-forms-embedded .wf-card > .wf-section-header {
    margin: 0 0 22px;
    border-bottom: 1px solid #efefef;
    padding-bottom: 15px;
}
html.thor-forms-embedded .wf-row { margin-bottom: 21px; }
html.thor-forms-embedded .wf-card > .wf-row:last-child { margin-bottom: 0; }
html.thor-forms-embedded .wf-grid-2,
html.thor-forms-embedded .wf-grid-3,
html.thor-forms-embedded .wf-grid-4 { gap: 17px 20px; }
html.thor-forms-embedded .wf-page input[type='radio'],
html.thor-forms-embedded .wf-page input[type='checkbox'] {
    width: 17px !important;
    min-width: 17px;
    height: 17px !important;
    padding: 0 !important;
    accent-color: #d2b51f;
}
html.thor-forms-embedded .wf-radio-line { gap: 18px; flex-wrap: wrap; }
html.thor-forms-embedded .wf-radio-line label { display: inline-flex; margin: 0; align-items: center; font-size: 14px !important; }
html.thor-forms-embedded .wf-page input[type='file'] {
    display: block;
    width: 100%;
    height: auto;
    padding: 11px;
    border: 1px dashed #c4c8ce;
    background: #fafafa;
    border-radius: 7px;
    font-size: 13px;
}
html.thor-forms-embedded .wf-note-box {
    background: #fffbed;
    border: 1px solid #f5e2a1;
    border-left: 4px solid var(--thor-yellow);
    border-radius: 8px;
    padding: 17px 19px;
}
html.thor-forms-embedded .wf-note-title { font-size: 14px; color: #353128; }
html.thor-forms-embedded .wf-note-text { font-size: 13px; line-height: 1.6; color: #595651; }
html.thor-forms-embedded .wf-badge {
    color: #595f68;
    background: #f1f3f5;
    border: 1px solid #e0e3e6;
    border-radius: 5px;
    font-weight: 600;
    vertical-align: middle;
}
html.thor-forms-embedded .wf-lookup-card {
    background: #fafbfc;
    border: 1px solid var(--thor-line);
    border-radius: 9px;
    padding: 18px;
}
html.thor-forms-embedded .wf-lookup-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 14px; }
html.thor-forms-embedded .wf-partner-result,
html.thor-forms-embedded .wf-order-result { border: 1px solid var(--thor-line); border-radius: 9px; }
html.thor-forms-embedded .wf-order-result { overflow-x: auto; }
html.thor-forms-embedded .wf-order-lines { min-width: 580px; }
html.thor-forms-embedded .wf-order-result-header { background: #fbfaf5; }
html.thor-forms-embedded .wf-order-lines tr.wf-line-selected { background: #fffbee; }
html.thor-forms-embedded .wf-serial-help { gap: 22px; }
html.thor-forms-embedded .wf-example-photo {
    background: #fafafa;
    border: 1px dashed #d5d8dc;
    padding: 17px;
}
html.thor-forms-embedded .wf-removed-box {
    background: #f7f8f9;
    color: #636971;
    border: 1px solid #e5e7eb;
    font-size: 12px;
}
html.thor-forms-embedded .wf-footer-actions { justify-content: flex-end; }
html.thor-forms-embedded .wf-success-card,
html.thor-forms-embedded .wf-page > .wf-card { max-width: 100%; }
html.thor-forms-embedded .wf-page > .wf-card[style] { max-width: 620px !important; margin: 15px auto !important; }

@media (max-width: 900px) {
    html.thor-forms-embedded .rf-page,
    html.thor-forms-embedded .wf-page { padding: 4px 10px 15px !important; }
    html.thor-forms-embedded .rf-section,
    html.thor-forms-embedded .wf-card { padding: 22px 19px !important; }
    html.thor-forms-embedded .wf-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    html.thor-forms-embedded .wf-lookup-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
    html.thor-forms-embedded .wf-lookup-row > .wf-btn { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    html.thor-forms-embedded .rf-section,
    html.thor-forms-embedded .wf-card { padding: 20px 16px !important; }
    html.thor-forms-embedded .rf-row { flex-direction: column; }
    html.thor-forms-embedded .rf-row > .rf-field,
    html.thor-forms-embedded .rf-row > .rf-field:nth-child(2) { flex: initial; width: 100%; }
    html.thor-forms-embedded .rf-btn--search,
    html.thor-forms-embedded .rf-field--bottom { width: 100%; }
    html.thor-forms-embedded .rf-grid--2,
    html.thor-forms-embedded .wf-grid-2,
    html.thor-forms-embedded .wf-grid-3,
    html.thor-forms-embedded .wf-grid-4,
    html.thor-forms-embedded .wf-lookup-row,
    html.thor-forms-embedded .wf-serial-help { grid-template-columns: 1fr; }
    html.thor-forms-embedded .wf-lookup-row > .wf-btn { grid-column: auto; }
    html.thor-forms-embedded .rf-upload-label { flex-wrap: wrap; }
    html.thor-forms-embedded .rf-section__title,
    html.thor-forms-embedded .wf-section-header { font-size: 16px !important; }
    html.thor-forms-embedded .wf-radio-line { gap: 11px; }
}
