/* © 2026 H.W. & H. Investments Pty Ltd. All rights reserved. */
/* ─── Auction Hub ─── */
.auction-hub { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
.auction-hero { text-align: center; padding: 3rem 1rem; background: linear-gradient(135deg, var(--brand-secondary), #2d4a7c); color: #fff; border-radius: 12px; margin-bottom: 2rem; }
.auction-hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.auction-hero p { opacity: 0.9; margin-bottom: 1.5rem; }
.auction-hero-urgent { background: linear-gradient(135deg, #7c2d2d, #b44a4a); }

.auction-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.auction-filters .filter-inline { display: flex; gap: 0.5rem; }
.auction-count { color: var(--grey-600); font-size: 0.9rem; }

/* ─── Auction Cards ─── */
.auction-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.auction-card { display: block; background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; color: inherit; }
.auction-card:hover { transform: translateY(-3px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.auction-card-urgent { border: 2px solid #e74c3c; }
.auction-card-image { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--grey-100); }
.auction-card-image img { width: 100%; height: 100%; object-fit: cover; }
.auction-badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,0.7); color: #fff; font-size: 0.75rem; padding: 3px 8px; border-radius: 4px; }
.auction-badge-urgent { background: #e74c3c; left: auto; right: 8px; }
.auction-card-body { padding: 1rem; }
.auction-card-body h3 { font-size: 1rem; margin: 0 0 0.5rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auction-card-meta { display: flex; gap: 0.75rem; font-size: 0.8rem; color: var(--grey-600); margin-bottom: 0.75rem; flex-wrap: wrap; }
.auction-card-bid { display: flex; justify-content: space-between; align-items: flex-end; }
.bid-label { display: block; font-size: 0.7rem; color: var(--grey-500); text-transform: uppercase; }
.bid-amount { font-size: 1.2rem; font-weight: 700; color: var(--brand-secondary); }
.auction-timer { font-size: 0.85rem; font-weight: 600; color: var(--brand-accent); text-align: right; }
.auction-timer-urgent { color: #e74c3c; }
.auction-timer-ended { color: var(--grey-500); font-style: italic; }

/* ─── Hero Links ─── */
.auction-hero-links { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.auction-hero-links .btn { border-color: rgba(255,255,255,0.6); color: #fff; }
.auction-hero-links .btn:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

/* ─── Result Status Badges ─── */
.auction-badge-sold { background: #27ae60; left: auto; right: 8px; }
.auction-badge-not-sold { background: #e67e22; left: auto; right: 8px; }
.auction-result-status { font-size: 0.85rem; font-weight: 600; text-align: right; }
.status-sold { color: #27ae60; }
.status-ended { color: var(--grey-600); }
.status-not-met { color: #e67e22; }

/* ─── Bid History Card (listing detail) ─── */
.bid-history-card { background: var(--white); border-radius: 10px; padding: 1.25rem; margin-bottom: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.bid-history-title { font-size: 1.1rem; margin: 0 0 1rem; }
.bid-history-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.bid-history-table th { text-align: left; padding: 0.5rem 0.5rem; border-bottom: 2px solid #eee; color: var(--grey-600); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
.bid-history-table td { padding: 0.5rem 0.5rem; border-bottom: 1px solid #f0f0f0; }
.bid-history-mine { background: #f0f7ff; }
.bid-history-mine td { font-weight: 600; }
.bid-history-empty { color: var(--grey-500); font-size: 0.9rem; }
.bid-history-loading { color: var(--grey-500); font-size: 0.9rem; }
.bid-history-toggle { margin-top: 0.75rem; }

/* ─── Bid Flash Animation ─── */
@keyframes bidFlash {
    0% { color: var(--brand-secondary); }
    25% { color: #27ae60; transform: scale(1.08); }
    50% { color: #27ae60; transform: scale(1.08); }
    100% { color: var(--brand-secondary); transform: scale(1); }
}
.bid-flash { animation: bidFlash 0.6s ease-out; }

/* ─── Toast Notification ─── */
.auction-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--brand-secondary, #1a3a5c);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.3s, transform 0.3s;
}
.auction-toast-show {
    opacity: 1;
    transform: translateX(0);
}

/* Card countdown (on listing cards in search/hub) */
.countdown-ended {
    color: var(--grey-500, #6b7280);
    font-style: italic;
}
.countdown-urgent {
    color: #dc2626 !important;
    font-weight: 700;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .auction-hero { padding: 2rem 1rem; }
    .auction-hero h1 { font-size: 1.5rem; }
    .auction-toolbar { flex-direction: column; align-items: flex-start; }
    .auction-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
    .auction-card:hover { transform: none; }
}

@media (max-width: 480px) {
    .auction-hub { padding: 1rem 0.75rem; }
    .auction-hero { padding: 1.5rem 1rem; margin-bottom: 1rem; }
    .auction-hero h1 { font-size: 1.25rem; }
    .auction-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    .auction-card-body h3 { font-size: 0.9rem; }
    .bid-amount { font-size: 1rem; }
}

/* ═══ Premium Auction Refinements ═══ */
.auction-hero {
    background: linear-gradient(135deg, #0f1a2e 0%, var(--navy) 50%, #1a3460 100%);
    padding: 3rem 0;
    color: #fff;
}
.auction-hero h1 {
    color: var(--gold);
    font-weight: 800;
}
.auction-card {
    background: var(--white);
    border: 1px solid var(--grey-100);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}
.auction-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}
.auction-card-urgent {
    border: 2px solid var(--color-danger);
    box-shadow: 0 2px 12px rgba(239,68,68,0.15);
}
.auction-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #3b82f6;
    color: #fff;
}
.auction-badge-urgent {
    background: var(--color-danger);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.bid-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
}
.auction-timer {
    font-family: 'DM Sans', monospace;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    background: #fef3cd;
    color: #92400e;
    border-radius: 6px;
    font-size: 0.85rem;
}
.auction-timer.urgent {
    background: #fee2e2;
    color: #991b1b;
    animation: pulse 1.5s infinite;
}
.bid-history-mine {
    background: rgba(245,166,35,0.08) !important;
    border-left: 3px solid var(--gold);
}

/* ─── Premium Auction Polish ─── */
.auction-card {
    border-radius: 16px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s;
}
.auction-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(15,31,61,0.12);
}
.auction-countdown-urgent {
    animation: urgentPulse 1.5s ease-in-out infinite;
}
@keyframes urgentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ─── Auction Bid Card on Listing Detail ─── */
.auction-bid-card {
    background: var(--white);
    border-radius: 16px;
    border-top: 4px solid var(--brand-secondary, #0f1f3d);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.auction-bid-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-secondary, #0f1f3d);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.auction-bid-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.auction-current-bid {
    text-align: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f1f3;
}
.auction-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--grey-600);
    font-weight: 600;
    margin-bottom: 4px;
}
.auction-price {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--brand-secondary, #0f1f3d);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.auction-bid-count {
    display: block;
    font-size: 0.8rem;
    color: var(--grey-600);
    margin-top: 6px;
}

/* Reserve status */
.auction-reserve-status {
    text-align: center;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.reserve-met {
    background: #dcfce7;
    color: #166534;
}
.reserve-not-met {
    background: #fef3c7;
    color: #92400e;
}

/* Countdown boxes */
.auction-countdown {
    text-align: center;
    margin-bottom: 1.25rem;
}
.auction-countdown .auction-timer {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}
.auction-countdown .auction-timer span {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--brand-secondary, #0f1f3d);
    color: #fff;
    min-width: 56px;
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}
.auction-ended-label {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background: var(--grey-50);
    border-radius: 8px;
    color: var(--grey-600);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Quick bid buttons */
.quick-bid-buttons {
    display: flex;
    gap: 6px;
    margin-bottom: 0.75rem;
}
.quick-bid-btn {
    flex: 1;
    font-size: 0.8rem !important;
    padding: 0.4rem 0.5rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}
.quick-bid-btn:hover {
    background: var(--brand-secondary, #0f1f3d) !important;
    color: #fff !important;
    border-color: var(--brand-secondary, #0f1f3d) !important;
}

/* Bid form */
.auction-bid-form .form-control {
    font-size: 1.1rem;
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 600;
}
.auction-bid-form .btn-full {
    margin-top: 0.75rem;
    padding: 0.85rem;
    font-size: 1.05rem;
    border-radius: 10px;
}

/* Proxy bid */
.auction-proxy-status {
    padding: 0.6rem 0.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e40af;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Buy now */
.auction-buy-now {
    text-align: center;
    padding: 0.75rem;
    border: 2px dashed #e5e7eb;
    border-radius: 10px;
    margin: 1rem 0;
}
.auction-buy-now-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-secondary, #0f1f3d);
}
.auction-buy-now-form {
    margin-top: 0.5rem;
}
.auction-extend-notice {
    font-size: 0.75rem;
    color: #f59e0b;
    text-align: center;
    margin: 0.5rem 0;
    font-weight: 600;
}

/* Ended auction — hide live dot, muted border */
.auction-bid-card--ended {
    border-top-color: var(--grey-400, #9ca3af);
}
.auction-bid-title--ended::before {
    display: none;
}

/* Winner banner */
.auction-winner-banner {
    text-align: center;
    padding: 1rem;
    background: #dcfce7;
    color: #166534;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Final price block (for non-winner viewers) */
.auction-final-price {
    text-align: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f1f3;
}

/* Outbid banner */
.bid-outbid-banner {
    display: none;
    text-align: center;
    padding: 0.6rem 1rem;
    background: #fef2f2;
    color: #991b1b;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Bid status banner */
.bid-status-banner {
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.75rem;
}
.bid-winning {
    background: #dcfce7;
    color: #166534;
}
.bid-outbid {
    background: #fef2f2;
    color: #991b1b;
}

/* Own listing / login prompt */
.auction-own-listing {
    text-align: center;
    color: var(--grey-600);
    font-size: 0.9rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

/* ─── Auction Sub-Page Tabs ─── */
.auction-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--grey-200, #e2e5ed);
    margin-bottom: 1.5rem;
}
.auction-tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--grey-600);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.auction-tab:hover {
    color: var(--navy, #0f1f3d);
    border-bottom-color: #cbd5e1;
}
.auction-tab-active {
    color: var(--navy, #0f1f3d);
    border-bottom-color: var(--gold, #f0a500);
}
@media (max-width: 480px) {
    .auction-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .auction-tab { padding: 0.6rem 0.9rem; font-size: 0.82rem; }
}

/* ── 375px: iPhone SE auction fixes ── */
@media (max-width: 375px) {
    .auction-hub {
        padding: 0.75rem 0.5rem;
    }

    .auction-hero {
        padding: 1.25rem 0.75rem;
        border-radius: 8px;
        margin-bottom: 0.75rem;
    }

    .auction-hero h1 {
        font-size: 1.15rem;
    }

    .auction-hero p {
        font-size: 0.85rem;
    }

    .auction-hero-links {
        flex-direction: column;
        align-items: stretch;
    }

    .auction-hero-links .btn {
        width: 100%;
        text-align: center;
    }

    .auction-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .auction-card-body {
        padding: 0.75rem;
    }

    .auction-card-body h3 {
        font-size: 0.85rem;
    }

    .auction-card-meta {
        font-size: 0.75rem;
        gap: 0.5rem;
    }

    .bid-amount {
        font-size: 0.95rem;
    }

    .auction-timer {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    /* Auction bid card on listing detail: full width */
    .auction-bid-card {
        padding: 10px;
    }

    .auction-bid-title {
        font-size: 0.95rem;
    }

    .auction-price {
        font-size: 1.6rem;
    }

    .auction-countdown .auction-timer span {
        min-width: 44px;
        padding: 6px 4px;
        font-size: 1.1rem;
    }

    .quick-bid-buttons {
        gap: 3px;
    }

    .quick-bid-btn {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.35rem !important;
    }

    .auction-bid-form .form-control {
        font-size: 0.95rem;
        padding: 0.5rem;
    }

    .auction-bid-form .btn-full {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .auction-buy-now-price {
        font-size: 1.1rem;
    }

    /* Bid history table: scrollable */
    .bid-history-table {
        font-size: 0.75rem;
    }

    .bid-history-table th,
    .bid-history-table td {
        padding: 0.35rem 0.35rem;
    }

    /* Tabs: compact */
    .auction-tabs {
        scrollbar-width: none;
    }

    .auction-tabs::-webkit-scrollbar {
        display: none;
    }

    .auction-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.78rem;
    }

    /* Toolbar: stack */
    .auction-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .auction-filters .filter-inline {
        flex-wrap: wrap;
    }

    .auction-count {
        font-size: 0.8rem;
    }
}
