/* ==========================================================================
   ModeloJob - Melhorias do Sistema de Checkout
   ========================================================================== */

/* Animações gerais */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Layout geral da página de assinatura */
.subscription-page {
    animation: fadeInUp 0.6s ease-out;
}

.pricing-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Cards de preços */
.pricing-card {
    position: relative;
    overflow: hidden;
    border: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: slideInLeft 0.6s ease-out;
}

.pricing-card:nth-child(2) {
    animation-delay: 0.2s;
}

.pricing-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.pricing-card:hover:before {
    transform: scaleX(1);
}

.pricing-card.featured:before {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
    transform: scaleX(1);
}

/* Badge de destaque */
.featured-badge {
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
    animation: pulse 2s infinite;
}

/* Checkout moderno */
.modern-checkout {
    background: #f8f9fa;
    min-height: calc(100vh - 80px);
    padding: 40px 0;
}

.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.checkout-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.checkout-content {
    padding: 40px;
}

/* Opções de pagamento */
.payment-methods {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.payment-option {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.payment-option:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.payment-option:hover:before {
    left: 100%;
}

.payment-option:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,123,255,0.15);
}

.payment-option.selected {
    border-color: #007bff;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    box-shadow: 0 5px 15px rgba(0,123,255,0.2);
}

.payment-option.pix-option.selected {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border-color: #28a745;
}

/* Vantagens do PIX */
.pix-advantages {
    background: linear-gradient(45deg, #00d4aa, #00a693);
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.pix-advantages:before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* Resumo do pedido */
.order-summary {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    position: sticky;
    top: 20px;
}

.order-summary h4 {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.1em;
    color: #007bff;
}

/* Botões aprimorados */
.btn-modern {
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-modern:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover:before {
    width: 300px;
    height: 300px;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsividade */
@media (max-width: 768px) {
    .checkout-container {
        margin: 20px;
        border-radius: 15px;
    }
    
    .checkout-content {
        padding: 20px;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
        margin-top: 30px;
    }
    
    .btn-modern {
        width: 100%;
        margin: 10px 0;
    }
}

@media (max-width: 576px) {
    .checkout-header {
        padding: 20px;
    }
    
    .checkout-header h2 {
        font-size: 1.5rem;
    }
    
    .payment-option {
        padding: 15px;
    }
    
    .pix-advantages {
        padding: 15px;
    }
}

/* Estados das páginas de resultado */
.result-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.result-card {
    max-width: 600px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.result-icon {
    animation: fadeInUp 1s ease-out;
}

.result-content {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.result-actions {
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Melhorias para o WooCommerce checkout existente */
.woocommerce-checkout .col2-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.woocommerce-checkout .woocommerce-checkout-review-order {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.woocommerce-checkout .payment_methods {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.woocommerce-checkout #place_order {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 25px;
    padding: 15px 40px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    width: 100%;
}

.woocommerce-checkout #place_order:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,123,255,0.3);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pricing-section {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .pricing-card {
        background: #34495e;
        color: white;
    }
    
    .checkout-container {
        background: #34495e;
    }
    
    .order-summary {
        background: #2c3e50;
    }
    
    .payment-option {
        background: #2c3e50;
        border-color: #4a6741;
        color: white;
    }
}

/* Print styles */
@media print {
    .pricing-section,
    .modern-checkout {
        background: white !important;
        color: black !important;
    }
    
    .btn-modern,
    .payment-option {
        border: 1px solid black !important;
    }
    
    .loading-overlay {
        display: none !important;
    }
}

/* Página de Assinatura Integrada */
.assinatura-container {
    padding: 40px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 80vh;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.page-header .subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin: 0;
}

/* Grade de planos */
.subscription-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Cards de planos */
.plan-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 3px solid transparent;
}

.plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.plan-card.featured {
    border-color: #007bff;
    transform: scale(1.05);
}

.plan-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

/* Badge "Mais Popular" */
.popular-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

/* Cabeçalho do plano */
.plan-header h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.price {
    text-align: center;
    margin-bottom: 20px;
}

.price .currency {
    font-size: 1.2rem;
    color: #7f8c8d;
    vertical-align: top;
}

.price .amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: #007bff;
}

.price .period {
    font-size: 1rem;
    color: #7f8c8d;
}

.savings {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
}

/* Features dos planos */
.plan-features {
    margin: 25px 0;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    padding: 8px 0;
    color: #2c3e50;
    font-size: 0.95rem;
}

.plan-features li:before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    margin-right: 10px;
}

/* Botões de ação */
.plan-actions {
    text-align: center;
    margin-top: 25px;
}

.btn-add-cart {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-add-cart:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.3);
}

.btn-add-cart:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-add-cart.added {
    background: linear-gradient(45deg, #28a745, #20c997);
}

/* Seção de checkout */
.checkout-section {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.checkout-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2rem;
}

/* Opções de checkout */
.checkout-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.payment-option {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.payment-option:hover {
    border-color: #007bff;
    box-shadow: 0 8px 25px rgba(0,123,255,0.1);
}

.pix-option {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
}

.checkout-option {
    background: linear-gradient(135deg, #fff5e6 0%, #f8f9fa 100%);
}

.option-header h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.option-header p {
    margin: 0 0 20px 0;
    color: #6c757d;
    font-size: 0.95rem;
}

/* Benefícios das opções */
.pix-benefits ul,
.checkout-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.pix-benefits li,
.checkout-benefits li {
    padding: 5px 0;
    color: #495057;
    font-size: 0.9rem;
}

/* Botões das opções */
.btn-primary {
    background: linear-gradient(45deg, #00d4aa, #00a693);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #00a693, #008574);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,212,170,0.3);
}

.btn-secondary {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108,117,125,0.3);
}

/* Plano selecionado */
.selected-plan-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.selected-plan-card h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.plan-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-name {
    font-weight: bold;
    color: #495057;
}

.plan-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007bff;
}

/* Responsividade */
@media (max-width: 768px) {
    .assinatura-container {
        padding: 20px 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .subscription-plans {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .plan-card.featured {
        transform: none;
    }
    
    .plan-card.featured:hover {
        transform: translateY(-5px);
    }
    
    .checkout-section {
        margin: 0 15px;
        padding: 25px;
    }
    
    .checkout-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .plan-details {
        flex-direction: column;
        gap: 10px;
    }
}

/* Animações */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plan-card {
    animation: slideInUp 0.6s ease forwards;
}

.plan-card:nth-child(2) {
    animation-delay: 0.2s;
}

/* Estados de loading */
.btn-add-cart:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Hover effects melhorados */
.plan-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.plan-card:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
}

.plan-card.featured {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    box-shadow: 0 15px 40px rgba(0,123,255,0.15);
}

/* Melhorias visuais extras */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
} 