/* 
 * Pricing Table with Quantity - Stylesheet
 * File: assets/css/pricing-table.css
 */

.ptq-pricing-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    max-width: 400px;
    margin: 0 auto;
}

.ptq-pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.ptq-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
}

.ptq-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1f2937;
}

.ptq-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.ptq-price-wrapper {
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.ptq-currency {
    font-size: 24px;
    font-weight: 600;
    color: #6366f1;
}

.ptq-price {
    font-size: 48px;
    font-weight: 800;
    color: #6366f1;
    line-height: 1;
}

.ptq-period {
    font-size: 16px;
    color: #6b7280;
}

.ptq-quantity-selector {
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ptq-quantity-selector label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.ptq-quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.ptq-qty-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #6366f1;
    background: #ffffff;
    color: #6366f1;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ptq-qty-btn:hover {
    background: #6366f1;
    color: #ffffff;
}

.ptq-qty-btn:active {
    transform: scale(0.95);
}

.ptq-qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ptq-quantity-input {
    width: 80px !important;
    height: 40px !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    border: 2px solid #d1d5db !important;
    border-radius: 6px !important;
    outline: none;
    transition: border-color 0.2s ease;
    background: #ffffff !important;
    color: #1f2937 !important;
    padding: 0 8px !important;
    line-height: 36px !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.ptq-quantity-input:focus {
    border-color: #6366f1 !important;
}

/* IMPORTANTE: Garante que o valor seja sempre visível */
.ptq-quantity-input::-webkit-input-placeholder {
    color: transparent !important;
}
.ptq-quantity-input::-moz-placeholder {
    color: transparent !important;
}
.ptq-quantity-input:-ms-input-placeholder {
    color: transparent !important;
}
.ptq-quantity-input:-moz-placeholder {
    color: transparent !important;
}

/* Remove setas do input number */
.ptq-quantity-input::-webkit-outer-spin-button,
.ptq-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ptq-quantity-input[type=number] {
    -moz-appearance: textfield;
}

.ptq-discount-info {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

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

.ptq-discount-badge {
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ptq-discount-badge::before {
    content: "🎉";
    font-size: 16px;
}

.ptq-total-wrapper {
    background: #f3f4f6;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ptq-total-wrapper strong {
    font-size: 16px;
    color: #374151;
}

.ptq-total-price {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.ptq-total-value {
    transition: all 0.3s ease;
}

.ptq-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.ptq-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #4b5563;
}

.ptq-feature-item:last-child {
    border-bottom: none;
}

.ptq-feature-item svg,
.ptq-feature-item i {
    color: #10b981;
    font-size: 18px;
    min-width: 18px;
    flex-shrink: 0;
}

.ptq-button {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: #6366f1;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.ptq-button:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
    color: #ffffff;
}

.ptq-button:active {
    transform: translateY(0);
}

/* Estados de loading/disabled */
.ptq-pricing-card.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsivo */
@media (max-width: 768px) {
    .ptq-pricing-card {
        padding: 24px;
        max-width: 100%;
    }
    
    .ptq-title {
        font-size: 24px;
    }
    
    .ptq-price {
        font-size: 36px;
    }
    
    .ptq-currency {
        font-size: 20px;
    }
    
    .ptq-total-price {
        font-size: 20px;
    }
    
    .ptq-quantity-controls {
        gap: 8px;
    }
    
    .ptq-qty-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .ptq-quantity-input {
        width: 70px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .ptq-pricing-card {
        padding: 20px;
    }
    
    .ptq-title {
        font-size: 22px;
    }
    
    .ptq-price {
        font-size: 32px;
    }
    
    .ptq-button {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Melhorias de acessibilidade */
.ptq-qty-btn:focus,
.ptq-quantity-input:focus,
.ptq-button:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Animação suave para mudanças de preço */
@keyframes priceUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.ptq-total-value.updating {
    animation: priceUpdate 0.3s ease;
}

/* Dark mode support (opcional) */
@media (prefers-color-scheme: dark) {
    .ptq-pricing-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .ptq-title {
        color: #f9fafb;
    }
    
    .ptq-subtitle,
    .ptq-period {
        color: #9ca3af;
    }
    
    .ptq-feature-item {
        color: #d1d5db;
        border-bottom-color: #374151;
    }
    
    .ptq-quantity-selector {
        background: #111827;
    }
    
    .ptq-quantity-selector label {
        color: #f3f4f6;
    }
    
    .ptq-total-wrapper {
        background: #111827;
    }
    
    .ptq-total-wrapper strong {
        color: #f3f4f6;
    }
    
    .ptq-total-price {
        color: #f9fafb;
    }
}
