/*
Theme Name:   Solina Auction
Theme URI:    https://solinagroup.com
Description:  Child theme of Astra for the Solina internal staff auction platform. Auction screens are provided by the solina-auction plugin; this theme supplies the shell, tokens and typography.
Author:       Solina Group
Template:     astra
Version:      0.1.0
Requires PHP: 8.3
Text Domain:  solina-auction-theme
*/

/* ---------------------------------------------------------------------------
   Design tokens
   Auction-specific components read these, so re-branding is a one-file change.
   --------------------------------------------------------------------------- */
:root {
    --solina-bid-live:      #0f7b6c;  /* lot open, bid accepted */
    --solina-bid-outbid:    #b3261e;  /* you have been outbid */
    --solina-bid-winning:   #1b5e20;  /* you are the highest bidder */
    --solina-lot-closed:    #5f6368;  /* lot ended */
    --solina-urgent:        #c0392b;  /* final minutes */

    --solina-surface:       #ffffff;
    --solina-surface-muted: #f5f6f7;
    --solina-border:        #dadce0;

    --solina-radius:        8px;
    --solina-gap:           16px;
}

/* ---------------------------------------------------------------------------
   Live auction components
   --------------------------------------------------------------------------- */

/* The countdown is rendered from a server-synced timestamp, never the browser
   clock. It is tabular so digits do not jitter as the seconds tick over. */
.solina-countdown {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    letter-spacing: 0.02em;
}

.solina-countdown--urgent {
    color: var(--solina-urgent);
    font-weight: 700;
}

/* Current price: the single most-read number on the page. */
.solina-current-bid {
    font-variant-numeric: tabular-nums;
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 700;
}

/* Flashed briefly when a new bid arrives over the WebSocket, so a change that
   happens while you are looking elsewhere is still noticeable. */
@keyframes solina-bid-update {
    from { background-color: rgba(15, 123, 108, 0.18); }
    to   { background-color: transparent; }
}

.solina-current-bid--updated {
    animation: solina-bid-update 1.2s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .solina-current-bid--updated { animation: none; }
}

.solina-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.6;
}

.solina-status--open    { background: #e6f4f1; color: var(--solina-bid-live); }
.solina-status--winning { background: #e8f5e9; color: var(--solina-bid-winning); }
.solina-status--outbid  { background: #fce8e6; color: var(--solina-bid-outbid); }
.solina-status--closed  { background: var(--solina-surface-muted); color: var(--solina-lot-closed); }

/* Bid history: newest first, monospaced amounts so columns line up. */
.solina-bid-history td.solina-amount {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

/* Connection state for the live feed. Hidden while healthy — it only appears
   when the bidder needs to know the page has gone stale. */
.solina-connection-banner {
    display: none;
    padding: 8px 12px;
    border-radius: var(--solina-radius);
    background: #fff4e5;
    color: #8a5300;
    font-size: 0.875rem;
}

.solina-connection-banner--visible { display: block; }
