/* Auctions Page Styles */

/* Auction Lists */
.auction-list {
    display: none;
}

.auction-list.active {
    display: block;
}

/* Max bid highlight */
td.max-bid,
.max-bid {
    color: #28a745;
    font-weight: 600;
}

/* Larger modal for view */
.modal-lg {
    max-width: 700px;
}

/* Auction detail grid */
.auction-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .auction-detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section h4 {
    font-size: 14px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.detail-section p {
    margin-bottom: 8px;
    font-size: 14px;
}

/* Detail tables */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.detail-table th,
.detail-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.detail-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
}

.detail-table tr:last-child td {
    border-bottom: none;
}

/* Part links in detail view */
.part-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.part-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Car name link in auction list */
.car-name-link {
    color: #007bff;
    text-decoration: none;
}

.car-name-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Auction image thumbnail in list */
.auction-image-cell {
    padding: 5px !important;
    width: 60px;
}

.auction-thumb {
    width: 50px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.no-image {
    width: 50px;
    height: 35px;
    background: #f0f0f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #999;
    text-align: center;
}

/* Auction image in detail view */
.auction-image-section {
    text-align: center;
    margin-bottom: 20px;
}

.auction-detail-image {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: opacity 0.2s;
}

.auction-detail-image:hover {
    opacity: 0.8;
}

.auction-thumb {
    cursor: pointer;
    transition: opacity 0.2s;
}

.auction-thumb:hover {
    opacity: 0.7;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #ccc;
}

/* ===========================================
   AUCTION PAGE - MOBILE STYLES
   =========================================== */

@media (max-width: 768px) {
    /* Auction card layout adjustments */
    .auction-image-cell {
        width: auto !important;
        padding: 0 !important;
        border-bottom: none !important;
        justify-content: flex-start !important;
        margin-bottom: 10px;
    }

    .auction-image-cell::before {
        display: none !important;
    }

    .auction-thumb {
        width: 100%;
        height: 120px;
        object-fit: cover;
        border-radius: 6px;
    }

    .no-image {
        width: 100%;
        height: 80px;
        font-size: 12px;
    }

    /* Car name prominent at top */
    td[data-label="Car"] {
        order: -1;
        font-size: 16px;
        padding-bottom: 12px !important;
        border-bottom: none !important;
    }

    td[data-label="Car"]::before {
        display: none !important;
    }

    td[data-label="Car"] strong {
        font-size: 16px;
    }

    /* Price row layout */
    .auction-list tr {
        padding-bottom: 60px; /* Space for actions */
    }

    /* Modal on mobile */
    .modal-lg {
        max-width: calc(100% - 20px);
    }

    /* Detail table responsive */
    .detail-table {
        display: block;
    }

    .detail-table thead {
        display: none;
    }

    .detail-table tbody {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .detail-table tr {
        display: flex;
        flex-direction: column;
        background: #f8f9fa;
        padding: 10px;
        border-radius: 6px;
        box-shadow: none;
    }

    .detail-table td {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        border: none;
    }

    .detail-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        font-size: 12px;
    }

    /* Auction detail grid */
    .auction-detail-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .detail-section {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .auction-thumb {
        height: 100px;
    }

    /* Lightbox adjustments */
    .lightbox img {
        max-width: 95%;
        max-height: 80%;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}

/* Paint display in view modal */
.paint-info {
    color: #2196F3;
    font-size: 12px;
    white-space: nowrap;
}

.paint-total {
    margin-top: 10px;
    padding: 8px 12px;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 13px;
    color: #1565c0;
}
