/* ── WooCommerce Claim Queue Styles ───────────────────────────────────────── */

#wcq-claim-box {
    margin: 1.5em 0;
    font-family: inherit;
    --wcq-accent: #4a90e2;
}

#wcq-claim-inner {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

/* Loading state */
.wcq-loading {
    color: #888;
    font-style: italic;
}

/* ── Messages ─────────────────────────────────────────────────────────────── */

.wcq-message {
    padding: 0.85em 1.1em;
    border-radius: 5px;
    font-size: 1rem;
    line-height: 1.5;
}

.wcq-active   { background: #edfaf1; border-left: 4px solid #27ae60; color: #1a5c35; }
.wcq-queued   { background: #fff8e1; border-left: 4px solid #f59e0b; color: #7c4a00; }
.wcq-sold-out { background: #fef2f2; border-left: 4px solid #ef4444; color: #7f1d1d; }
.wcq-expired  { background: #f3f4f6; border-left: 4px solid #9ca3af; color: #4b5563; }
.wcq-warning  { background: #fff3cd; border-left: 4px solid #ffc107; color: #856404; }
.wcq-error    { background: #fef2f2; border-left: 4px solid #dc3545; color: #721c24; }
.wcq-info     { background: #f0f9ff; border-left: 4px solid #0284c7; color: #0c4a6e; }
.wcq-login    { background: #f0f9ff; border-left: 4px solid #0284c7; color: #0c4a6e; }

/* ── Countdown ────────────────────────────────────────────────────────────── */

.wcq-countdown {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.wcq-countdown-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wcq-accent);
}

.wcq-countdown-timer {
    font-size: 2.2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    color: #1a3a6e;
    line-height: 1;
}

.wcq-pre-claim {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border-left: 4px solid var(--wcq-accent);
    border-radius: 6px;
    padding: 1em 1.25em;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.12);
    color: #1a3a6e;
}

/* ── Button row — equal-width side-by-side ────────────────────────────────── */

.wcq-btn-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.6em;
}

/* Grid cell — mirrors ptcg-purchase-actions__button */
.wcq-btn-cell {
    display: block;
    height: 100%;
    min-width: 0;
}

/* ld_button inside a cell — mirrors ptcg-purchase-actions__button.btn */
.wcq-btn-cell > .btn,
.wcq-btn-cell > .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Disabled reserve state */
.wcq-btn-row [aria-busy="true"] { opacity: 0.6; pointer-events: none; }

/* Leave button fallback — only shown when ld_button is unavailable */
.wcq-leave-btn {
    background: transparent;
    border: 1px solid currentColor;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s;
}
.wcq-leave-btn:hover { color: #ef4444; }

/* Turnstile */
.wcq-turnstile {
    margin-bottom: 0.5em;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .wcq-btn-row {
        grid-template-columns: 1fr;
    }

    .wcq-countdown-timer {
        font-size: 1.7rem;
    }
}

/* ── Admin Styles ─────────────────────────────────────────────────────────── */

.wcq-admin-wrap .wcq-table {
    margin-top: 1em;
}

.wcq-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wcq-badge.wcq-active              { background: #d1fae5; color: #065f46; }
.wcq-badge.wcq-waiting             { background: #fef9c3; color: #713f12; }
.wcq-badge.wcq-completed           { background: #dbeafe; color: #1e3a8a; }
.wcq-badge.wcq-expired             { background: #f3f4f6; color: #4b5563; }
.wcq-badge.wcq-released            { background: #fce7f3; color: #831843; }
.wcq-badge.wcq-cancelled           { background: #fee2e2; color: #7f1d1d; }
.wcq-badge.wcq-converted_to_order  { background: #ede9fe; color: #3b0764; }

.wcq-admin-wrap h2 { margin-top: 1em; }

.wcq-verify-banner { margin: 1em 0; }

/* ── PTCG Integration Styles ──────────────────────────────────────────────── */

.wcq-claim-box--ptcg {
    margin: 0 0 1.25em 0;
}

@keyframes wcq-highlight-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5); }
    60%  { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.wcq-claim-box--highlight {
    animation: wcq-highlight-pulse 0.6s ease 2;
    border-radius: 6px;
}

.ptcg-purchase-actions[data-wcq-suppressed="1"],
form.cart[data-wcq-suppressed="1"] {
    display: none !important;
}
