/* ==========================================================================
   GlocalSaino Auctions Displayed by Shortcodes — Frontend styles

   The custom properties below are the plugin's configurable "theme" colors —
   see Auctions → Settings → Appearance. Values here are just the defaults;
   an admin's chosen colors are applied by overriding these same variables
   in a small inline <style> block (see enqueue_frontend_style() in
   controllers/class-gsads-auction-controller.php), so this file never needs
   editing just to change colors.
   ========================================================================== */

:root {
    --gsads-box-bg: #f9f9f9;
    --gsads-text-color: #333333;
    --gsads-accent-color: #1a237e;
    --gsads-button-bg: #2e7d32;
    --gsads-button-text: #ffffff;
}

.gsads-auction-box {
    background: var(--gsads-box-bg);
    color: var(--gsads-text-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 22px 24px;
    margin: 24px 0;
    font-family: inherit;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Status badge
   -------------------------------------------------------------------------- */

.gsads-auction-status {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.82em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 16px;
}

.gsads-active {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.gsads-ended {
    background: #fce4ec;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}

/* --------------------------------------------------------------------------
   Info rows (end date, countdown, current bid, increment)
   -------------------------------------------------------------------------- */

.gsads-auction-end,
.gsads-countdown,
.gsads-current-bid,
.gsads-start-price,
.gsads-min-increment {
    margin-bottom: 10px;
    font-size: 0.95em;
}

.gsads-label {
    font-weight: 600;
    color: var(--gsads-text-color);
    margin-right: 5px;
}

/* Countdown timer — deliberately a fixed urgency color, not the accent */
#gsads-countdown-timer {
    font-size: 1.5em;
    font-weight: 800;
    color: #c0392b;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* Current bid amount */
#gsads-current-bid-amount {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--gsads-accent-color);
}

.gsads-bid-user {
    font-size: 0.82em;
    color: #888;
    margin-left: 6px;
}

.gsads-min-increment {
    font-size: 0.85em;
    color: #777;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Bid form
   -------------------------------------------------------------------------- */

#gsads-auction-form {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;
}

.gsads-bid-input-wrap {
    margin-bottom: 12px;
}

.gsads-bid-input-wrap label {
    display: block;
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 6px;
    color: var(--gsads-text-color);
}

.gsads-bid-input-wrap input[type="number"] {
    width: 160px;
    padding: 9px 12px;
    border: 1px solid #bbb;
    border-radius: 5px;
    font-size: 1em;
    color: #222;
    transition: border-color 0.2s;
}

.gsads-bid-input-wrap input[type="number"]:focus {
    border-color: var(--gsads-accent-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

/* Safari: remove native appearance so text renders correctly */
.gsads-bid-btn,
.gsads-instant-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.gsads-bid-btn {
    display: inline-block;
    background: var(--gsads-button-bg) !important;
    color: var(--gsads-button-text) !important;
    border: none !important;
    padding: 10px 26px !important;
    border-radius: 5px !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    word-spacing: normal !important;
    line-height: 1.5 !important;
    white-space: nowrap;
    cursor: pointer;
    transition: filter 0.2s;
    vertical-align: middle;
    text-decoration: none !important;
}

.gsads-auction-box .gsads-bid-btn:hover,
.gsads-auction-box .gsads-bid-btn:focus {
    filter: brightness(85%);
    color: var(--gsads-button-text) !important;
    text-decoration: none !important;
}

.gsads-bid-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Response messages
   -------------------------------------------------------------------------- */

.gsads-bid-response {
    margin-top: 12px;
    font-size: 0.95em;
    min-height: 1.4em;
}

.gsads-success {
    color: #2e7d32;
    font-weight: 600;
}

.gsads-error {
    color: #b71c1c;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Login notice / auction closed notice
   -------------------------------------------------------------------------- */

.gsads-login-notice,
.gsads-auction-closed {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 0.92em;
}

.gsads-login-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #5d4037;
}

.gsads-login-notice a {
    color: var(--gsads-accent-color);
    font-weight: 600;
    text-decoration: underline;
}

.gsads-auction-closed {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #9e9e9e;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Bid history list (single-auction-product.php)
   -------------------------------------------------------------------------- */

.gsads-bid-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
}

.gsads-bid-list li {
    padding: 10px 16px;
    font-size: 0.88em;
    color: var(--gsads-text-color);
    border-bottom: 1px solid #f0f0f0;
}

.gsads-bid-list li:last-child {
    border-bottom: none;
}

.gsads-bid-list li:nth-child(odd) {
    background: #fafafa;
}

/* --------------------------------------------------------------------------
   Upcoming / start countdown
   -------------------------------------------------------------------------- */

.gsads-upcoming {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.gsads-start-countdown {
    margin-bottom: 10px;
    font-size: 0.95em;
}

#gsads-start-countdown-timer {
    font-size: 1.5em;
    font-weight: 800;
    color: #1565c0;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.gsads-auction-start {
    margin-bottom: 10px;
    font-size: 0.95em;
}

/* --------------------------------------------------------------------------
   Instant close (buy-it-now / direct award) — deliberately its own fixed
   accent color, distinct from the main bid button, not user-configurable
   -------------------------------------------------------------------------- */

.gsads-instant-price {
    margin-bottom: 10px;
    font-size: 0.95em;
    padding: 8px 12px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 5px;
    display: inline-block;
}

.gsads-instant-btn {
    display: inline-block;
    background: #e65100 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 22px !important;
    border-radius: 5px !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    word-spacing: normal !important;
    line-height: 1.5 !important;
    white-space: nowrap;
    cursor: pointer;
    margin-left: 8px;
    transition: background 0.2s;
    vertical-align: middle;
    text-decoration: none !important;
}

.gsads-auction-box .gsads-instant-btn:hover,
.gsads-auction-box .gsads-instant-btn:focus {
    background: #bf360c !important;
    color: #fff !important;
    text-decoration: none !important;
}

.gsads-instant-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Bid form heading
   -------------------------------------------------------------------------- */

.gsads-form-heading {
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gsads-text-color);
    margin: 20px 0 12px;
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;
}

/* --------------------------------------------------------------------------
   Gallery shortcode [glocalsaino_auctions]
   -------------------------------------------------------------------------- */

.gsads-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.gsads-gallery-card {
    background: var(--gsads-box-bg);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gsads-gallery-card-image {
    aspect-ratio: 4 / 3;
    background: #eee;
    overflow: hidden;
}

.gsads-gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gsads-gallery-card-placeholder {
    width: 100%;
    height: 100%;
    background-image: linear-gradient(135deg, #e8e8e8 25%, #f2f2f2 25%, #f2f2f2 50%, #e8e8e8 50%, #e8e8e8 75%, #f2f2f2 75%, #f2f2f2 100%);
    background-size: 28px 28px;
}

.gsads-gallery-card-body {
    padding: 16px 18px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--gsads-text-color);
}

.gsads-gallery-card-title {
    margin: 0;
    font-size: 1.05em;
    font-weight: 700;
    color: var(--gsads-text-color);
    line-height: 1.3;
}

.gsads-gallery-card-amount,
.gsads-gallery-card-closes {
    font-size: 0.9em;
}

.gsads-gallery-card-btn {
    margin-top: auto;
    display: inline-block;
    text-align: center;
    background: var(--gsads-button-bg) !important;
    color: var(--gsads-button-text) !important;
    border: none !important;
    padding: 9px 18px !important;
    border-radius: 5px !important;
    font-size: 0.95em !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: filter 0.2s;
}

.gsads-gallery-card-btn:hover,
.gsads-gallery-card-btn:focus {
    filter: brightness(85%);
    color: var(--gsads-button-text) !important;
    text-decoration: none !important;
}

.gsads-gallery-empty {
    color: #777;
    font-style: italic;
}
