/**
 * QuizDrop Components CSS
 * Preço dinâmico, ranking, modal de derrubar preço
 */

/* ==================== PREÇO QUIZDROP NOS CARDS ==================== */

.product-prices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

@media (max-width: 768px) {
    .product-prices {
        gap: 8px;
        margin-top: 0;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.price-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-original {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-original .price-value {
    font-size: 16px;
    font-weight: 600;
    color: #999;
    text-decoration: line-through;
}

.price-quizdrop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: linear-gradient(135deg, #FF6B35 0%, #FEC400 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 768px) {
    .price-quizdrop {
        padding: 8px;
    }
}

.price-quizdrop .price-label {
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.price-quizdrop .price-value {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-discount-percent {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    text-shadow: none;
}

@media (max-width: 768px) {
    .price-quizdrop .price-value {
        font-size: 20px;
    }
}

.price-quizdrop.price-zero {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    animation: priceZeroPulse 2s ease-in-out infinite;
}

@keyframes priceZeroPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.6);
    }
}

/* Botão Derrubar Preço - Dentro da caixa laranja */
.btn-drop-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #FF6B35;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-drop-price:hover {
    background: rgba(255, 255, 255, 1);
    color: #E63946;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-drop-price:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-drop-price:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Botão Resgatar Grátis - Quando preço = 0 */
.btn-claim-free {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
    animation: pulse-green 2s infinite;
}

.btn-claim-free:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-claim-free:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.btn-claim-free:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

/* Barra de Progresso */
.price-progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FF6B35 0%, #FEC400 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.price-stats {
    display: flex;
    justify-content: space-around;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 107, 53, 0.05);
    border-radius: 6px;
    font-size: 11px;
}

.price-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.price-stat-label {
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-stat-value {
    color: #FF6B35;
    font-weight: 800;
    font-size: 13px;
}

/* ==================== RANKING MINI (NOS CARDS) ==================== */

.product-ranking-mini {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 107, 53, 0.05);
    border-radius: 8px;
    border-left: 3px solid #FF6B35;
}

.ranking-title {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #FF6B35;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ranking-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666;
    padding: 4px 0;
}

.ranking-list li:first-child {
    color: #FFD700;
    font-weight: 700;
}

.ranking-list li:nth-child(2) {
    color: #C0C0C0;
    font-weight: 600;
}

.ranking-list li:nth-child(3) {
    color: #CD7F32;
    font-weight: 600;
}

.btn-view-ranking {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    background: transparent;
    color: #FF6B35;
    border: 1px solid #FF6B35;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-view-ranking:hover {
    background: #FF6B35;
    color: #fff;
}

/* ==================== MODAL DERRUBAR PREÇO ==================== */

.modal-drop-price {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-drop-price.active {
    display: flex;
}

.modal-drop-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(255, 107, 53, 0.1);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: #FF6B35;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 107, 53, 0.1);
    color: #FF6B35;
}

.modal-product-info {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 107, 53, 0.05);
    border-radius: 12px;
}

.modal-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.modal-product-details {
    flex: 1;
}

.modal-product-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.modal-current-price {
    font-size: 24px;
    font-weight: 800;
    color: #FF6B35;
}

.drop-input-group {
    margin-bottom: 20px;
}

.drop-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.drop-input-wrapper {
    position: relative;
}

.drop-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.drop-input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.drop-input-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 700;
    color: #999;
}

.drop-quick-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.btn-quick-points {
    padding: 8px;
    background: rgba(255, 107, 53, 0.1);
    color: #FF6B35;
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-quick-points:hover {
    background: #FF6B35;
    color: #fff;
    border-color: #FF6B35;
}

.drop-preview {
    padding: 16px;
    background: linear-gradient(135deg, #FF6B35 0%, #FEC400 100%);
    border-radius: 12px;
    margin-bottom: 20px;
}

.drop-preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    margin-bottom: 8px;
}

.drop-preview-row:last-child {
    margin-bottom: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.drop-preview-label {
    font-size: 14px;
    font-weight: 600;
}

.drop-preview-value {
    font-size: 18px;
    font-weight: 800;
}

.drop-preview-row.highlight .drop-preview-value {
    font-size: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.btn-modal {
    flex: 1;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-modal-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #FEC400 100%);
    color: #fff;
    border: none;
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.btn-modal-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-modal-secondary {
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
}

.btn-modal-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: #999;
}

/* ==================== PÁGINA DE RANKING ==================== */

.ranking-page {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.ranking-header {
    margin-bottom: 24px;
}

.ranking-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #FF6B35;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ranking-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(254, 196, 0, 0.1) 100%);
    border-radius: 12px;
    border-left: 4px solid #FF6B35;
}

.stat-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #FF6B35;
}

.ranking-table {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ranking-table thead {
    background: linear-gradient(135deg, #FF6B35 0%, #FEC400 100%);
}

.ranking-table th {
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ranking-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 14px;
    color: #666;
}

.ranking-table tbody tr:hover {
    background: rgba(255, 107, 53, 0.05);
}

.ranking-table .rank-1 {
    background: rgba(255, 215, 0, 0.1);
    font-weight: 700;
}

.ranking-table .rank-2 {
    background: rgba(192, 192, 192, 0.1);
    font-weight: 600;
}

.ranking-table .rank-3 {
    background: rgba(205, 127, 50, 0.1);
    font-weight: 600;
}

/* ==================== RESPONSIVO ==================== */

@media (max-width: 768px) {
    .price-quizdrop .price-value {
        font-size: 20px;
    }
    
    .btn-drop-price,
    .btn-claim-free {
        padding: 8px 12px;
        font-size: 11px;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .btn-drop-price,
    .btn-claim-free {
        padding: 6px 10px;
        font-size: 10px;
        gap: 3px;
    }
    
    .modal-drop-price {
        padding: 12px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .modal-drop-content {
        padding: 16px;
        max-height: calc(100vh - 40px);
        border-radius: 12px;
        margin: 0 auto;
    }
    
    .modal-header h3 {
        font-size: 20px;
    }
    
    .modal-product-info img {
        max-width: 80px;
        max-height: 80px;
    }
    
    .modal-product-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .drop-quick-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ranking-stats {
        grid-template-columns: 1fr;
    }
    
    .ranking-table {
        font-size: 12px;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 12px 8px;
    }
}
