/**
 * HMVIP Comment Auction — Banner e Badges
 *
 * Tema: Âmbar/Dourado (diferente de PPV=Rosa e VIP=Ouro-claro)
 * Suporte: Light mode (padrão) + Dark mode (body.bb-dark-theme)
 *
 * Padrão visual herdado de hmvip-content-shield/assets/css/paywall-banners.css
 */

/* ==========================================================================
   Comment Auction Banner — Âmbar/Dourado
   Inserido abaixo do formulário de comentário (.acomment-reply)
   ========================================================================== */

.hmvip-auction-banner {
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 10px 12px 12px 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: hmvip-slide-in 0.25s ease-out;
}

@keyframes hmvip-slide-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Ícone --- */
.hmvip-auction-banner__icon-bg {
    background: rgba(245, 158, 11, 0.12);
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hmvip-auction-banner__icon {
    font-size: 18px;
    line-height: 1;
}

/* --- Texto --- */
.hmvip-auction-banner__body {
    flex: 1;
    min-width: 160px;
}

.hmvip-auction-banner__title {
    color: #111;
    font-weight: 700;
    font-size: 14px;
    margin: 0 0 2px 0;
}

.hmvip-auction-banner__min-price {
    color: #d97706;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.hmvip-auction-banner__alert {
    color: #78350f;
    font-size: 11px;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 6px;
    padding: 4px 8px;
    display: inline-block;
    margin-top: 4px;
}

/* --- Ação --- */
.hmvip-auction-banner__action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.hmvip-auction-banner__bid-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.hmvip-auction-banner__bid-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
    color: #fff;
}

/* Input de valor do lance */
.hmvip-auction-banner__input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.hmvip-auction-banner__amount-input {
    border: 1.5px solid rgba(245, 158, 11, 0.5);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    background: #fff;
    width: 100px;
    outline: none;
    transition: border-color 0.2s;
}

.hmvip-auction-banner__amount-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.hmvip-auction-banner__amount-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.hmvip-auction-banner__confirm-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.hmvip-auction-banner__confirm-btn:hover {
    transform: translateY(-1px);
    color: #fff;
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */

body.bb-dark-theme .hmvip-auction-banner {
    background-color: var(--bb-dark-bg, #0a0a0a);
    background-image: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, rgba(245, 158, 11, 0.09) 100%);
    box-shadow: none;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

body.bb-dark-theme .hmvip-auction-banner__title {
    color: #ffffff !important;
    letter-spacing: 0.3px;
}

body.bb-dark-theme .hmvip-auction-banner__min-price {
    color: #fbbf24;
}

body.bb-dark-theme .hmvip-auction-banner__alert {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.08);
}

body.bb-dark-theme .hmvip-auction-banner__bid-btn {
    color: #ffffff !important;
    background-color: rgba(245, 158, 11, 0.15) !important;
    background-image: none !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
    box-shadow: none;
}

body.bb-dark-theme .hmvip-auction-banner__bid-btn:hover {
    background-color: rgba(245, 158, 11, 0.3) !important;
    color: #ffffff !important;
}

body.bb-dark-theme .hmvip-auction-banner__amount-input {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(245, 158, 11, 0.4);
}

body.bb-dark-theme .hmvip-auction-banner__confirm-btn {
    color: #ffffff !important;
    background-color: rgba(245, 158, 11, 0.2) !important;
    background-image: none !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
}

/* ==========================================================================
   Badge no comentário fixado
   ========================================================================== */

.hmvip-pinned-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

.hmvip-pinned-comment {
    border-left: 3px solid #f59e0b !important;
    order: -1;
}

body.bb-dark-theme .hmvip-pinned-comment {
    border-left-color: #d97706 !important;
}

/* ==========================================================================
   Modal de leilão
   ========================================================================== */

.hmvip-auction-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: hmvip-fade-in 0.2s ease;
}

@keyframes hmvip-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hmvip-auction-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: hmvip-modal-in 0.25s ease-out;
}

