/* ── Royal Returns — Frontend Styles ──────────────────────────────────────── */

.rc-returns-wrap {
    max-width: 860px;
}

/* ── Section title ─────────────────────────────────────────────────────────── */
.rc-section-title {
    font-size: 1.4em;
    margin: 0 0 20px;
    border-bottom: 2px solid #1a1a2e;
    padding-bottom: 10px;
}

/* ── Empty state ─────────────────────────────────────────────────────────────*/
.rc-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

/* ── My Returns table ────────────────────────────────────────────────────────*/
.rc-returns-table-wrap {
    overflow-x: auto;
}
.rc-returns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}
.rc-returns-table th,
.rc-returns-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
    vertical-align: middle;
}
.rc-returns-table th {
    background: #f5f5f5;
    font-weight: 600;
}
.rc-returns-table tr:last-child td {
    border-bottom: none;
}

/* ── Status badges ────────────────────────────────────────────────────────── */
.rc-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
}
.rc-status-submitted        { background: #e8f4fd; color: #1a5276; }
.rc-status-under_review     { background: #fef9e7; color: #7d6608; }
.rc-status-info_requested   { background: #fdf2f8; color: #76448a; }
.rc-status-approved         { background: #eafaf1; color: #1e8449; }
.rc-status-rejected         { background: #fdedec; color: #922b21; }
.rc-status-awaiting_shipment{ background: #fef5e7; color: #935116; }
.rc-status-product_received { background: #e8f6f3; color: #1a5276; }
.rc-status-refund_processing{ background: #eaf2ff; color: #154360; }
.rc-status-completed        { background: #eafaf1; color: #1e8449; }

/* ── Link button ──────────────────────────────────────────────────────────── */
.rc-link {
    background: none;
    border: none;
    padding: 0;
    color: #0073aa;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}
.rc-link:hover { color: #005177; }

/* ── Back button ──────────────────────────────────────────────────────────── */
.rc-back-btn {
    background: none;
    border: none;
    padding: 0 0 16px;
    color: #0073aa;
    cursor: pointer;
    font-size: 0.9em;
    display: block;
}

/* ── Wizard progress bar ──────────────────────────────────────────────────── */
.rc-wizard-progress {
    display: flex;
    gap: 4px;
    margin-bottom: 32px;
    overflow-x: auto;
}
.rc-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    background: #f5f5f5;
    border-radius: 6px;
    opacity: 0.5;
    transition: all 0.2s;
    min-width: 70px;
}
.rc-step.rc-step-active {
    background: #1a1a2e;
    color: #fff;
    opacity: 1;
}
.rc-step.rc-step-done {
    background: #eafaf1;
    color: #1e8449;
    opacity: 1;
}
.rc-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
    background: rgba(255,255,255,0.2);
}
.rc-step-active .rc-step-num { background: rgba(255,255,255,0.25); }
.rc-step-done .rc-step-num   { background: #1e8449; color: #fff; }
.rc-step-label {
    font-size: 0.7em;
    text-align: center;
    line-height: 1.2;
}

/* ── Wizard step ──────────────────────────────────────────────────────────── */
.rc-wizard-step h2 {
    font-size: 1.2em;
    margin: 0 0 6px;
}
.rc-wizard-instruction {
    color: #555;
    margin-bottom: 20px;
}

/* ── Step 1: item selection ──────────────────────────────────────────────── */
.rc-item-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.rc-item-row.rc-item-ineligible {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}
.rc-item-row.rc-item-selected {
    border-color: #1a1a2e;
    background: #f4f4f9;
}
.rc-item-checkbox {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
}
.rc-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #eee;
}
.rc-item-meta {
    flex: 1;
}
.rc-item-name {
    font-weight: 600;
    margin-bottom: 3px;
}
.rc-item-sku {
    color: #888;
    font-size: 0.85em;
}
.rc-item-qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rc-qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px;
}
.rc-ineligible-msg {
    font-size: 0.82em;
    color: #922b21;
    margin-top: 4px;
}

/* ── Step 2: reasons ──────────────────────────────────────────────────────── */
.rc-reason-block {
    margin-bottom: 20px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
}
.rc-reason-block h4 {
    margin: 0 0 10px;
    font-size: 0.95em;
}
.rc-reason-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rc-reason-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95em;
}
.rc-other-text {
    margin-top: 8px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    font-size: 0.9em;
    resize: vertical;
}
.rc-other-text-wrap { display: none; }

/* ── Step 3: photos ───────────────────────────────────────────────────────── */
.rc-photo-block {
    margin-bottom: 20px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
}
.rc-photo-block h4 {
    margin: 0 0 10px;
    font-size: 0.95em;
}
.rc-photo-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s;
}
.rc-photo-upload-area:hover { border-color: #1a1a2e; }
.rc-photo-upload-area input[type="file"] { display: none; }
.rc-photo-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.rc-photo-thumb-wrap {
    position: relative;
    width: 80px;
    height: 80px;
}
.rc-photo-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}
.rc-photo-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.rc-photo-uploading {
    font-size: 0.85em;
    color: #555;
    margin-top: 8px;
}
.rc-photo-required-note {
    font-size: 0.82em;
    color: #c0392b;
    margin-top: 6px;
}
.rc-photo-optional-note {
    font-size: 0.82em;
    color: #888;
    margin-top: 6px;
}

/* ── Step 4: policy ───────────────────────────────────────────────────────── */
.rc-policy-box {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.rc-checkbox-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 0.95em;
    cursor: pointer;
    line-height: 1.5;
}
.rc-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Step 5: refund method ────────────────────────────────────────────────── */
.rc-refund-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.rc-refund-option {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.rc-refund-option:has(input:checked) {
    border-color: #1a1a2e;
    background: #f4f4f9;
}
.rc-refund-option input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.rc-refund-option-body strong {
    display: block;
    margin-bottom: 4px;
}
.rc-refund-option-body p {
    margin: 0;
    font-size: 0.9em;
    color: #555;
}
.rc-info-box {
    background: #e8f4fd;
    border-left: 4px solid #3498db;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 0.9em;
    margin: 0;
}

/* ── Step 6: review summary ───────────────────────────────────────────────── */
.rc-review-section {
    margin-bottom: 16px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
}
.rc-review-section h4 {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin: 0 0 8px;
}
.rc-review-item {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.95em;
}
.rc-review-item-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
    flex-shrink: 0;
}

/* ── Wizard nav ───────────────────────────────────────────────────────────── */
.rc-wizard-nav {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}

/* ── Success screen ───────────────────────────────────────────────────────── */
.rc-success-box {
    text-align: center;
    padding: 40px 30px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
}
.rc-success-icon {
    width: 60px;
    height: 60px;
    background: #16a34a;
    color: #fff;
    border-radius: 50%;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.rc-ref-number {
    font-size: 1.1em;
    margin-bottom: 12px;
}

/* ── Notice ───────────────────────────────────────────────────────────────── */
.rc-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
}
.rc-notice-error {
    background: #fdedec;
    border-left: 4px solid #e74c3c;
    color: #922b21;
}

/* ── Request detail view ──────────────────────────────────────────────────── */
.rc-detail-summary {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.rc-detail-row {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.95em;
}
.rc-detail-label {
    font-weight: 600;
    min-width: 130px;
    flex-shrink: 0;
}
.rc-detail-items { margin-bottom: 20px; }
.rc-detail-item {
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.9em;
}
.rc-detail-notes { margin-top: 20px; }
.rc-note-item {
    padding: 12px;
    border-left: 3px solid #e5e5e5;
    margin-bottom: 10px;
    font-size: 0.9em;
}
.rc-note-date { color: #888; font-size: 0.85em; margin-top: 4px; }

/* ── Loading state ────────────────────────────────────────────────────────── */
.rc-loading {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.9em;
}

/* ── My Orders action buttons ─────────────────────────────────────────────── */
.rc-action-return { background: #1a1a2e !important; color: #fff !important; border-color: #1a1a2e !important; }
.rc-action-return:hover { background: #2d2d4e !important; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .rc-wizard-progress { gap: 2px; }
    .rc-step { min-width: 50px; }
    .rc-step-label { display: none; }
    .rc-item-row { flex-wrap: wrap; }
    .rc-wizard-nav { flex-direction: column-reverse; }
    .rc-wizard-nav .button { width: 100%; text-align: center; }
}
