/**
 * retur.css
 * CSS untuk fitur Retur & Refund Cenderaloka
 * Sync ke main.css setelah review
 */

/* =============================================
   STEPPER — cl-stepper
============================================= */
.cl-stepper {
    display: flex;
    position: relative;
}

.cl-step {
    flex: 1 1 0;
    text-align: center;
    position: relative;
    min-width: 0;
}

/* Garis penghubung antar step */
.cl-step::after {
    content: "";
    position: absolute;
    top: 13px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #d4d4d4;
    z-index: 0;
}

.cl-step:last-child::after {
    display: none;
}

.cl-step.is-done::after {
    background: #b92454;
}

/* Dot */
.cl-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #d4d4d4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.cl-step-dot::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d4d4d4;
}

.cl-step-dot i {
    display: none;
    color: #fff;
    font-size: 12px;
}

/* Active state */
.cl-step.is-active .cl-step-dot {
    border-color: #b92454;
}

.cl-step.is-active .cl-step-dot::after {
    background: #b92454;
}

/* Done state */
.cl-step.is-done .cl-step-dot {
    background: #b92454;
    border-color: #b92454;
}

.cl-step.is-done .cl-step-dot::after {
    display: none;
}

.cl-step.is-done .cl-step-dot i {
    display: block;
}

/* Label */
.cl-step-label {
    margin-top: 10px;
    font-size: 0.82rem;
    color: #9ca3af;
    line-height: 1.25;
    max-width: 120px;
    margin-inline: auto;
    font-weight: 600;
}

.cl-step.is-active .cl-step-label,
.cl-step.is-done .cl-step-label {
    color: #b92454;
}

/* Mobile: scroll horizontal */
@media (max-width: 767.98px) {
    .cl-stepper {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.5rem;
        flex-wrap: nowrap;
    }

    .cl-stepper::-webkit-scrollbar {
        display: none;
    }

    .cl-step {
        flex: 0 0 110px;
        width: 110px;
    }
}

/* =============================================
   UPLOAD AREA — form pengajuan
============================================= */
.retur-upload-btn-wrapper {
    width: 80px;
    height: 80px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #b92454;
    font-size: 1.5rem;
    transition: all 0.2s;
}

.retur-upload-btn-wrapper:hover {
    background-color: #fff5f5;
    border-color: #b92454;
}

.retur-file-upload {
    width: 120px;
    height: 120px;
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    font-size: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #fff;
    flex-shrink: 0;
}

.retur-file-upload:hover,
.retur-file-upload.dragover {
    border-color: #b92454;
    background: #fdf2f2;
}

.retur-file-upload.hidden {
    display: none;
}

.retur-upload-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #b92454;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 6px rgba(189, 42, 42, 0.3);
    color: white;
}

.retur-upload-btn:hover {
    transform: scale(1.08);
}

.retur-upload-btn:active {
    transform: scale(0.95);
}

.retur-upload-hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

/* Preview grid */
.retur-file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.retur-preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0;
}

.retur-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.retur-preview-item .remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgb(185 36 84);
    color: #ffffff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.retur-preview-item .complete-label {
    position: absolute;
    top: 6px;
    left: 6px;
    background: white;
    color: #8cc33f;
    font-size: 10px;
    border: 1px solid #8cc33f;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: 0.3px;
    pointer-events: none;
}

/* Wrapper upload + preview sejajar */
.retur-upload-area-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

/* Mobile upload */
@media (max-width: 600px) {
    .retur-upload-area-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

    .retur-upload-area-row::-webkit-scrollbar {
        display: none;
    }

    .retur-file-preview {
        flex-wrap: nowrap;
    }

    .retur-file-upload {
        width: 82px;
        height: 82px;
    }

    .retur-preview-item {
        width: 82px;
        height: 82px;
    }

    .retur-preview-item .complete-label {
        padding: 0;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0;
        border-radius: 50%;
    }

    .retur-preview-item .complete-label::after {
        content: '\2713';
        font-size: 11px;
        color: white;
        font-weight: 700;
    }
}

/* =============================================
   BADGE RETUR STATUS
============================================= */
.badge-retur-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-retur-waiting {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.badge-retur-process {
    background-color: #cfe2ff;
    color: #0a58ca;
    border: 1px solid #0d6efd;
}

.badge-retur-done {
    background-color: #d1e7dd;
    color: #146c43;
    border: 1px solid #198754;
}

.badge-retur-rejected {
    background-color: #fff;
    color: #b92454;
    border: 1px solid #b92454;
}

/* =============================================
   INFO BADGE (i) — biaya layanan tooltip
============================================= */
.cl-info-i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #6c757d;
    color: #fff;
    font-size: 9px;
    font-style: italic;
    font-weight: 700;
    cursor: pointer;
    vertical-align: middle;
}

/* =============================================
   CARD PILIH SOLUSI — seller detail retur
============================================= */
.retur-solusi-card {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.retur-solusi-card:hover {
    border-color: #b92454;
    background: #fdf2f2;
}

.retur-solusi-card.active {
    border-color: #b92454;
    background: #fdf2f2;
}

.retur-solusi-card input[type="radio"] {
    accent-color: #b92454;
}

/* =============================================
   MODAL ALAMAT PENGEMBALIAN — selectable
============================================= */
.retur-address-card {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.retur-address-card:hover {
    border-color: #b92454;
}

.retur-address-card.selected {
    border-color: #b92454;
    background: #fdf2f2;
}

/* =============================================
   TEXT MUTED SMALL
============================================= */
.text-muted-small {
    font-size: 0.8rem;
    color: #6c757d;
}

/* =============================================
   UPLOAD AREA — form pengajuan (tanpa prefix, match form-return.html)
============================================= */
.upload-btn-wrapper {
    width: 80px;
    height: 80px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #b92454;
    font-size: 1.5rem;
    transition: all 0.2s;
}

.file-upload {
    width: 120px;
    height: 120px;
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    font-size: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #fff;
    flex-shrink: 0;
}

.file-upload:hover,
.file-upload.dragover {
    border-color: #b92454;
    background: #fdf2f2;
}

.file-upload.hidden {
    display: none;
}

.upload-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #b92454;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 6px rgba(189, 42, 42, 0.3);
    color: white;
}

.upload-btn:hover { transform: scale(1.08); }
.upload-btn:active { transform: scale(0.95); }

.upload-hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgb(185 36 84);
    color: #ffffff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-item .complete-label {
    position: absolute;
    top: 6px;
    left: 6px;
    background: white;
    color: #8cc33f;
    font-size: 10px;
    border: 1px solid #8cc33f;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: 0.3px;
    pointer-events: none;
}

.upload-area-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

@media (max-width: 600px) {
    .upload-area-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    .upload-area-row::-webkit-scrollbar { display: none; }
    .file-preview { flex-wrap: nowrap; }
    .file-upload { width: 82px; height: 82px; }
    .preview-item { width: 82px; height: 82px; }
    .preview-item .complete-label {
        padding: 0;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0;
        border-radius: 50%;
    }
    .preview-item .complete-label::after {
        content: '\2713';
        font-size: 11px;
        color: white;
        font-weight: 700;
    }
}