
/* Status div whilst page is loading */

.ebay_status {
    border-radius: 20px;
    background-color: white;
    border: 1px solid #888;
    text-align: center;
    padding: 10px;
}

/* Container holding all listings */
.ebay_items {
    display: grid;
    grid-template-columns: repeat(auto-fill, 400px);
    gap: 16px;
    justify-content: center;
}

/* Individual listing */
.ebay_items > div {
    width: 400px;

    display: grid;
    grid-template-columns: 140px 1fr;
    grid-template-areas:
        "image title"
        "image price"
        "image format";

    gap: 8px 12px;

    padding: 12px;

    border: 1px solid #c0c0c0;
    border-radius: 8px;
    background: #ffffff;

    box-sizing: border-box;

    align-items: start;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Image panel */
.ebay_items > div > div:first-child {
    
    grid-area: image;

    width: 140px;
    height: 140px;

    background: #e8e8e8;
    border-radius: 6px;
    border: 1px solid #d0d0d0;

    display: flex;
    justify-content: center;

    padding: 4px;
    box-sizing: border-box;

    overflow: hidden;
}

.ebay_items > div > div:first-child a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
}

/* Image */
.ebay_items > div > div:first-child img {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;
}
/* Title */
.ebay_items > div > div:nth-child(2) {
    grid-area: title;

    font-weight: bold;
    line-height: 1.3;

    word-break: break-word;
}

.ebay_items > div > div:nth-child(2) a {
    color: #365f91;
    text-decoration: none;
}

.ebay_items > div > div:nth-child(2) a:hover {
    text-decoration: underline;
}

/* Price */
.ebay_items > div > div:nth-child(3) {
    grid-area: price;

    font-size: 1.1em;
    font-weight: bold;
    color: #111;
}

/* Buying format */
.ebay_items > div > div:nth-child(4) {
    grid-area: format;

    color: #666;
    font-size: 0.95em;
}

@media (max-width: 1024px) {
    .ebay_items {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ebay_items > div {
        width: 100%;
    }

}