@keyframes hmvip-modal-in {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

body.bb-dark-theme .hmvip-auction-modal {
    background: #1a1a1a;
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fff;
}

.hmvip-auction-modal h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

body.bb-dark-theme .hmvip-auction-modal h3 {
    color: #fff;
}

.hmvip-auction-modal-alert {
    background: #fffbf0;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #78350f;
    margin-bottom: 20px;
}

body.bb-dark-theme .hmvip-auction-modal-alert {
    background: rgba(245, 158, 11, 0.08);
    color: #fde68a;
}

.hmvip-auction-modal-field {
    margin-bottom: 16px;
}

.hmvip-auction-modal-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

body.bb-dark-theme .hmvip-auction-modal-field label {
    color: #e5e7eb;
}

.hmvip-auction-modal-input {
    width: 100%;
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 22px;
    font-weight: 700;
    color: #111;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

body.bb-dark-theme .hmvip-auction-modal-input {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(245, 158, 11, 0.4);
}

.hmvip-auction-modal-input:focus {
    border-color: #f59e0b;
}

.hmvip-auction-modal-breakdown {
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.8;
}

body.bb-dark-theme .hmvip-auction-modal-breakdown {
    background: rgba(255, 255, 255, 0.04);
    color: #9ca3af;
}

.hmvip-auction-modal-breakdown strong {
    color: #d97706;
}

body.bb-dark-theme .hmvip-auction-modal-breakdown strong {
    color: #fbbf24;
}

.hmvip-auction-modal-actions {
    display: flex;
    gap: 10px;
}

.hmvip-auction-modal-pay-btn {
    flex: 1;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    transition: transform 0.2s;
}

.hmvip-auction-modal-pay-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

.hmvip-auction-modal-cancel-btn {
    background: none;
    border: 1.5px solid #d1d5db;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: background 0.2s;
}

.hmvip-auction-modal-cancel-btn:hover {
    background: #f3f4f6;
}

body.bb-dark-theme .hmvip-auction-modal-cancel-btn {
    border-color: rgba(255, 255, 255, 0.2);
    color: #9ca3af;
}

body.bb-dark-theme .hmvip-auction-modal-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Popup de Violação de Conteúdo
   Exibido quando o comentário contém palavras ou links proibidos
   ========================================================================== */

.hmvip-auction-violation-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: hmvip-fade-in 0.2s ease;
}

.hmvip-violation-box {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    animation: hmvip-modal-in 0.25s ease-out;
    border-top: 4px solid #ef4444;
}

.hmvip-violation-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 12px;
}

.hmvip-violation-title {
    font-size: 17px;
    font-weight: 700;
    color: #111;
    margin: 0 0 10px 0;
}

.hmvip-violation-detail {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.hmvip-violation-detail strong {
    color: #b91c1c;
}

.hmvip-violation-tip {
    font-size: 12px;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.hmvip-violation-close-btn {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 11px 32px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.hmvip-violation-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.45);
    color: #fff;
}

/* Dark mode */
body.bb-dark-theme .hmvip-violation-box {
    background: #1a1a1a;
    border-top-color: #ef4444;
    color: #fff;
}

body.bb-dark-theme .hmvip-violation-title {
    color: #fff;
}

body.bb-dark-theme .hmvip-violation-detail {
    color: #d1d5db;
}

body.bb-dark-theme .hmvip-violation-detail strong {
    color: #fca5a5;
}

body.bb-dark-theme .hmvip-violation-tip {
    background: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
}

/* ==========================================================================
   Badge de Posição no Modal de Lance
   Mostra posição estimada em tempo real ao digitar o valor do lance
   ========================================================================== */

.hmvip-auction-pos-badge {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    transition: background 0.2s, color 0.2s;
}

/* 🏆 Primeiro lugar */
.hmvip-auction-pos-badge.pos-top {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-left: 4px solid #10b981;
}

/* 📍 Meio do ranking */
.hmvip-auction-pos-badge.pos-mid {
    background: #fef3c7;
    color: #78350f;
    border-left: 4px solid #f59e0b;
}

/* ⬇ Última posição */
.hmvip-auction-pos-badge.pos-last {
    background: #f3f4f6;
    color: #4b5563;
    border-left: 4px solid #9ca3af;
}

/* ⏳ Carregando */
.hmvip-auction-pos-badge.pos-loading {
    background: #f3f4f6;
    color: #6b7280;
    border-left: 4px solid #d1d5db;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #9ca3af;
    border-top-color: #6b7280;
    border-radius: 50%;
    animation: hmvip-spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* Texto de sugestão de valor */
.pos-suggest {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.85;
}

/* Dark mode */
body.bb-dark-theme .hmvip-auction-pos-badge.pos-top {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border-left-color: #10b981;
}

body.bb-dark-theme .hmvip-auction-pos-badge.pos-mid {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    border-left-color: #f59e0b;
}

body.bb-dark-theme .hmvip-auction-pos-badge.pos-last {
    background: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
    border-left-color: #4b5563;
}

body.bb-dark-theme .hmvip-auction-pos-badge.pos-loading {
    background: rgba(255, 255, 255, 0.04);
    color: #9ca3af;
    border-left-color: #374151;
}
