/**
 * RajaSkin Order History Styling
 * Desktop & Mobile Responsive
 */

.rs-order-history-wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 2.25rem 24px 6rem;
    width: 100%;
    box-sizing: border-box;
}

/* Breadcrumb */
.rs-oh-breadcrumb {
    font-size: 0.825rem;
    color: #888888;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rs-oh-breadcrumb a {
    color: #666666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rs-oh-breadcrumb a:hover {
    color: #111111;
}

.rs-oh-breadcrumb .sep {
    color: #bbbbbb;
}

.rs-oh-breadcrumb .current {
    color: #111111;
    font-weight: 500;
}

/* Title & Subtitle */
.rs-oh-title {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 2.4rem;
    font-weight: 700;
    color: #111111;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.rs-oh-subtitle {
    font-size: 0.95rem;
    color: #666666;
    margin: 0 0 2.5rem 0;
    line-height: 1.5;
}

/* ==========================================================================
   Active / In-Transit Order Card
   ========================================================================== */
.rs-active-order-card {
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 18px;
    padding: 26px 30px;
    margin-bottom: 3rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.active-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.75rem;
}

.active-order-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111111;
    margin: 0 0 4px 0;
}

.active-order-meta {
    font-size: 0.825rem;
    color: #888888;
    margin: 0;
}

/* Status Badge Pill */
.rs-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.2px;
}

.rs-status-pill.in-transit,
.rs-status-pill.status-processing,
.rs-status-pill.status-shipped {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.rs-status-pill.status-completed,
.rs-status-pill.status-delivered {
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    color: #18181b;
}

.rs-status-pill.status-on-hold,
.rs-status-pill.status-pending {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #d97706;
}

.rs-status-pill.status-cancelled,
.rs-status-pill.status-failed {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

/* Tracking Stepper */
.rs-tracking-stepper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 1.75rem 0 2rem 0;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
}

.stepper-step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.step-icon-wrap {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Completed Step */
.stepper-step.completed .step-icon-wrap {
    background: #111111;
    color: #ffffff;
}

.stepper-step.completed .step-label-text {
    color: #111111;
    font-weight: 600;
    font-size: 0.825rem;
}

/* Active Step (Out for Delivery) */
.stepper-step.active .step-icon-wrap {
    background: #22c55e;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.stepper-step.active .step-label-text {
    color: #16a34a;
    font-weight: 600;
    font-size: 0.825rem;
}

/* Pending Step */
.stepper-step.pending .step-icon-wrap {
    background: transparent;
    border: 1.5px solid #d1d5db;
    color: #9ca3af;
}

.stepper-step.pending .step-label-text {
    color: #9ca3af;
    font-weight: 500;
    font-size: 0.825rem;
}

/* Stepper Connecting Lines */
.stepper-line {
    flex: 1;
    height: 1.5px;
    background: #e5e7eb;
    margin: 0 16px;
    min-width: 28px;
}

.stepper-line.completed {
    background: #111111;
}

/* Order Item Row inside Active Card */
.rs-order-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid #f2f2f2;
}

.order-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.order-item-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #fbf9f6;
    border: 1px solid #f0eee8;
    flex-shrink: 0;
}

.order-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111111;
    margin: 0 0 3px 0;
}

.order-item-qty {
    font-size: 0.8rem;
    color: #888888;
    margin: 0;
}

.order-item-right {
    text-align: right;
}

.order-item-price {
    font-weight: 700;
    font-size: 1.05rem;
    color: #111111;
    margin: 0 0 3px 0;
}

.order-item-shipping {
    font-size: 0.75rem;
    color: #888888;
    margin: 0;
}

/* ==========================================================================
   Previous Orders Section
   ========================================================================== */
.rs-previous-orders-section {
    margin-top: 2rem;
}

.rs-prev-orders-title {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 1.45rem;
    font-weight: 700;
    color: #111111;
    margin: 0 0 1.25rem 0;
    letter-spacing: -0.3px;
}

