/**
 * Royal Live Auctions Widget Styles
 */

/* Grid Layout */
.rla-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    justify-content: center;
}

/* Center cards when fewer than column count (uses flexbox) */
.rla-grid.rla-center-few .rla-card {
    flex: 0 1 calc(33.333% - 16px);
    max-width: calc(33.333% - 16px);
    min-width: 280px;
}

/* List Layout */
.rla-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rla-list .rla-card {
    flex-direction: row;
}

.rla-list .rla-thumb {
    min-width: 260px;
    max-width: 300px;
    height: auto;
}

/* Card Styles */
.rla-card {
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    cursor: pointer;
}

.rla-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Thumbnail */
.rla-thumb {
    position: relative;
    background: #e5e7eb;
    display: block;
    overflow: hidden;
}

.rla-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body */
.rla-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Title */
.rla-title {
    font-size: 16px;
    line-height: 1.3;
    margin: 0;
    font-weight: 600;
    color: #111827;
}

/* Meta Info */
.rla-meta {
    font-size: 13px;
    color: #4b5563;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Status Badge */
.rla-badge {
    display: inline-block;
    background-color: var(--rla-badge-color, #10b981);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    padding: 2px 8px;
    line-height: 1;
    white-space: nowrap;
    margin-top: 4px;
    align-self: flex-start;
}

/* Button */
.rla-btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s ease;
}

.rla-btn:hover {
    opacity: 0.9;
}

/* Empty State */
.rla-empty {
    padding: 16px;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    text-align: center;
    color: #6b7280;
}

/* Search Bar */
.rla-searchbar-wrap input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.rla-searchbar-wrap select:hover {
    border-color: #10b981;
    cursor: pointer;
}

/* Load More Button */
.rla-loadmore-wrap {
    text-align: center;
    margin-top: 20px;
}

.rla-loadmore:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Card Animation */
.rla-card {
    opacity: 0;
    transform: translateY(10px);
    animation: rlaFadeIn 0.4s ease forwards;
}

@keyframes rlaFadeIn {
    to {
        opacity: 1;
        transform: none;
    }
}

/* Mobile Auto-List */
@media (max-width: 768px) {
    .rla-mobile-auto-list.rla-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .rla-mobile-auto-list .rla-card {
        flex-direction: row !important;
        align-items: stretch;
    }

    .rla-mobile-auto-list .rla-thumb {
        min-width: 40%;
        max-width: 40%;
        height: auto;
    }

    .rla-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 14px;
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .rla-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 480px) {
    .rla-searchbar-wrap {
        flex-direction: column;
    }

    .rla-searchbar-wrap > div:first-child {
        width: 100%;
    }

    .rla-searchbar-wrap > div:last-child {
        width: 100%;
        justify-content: stretch;
    }

    .rla-searchbar-wrap select {
        flex: 1;
    }

    .rla-list .rla-thumb {
        min-width: 120px;
        max-width: 120px;
    }
}
