/* Orders & Downloads Customization */
.duwaale-orders-list,
.duwaale-downloads-list {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.duwaale-order-card,
.duwaale-download-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f1f1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.duwaale-order-card:hover,
.duwaale-download-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.order-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f9f9f9;
}

.order-id {
    display: block;
    font-weight: 700;
    color: #111827;
    font-size: 1.05rem;
}

.order-date {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 4px;
}

.order-status-badge {
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: fit-content;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-on-hold {
    background: #fef9c3;
    color: #854d0e;
}

.status-cancelled,
.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background: #f3f4f6;
    color: #374151;
}

.order-body {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 20px;
}

.order-items {
    display: flex;
    gap: -10px;
}

.order-item-thumb img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.order-item-thumb {
    margin-right: -15px;
}

.order-more-items {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    border: 2px solid #fff;
    margin-left: 15px;
    /* Adjust for overlap */
    z-index: 0;
}

.order-total-block {
    text-align: right;
}

.total-label {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
}

.total-amount {
    display: block;
    font-weight: 700;
    color: #111827;
    font-size: 1.1rem;
}

.total-items-count {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
}

.order-actions {
    display: flex;
    gap: 10px;
}

.btn-order-action {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    background: #f3f4f6;
    color: #374151;
    transition: all 0.2s;
}

.btn-order-action:hover {
    background: #e5e7eb;
}

.btn-order-action.view {
    background: #Ef5f5f;
    color: white;
}

.btn-order-action.view:hover {
    background: #d44a4a;
}

/* Download Card Styles */
.duwaale-download-card {
    flex-direction: row;
    align-items: center;
}

.download-info {
    flex: 1;
}

.download-product-title a {
    color: #111827;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
}

.download-meta {
    margin-top: 5px;
    font-size: 0.85rem;
    color: #6b7280;
}

.download-meta .meta-item {
    margin-right: 15px;
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #Ef5f5f;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.btn-download:hover {
    background: #d44a4a;
}

.download-remaining-count {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 5px;
}

/* Empty State */
.duwaale-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.empty-icon {
    width: 64px;
    height: 64px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #9ca3af;
}

.empty-icon svg {
    width: 32px;
    height: 32px;
}

.duwaale-empty-state h3 {
    margin-bottom: 10px;
    color: #111827;
}

.duwaale-empty-state p {
    color: #6b7280;
    margin-bottom: 25px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: #Ef5f5f;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 600px) {
    .order-body {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding-right: 0;
        margin-bottom: 20px;
    }

    .order-total-block {
        text-align: left;
        margin-top: 15px;
    }

    .order-actions {
        width: 100%;
    }

    .btn-order-action {
        flex: 1;
        text-align: center;
    }

    .duwaale-download-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .download-action {
        width: 100%;
    }

    .btn-download {
        justify-content: center;
    }
}

/* WooCommerce Dynamic Pages - Thank You & View Order */
.duwaale-thankyou-wrapper,
.duwaale-view-order-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

/* Hide theme entry title on checkout/account pages */
.woocommerce-checkout .entry-title,
.woocommerce-account .entry-title {
    display: none !important;
}

.duwaale-thankyou-wrapper .card,
.duwaale-view-order-wrapper .card {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 30px;
    box-shadow: none;
    border: none;
}

.duwaale-thankyou-wrapper .card.success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.duwaale-thankyou-wrapper .success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e6f8ed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #1f9254;
    flex-shrink: 0;
}

.duwaale-thankyou-wrapper h1,
.duwaale-view-order-wrapper h1 {
    font-size: 24px;
    margin: 0;
    color: #222;
    font-weight: 700;
}

.duwaale-thankyou-wrapper .muted,
.duwaale-view-order-wrapper .muted {
    color: #666;
    font-size: 14px;
    margin: 4px 0;
    line-height: 1.5;
}

.duwaale-thankyou-wrapper .section-title,
.duwaale-view-order-wrapper .section-title {
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 14px;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.duwaale-thankyou-wrapper .order-row,
.duwaale-view-order-wrapper .order-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #444;
}

.duwaale-thankyou-wrapper .divider,
.duwaale-view-order-wrapper .divider {
    height: 1px;
    background: #eee;
    margin: 16px 0;
}

.duwaale-thankyou-wrapper .total,
.duwaale-view-order-wrapper .total {
    font-weight: 700;
    font-size: 16px;
    color: #000;
}

.duwaale-thankyou-wrapper .product,
.duwaale-view-order-wrapper .product {
    display: flex;
    gap: 16px;
    align-items: center;
}

.duwaale-thankyou-wrapper .product img,
.duwaale-view-order-wrapper .product img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
    border: 1px solid #eee;
}

/* Status Bar Styling for View Order */
.status-card {
    padding-bottom: 20px !important;
}

.order-status-bar {
    margin-top: 30px;
    position: relative;
    padding: 0 10px;
}

.status-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.step-dot {
    width: 14px;
    height: 14px;
    background: #e5e7eb;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #e5e7eb;
    transition: all 0.3s;
}

.status-step.active .step-dot {
    background: #000;
    box-shadow: 0 0 0 1px #000;
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    text-align: center;
}

.status-step.active .step-label {
    color: #000;
    font-weight: 600;
}

.status-line {
    position: absolute;
    top: 7px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e5e7eb;
    z-index: 1;
    width: calc(100% - 60px);
    margin: 0 auto;
}

.status-line-fill {
    height: 100%;
    background: #000;
    transition: width 0.5s ease;
}

/* Button container with padding */
.duwaale-thankyou-wrapper .cta-card,
.duwaale-view-order-wrapper .cta-card {
    padding: 24px 0;
    margin-top: 20px;
}

.duwaale-thankyou-wrapper .cta,
.duwaale-view-order-wrapper .cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.duwaale-thankyou-wrapper .btn,
.duwaale-view-order-wrapper .btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.duwaale-thankyou-wrapper .btn-primary,
.duwaale-view-order-wrapper .btn-primary {
    background: #000;
    color: #fff;
}

.duwaale-thankyou-wrapper .btn-primary:hover,
.duwaale-view-order-wrapper .btn-primary:hover {
    background: #111;
    transform: translateY(-1px);
}

.duwaale-thankyou-wrapper .btn-outline,
.duwaale-view-order-wrapper .btn-outline {
    background: #fff;
    border: 1px solid #ddd;
    color: #444;
}

.duwaale-thankyou-wrapper .btn-outline:hover,
.duwaale-view-order-wrapper .btn-outline:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

@media (max-width: 600px) {

    .duwaale-thankyou-wrapper,
    .duwaale-view-order-wrapper {
        padding: 15px;
        margin: 20px auto;
    }

    .duwaale-thankyou-wrapper .cta .btn,
    .duwaale-view-order-wrapper .cta .btn {
        width: 100%;
    }
}