.rs-prev-orders-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rs-prev-order-card {
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.rs-prev-order-card:hover {
    border-color: #111111;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    background: #fafaf8;
}

.rs-prev-order-card:active {
    transform: translateY(0);
}

.rs-prev-order-card:hover .prev-order-title {
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@keyframes cardFlash {
    0% { background-color: #fff8eb; border-color: #f59e0b; transform: scale(0.99); }
    50% { background-color: #fffdfa; border-color: #fcd34d; transform: scale(1.005); }
    100% { background-color: #ffffff; border-color: #ebebeb; transform: scale(1); }
}

.card-highlight-flash {
    animation: cardFlash 1.2s ease-out;
}

.prev-order-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.prev-order-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: #fbf9f6;
    border: 1px solid #f0eee8;
    flex-shrink: 0;
}

.prev-order-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #111111;
    margin: 0 0 3px 0;
}

.prev-order-meta {
    font-size: 0.8rem;
    color: #888888;
    margin: 0;
}

.prev-order-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.prev-order-price {
    font-weight: 700;
    font-size: 1.05rem;
    color: #111111;
    margin: 0;
    white-space: nowrap;
}

.btn-reorder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #111111;
    color: #ffffff !important;
    border-radius: 999px;
    padding: 8px 22px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.btn-reorder:hover {
    background: #2b2b2b;
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-reorder.loading {
    opacity: 0.7;
    cursor: wait;
}

/* ==========================================================================
   Empty Order History State & Alert Banner
   ========================================================================== */
.rs-order-not-found-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 2rem;
    color: #991b1b;
}

.rs-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    flex-shrink: 0;
}

.rs-alert-content {
    flex: 1;
    min-width: 0;
}

.rs-alert-content strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #7f1d1d;
    margin-bottom: 2px;
}

.rs-alert-content p {
    font-size: 0.85rem;
    color: #991b1b;
    margin: 0;
    line-height: 1.4;
}

.rs-alert-close {
    color: #991b1b;
    font-size: 1.25rem;
    text-decoration: none;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.rs-alert-close:hover {
    background: #fee2e2;
    color: #7f1d1d;
}

/* Empty Card */
.rs-empty-oh-card {
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 20px;
    padding: 3.75rem 2rem 4rem;
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
}

.rs-empty-oh-icon-wrap {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, #faf7f2 0%, #f4ede3 100%);
    border: 1px solid #ebe2d5;
    color: #8c7355;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem;
    box-shadow: 0 8px 20px rgba(140, 115, 85, 0.08);
    transition: transform 0.3s ease;
}

.rs-empty-oh-card:hover .rs-empty-oh-icon-wrap {
    transform: scale(1.05);
}

.rs-empty-oh-title {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 2.15rem;
    font-weight: 700;
    color: #111111;
    margin: 0 0 0.65rem 0;
    letter-spacing: -0.4px;
    line-height: 1.25;
}

.rs-empty-oh-desc {
    font-size: 0.98rem;
    color: #666666;
    margin: 0 auto 2.25rem;
    max-width: 540px;
    line-height: 1.6;
}

.rs-empty-oh-actions {
    margin-bottom: 2.5rem;
}

.rs-btn-explore-catalogue {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #111111;
    color: #ffffff !important;
    padding: 14px 34px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.rs-btn-explore-catalogue:hover {
    background: #2b2b2b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #ffffff !important;
}

.rs-btn-explore-catalogue svg {
    transition: transform 0.2s ease;
}

.rs-btn-explore-catalogue:hover svg {
    transform: translateX(3px);
}

/* Guest Lookup Box */
.rs-guest-lookup-box {
    background: #fafaf8;
    border: 1px solid #ebebeb;
    border-radius: 14px;
    padding: 18px 22px;
    max-width: 520px;
    margin: 0 auto 2.5rem;
    text-align: left;
}

.rs-guest-lookup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 12px;
}

.rs-lookup-inputs {
    display: flex;
    gap: 10px;
}

.rs-lookup-input {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
    color: #111111;
    outline: none;
    transition: border-color 0.2s ease;
}

.rs-lookup-input:focus {
    border-color: #111111;
}

.rs-lookup-btn {
    background: #111111;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.rs-lookup-btn:hover {
    background: #333333;
}

/* Trust Badges in Empty Order History */
.rs-empty-oh-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 2.25rem;
    border-top: 1px solid #f0f0f0;
    text-align: left;
}

.rs-oh-badge-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fafaf8;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    transition: border-color 0.2s, background 0.2s;
}

.rs-oh-badge-item:hover {
    border-color: #111111;
    background: #ffffff;
}

.rs-oh-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    color: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rs-oh-badge-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rs-oh-badge-text strong {
    font-size: 0.85rem;
    color: #111111;
    font-weight: 600;
    line-height: 1.25;
}

.rs-oh-badge-text span {
    font-size: 0.75rem;
    color: #777777;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .rs-empty-oh-badges {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .rs-empty-oh-card {
        padding: 2.5rem 1.25rem 3rem;
    }

    .rs-empty-oh-title {
        font-size: 1.75rem;
    }

    .rs-lookup-inputs {
        flex-direction: column;
    }

    .rs-lookup-btn {
        width: 100%;
        padding: 12px;
    }
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 768px) {
    .rs-order-history-wrap {
        padding: 1.5rem 16px 4.5rem;
    }

    .rs-oh-title {
        font-size: 1.85rem;
    }

    .rs-active-order-card {
        padding: 20px 18px;
    }

    .active-order-header {
        flex-direction: column;
        gap: 8px;
    }

    .rs-tracking-stepper {
        margin: 1.25rem 0 1.5rem;
        gap: 0;
    }

    .stepper-step .step-label-text {
        font-size: 0.75rem;
    }

    .stepper-line {
        margin: 0 8px;
        min-width: 14px;
    }

    .rs-order-item-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .order-item-right {
        text-align: left;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .rs-prev-order-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px 18px;
    }

    .prev-order-right {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }
}
