﻿.order-card-mobile {
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease-in-out;
    background-color: #fff;
}

    .order-card-mobile.is-expanded {
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        border-color: var(--bs-primary);
    }

.order-card-header {
    padding: 1rem;
    cursor: pointer;
    border-radius: calc(0.75rem - 1px);
}

.is-expanded .order-card-header {
    border-bottom: 1px solid #e9ecef;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.order-card-header:hover {
    background-color: #f8f9fa;
}

.order-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.order-info .order-number {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--bs-primary);
}

.order-info .order-date {
    font-size: 0.9rem;
    color: #6c757d;
}

.order-po {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.order-total {
    font-size: 1.2rem;
    font-weight: 600;
    white-space: nowrap;
}

.order-toggle {
    font-size: 1.5rem;
    color: #6c757d;
}

.order-card-body {
    padding: 0.5rem;
    background-color: #e9eff5;
}

.expanded-row-cell {
    padding: 0.5rem !important;
    background-color: #e9eff5 !important;
}

.filter-input-cell {
    background-color: white !important;
    font-weight: normal !important;
    white-space: normal !important;
    padding: 1px 3px !important;
    vertical-align: middle !important;
}

.line-item-container {
    background-color: #f5f6f7;
    padding: 1rem;
    font-size: .9rem;
    margin: 0;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

    .line-item-container:last-child {
        margin-bottom: 0;
    }

    .line-item-container .line-header {
        font-size: .85rem;
        color: #6c757d;
        margin-bottom: 0.5rem;
    }

    .line-item-container .item-code {
        font-weight: 600;
        color: #0d6efd;
        margin-bottom: 0.25rem;
    }

    .line-item-container .ships-from {
        font-size: .85rem;
        color: #6c757d;
        margin-bottom: 1rem;
    }

    .line-item-container .shipping-address-header {
        font-size: .9rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }

    .line-item-container .address-block {
        display: inline-block;
        border: 1px solid #ced4da;
        padding: 0.75rem;
        border-radius: 0.25rem;
        margin-top: 0.5rem;
        background-color: #fff;
        min-width: 200px;
    }

    .line-item-container .address-line {
        line-height: 1.5;
        color: #495057;
        white-space: nowrap;
    }

    .line-item-container .details-right-col {
        display: flex;
        flex-direction: column;
    }

    .line-item-container .status-block {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid #e9ecef;
    }

    .line-item-container .status-item,
    .line-item-container .quantity-item,
    .line-item-container .date-item {
        display: flex;
        justify-content: space-between;
        width: 240px;
        padding: 2px 0;
    }

    .line-item-container .label {
        color: #6c757d;
    }

    .line-item-container .value-shipped {
        color: #dc3545;
        font-weight: bold;
    }

    .line-item-container .price {
        font-weight: 600;
        color: darkorange;
        font-size: 1rem;
    }

    .line-item-container .dates-block {
        margin-top: auto;
        padding-top: 1rem;
    }

    .line-item-container .date-item .value {
        font-weight: bold;
    }

.serial-expand-toggle {
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
    color: #0056b3;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-bottom: 20px;
}

.serial-expand-arrow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    color: #0056b3;
    font-size: 1.2rem;
}

@media (max-width: 575.98px) {
    .order-summary {
        display: flex;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    .order-info {
        display: flex;
        flex-direction: column !important;
        align-items: flex-start !important;
        flex: 1 !important;
        min-width: 0 !important;
    }

        .order-info .order-number {
            font-size: 1.1rem;
            margin-bottom: 0.25rem;
        }

        .order-info .order-date {
            font-size: 0.9rem;
            margin-bottom: 0.25rem;
        }

    .order-po {
        margin-top: 0 !important;
        font-size: 0.85rem;
    }

    .order-total, .order-toggle {
        align-self: flex-start !important;
        margin-left: auto !important;
        margin-bottom: 0.25rem;
    }

    .line-header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .line-item-container .line-header {
        margin-bottom: 0;
    }

    .line-item-container .price {
        font-weight: 600;
        color: darkorange;
        font-size: 1rem;
    }

    .line-item-container .status-block {
        justify-content: flex-start;
    }
}

@media (min-width: 768px) {
    .line-item-container .status-block {
        justify-content: space-between;
    }
}
