/**
 * Expert Kwai Dashboard - Frontend Styles
 * v11.40.0 - Public Showcase & Features List
 */

/* === Reset e Base === */
.expert-kwai-dashboard * { box-sizing: border-box; }

/* === Loading Overlay === */
.expert-kwai-loading { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.95); display: flex; align-items: center; justify-content: center; z-index: 9999; transition: opacity 0.3s ease; }
.expert-kwai-loading.hide { opacity: 0; pointer-events: none; }
.loading-spinner { width: 60px; height: 60px; margin: 0 auto 20px; border: 3px solid rgba(255, 215, 0, 0.2); border-top-color: #ffd700; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-content { text-align: center; color: #fff; font-family: sans-serif; }

/* === Feedback do Carrinho === */
.ek-cart-feedback { position: fixed; top: 20px; right: 20px; background: linear-gradient(135deg, #28a745, #218838); color: #fff; padding: 15px 25px; border-radius: 10px; font-weight: 700; font-size: 1rem; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 99999; opacity: 0; transform: translateY(-30px); transition: all 0.4s; pointer-events: none; }
.ek-cart-feedback.show { opacity: 1; transform: translateY(0); }

/* === Container Principal === */
.expert-kwai-dashboard { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    background: linear-gradient(135deg, #0a0a0a 0%, #151515 50%, #0a0a0a 100%); 
    min-height: 600px; 
    color: #fff; 
    padding: 40px; 
    border-radius: 20px; 
    margin: 30px 0; 
    position: relative; 
    opacity: 0; 
    transition: opacity 0.5s ease;
    border: 1px solid rgba(255, 215, 0, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.expert-kwai-dashboard.loaded { opacity: 1; }
.dashboard-content { max-width: 1400px; margin: 0 auto; position: relative; z-index: 2; }

/* === Header Section === */
.header-section { 
    text-align: center; 
    margin-bottom: 40px; 
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    padding-bottom: 30px;
}
.logo { 
    font-size: 2.8rem; 
    font-weight: 800; 
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #b8860b 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text; 
    margin-bottom: 10px; 
    letter-spacing: -1px;
    display: block !important;
}
.welcome-message { 
    font-size: 1.2rem; 
    color: rgba(255, 255, 255, 0.7); 
    margin-bottom: 0; 
    letter-spacing: 0.5px;
}

/* === User Info Card === */
.user-info-card { 
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(10px); 
    border-radius: 20px; 
    padding: 30px; 
    margin-bottom: 40px; 
    border: 1px solid rgba(255, 215, 0, 0.15); 
    display: flex; 
    align-items: center; 
    gap: 30px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.user-avatar { width: 90px; height: 90px; border-radius: 50%; background: linear-gradient(135deg, #ffd700, #ffed4e); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: #000; flex-shrink: 0; box-shadow: 0 0 20px rgba(255, 215, 0, 0.2); }
.user-details { flex: 1; }
.greeting-text { font-size: 1.6rem; font-weight: 700; color: #ffd700; margin-bottom: 5px; }
.user-status { color: rgba(255, 255, 255, 0.8); font-size: 1rem; }

/* === TÍTULO DA SEÇÃO === */
.ekd-section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin: 40px 0 30px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block; 
}

/* === Products Grid === */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 35px; margin-bottom: 60px; }

/* === Product Card === */
.product-card { 
    background: #1a1a1a; 
    border-radius: 20px; 
    padding: 20px; 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    display: flex; 
    flex-direction: column; 
    position: relative;
    overflow: hidden;
    min-height: 580px; 
}
.product-card:hover { 
    transform: translateY(-10px); 
    border-color: rgba(255, 215, 0, 0.4); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}
.product-card.owned { 
    border-color: rgba(50, 205, 50, 0.3); 
    background: linear-gradient(180deg, rgba(50, 205, 50, 0.05) 0%, #1a1a1a 100%);
}

.product-image { 
    width: 100%; 
    height: auto; 
    aspect-ratio: 1/1; 
    object-fit: cover;
    border-radius: 12px; 
    margin-bottom: 20px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.product-title { 
    font-size: 1.3rem; 
    font-weight: 700; 
    color: #ffd700; 
    margin-bottom: 10px; 
    text-align: center;
    line-height: 1.3;
}
.product-price { 
    font-size: 1.4rem; 
    font-weight: 800; 
    color: #fff; 
    margin-bottom: 15px; 
    text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.product-description { 
    color: rgba(255, 255, 255, 0.6); 
    font-size: 0.95rem; 
    line-height: 1.6; 
    margin-bottom: 25px; 
    text-align: center;
    padding: 0 10px;
    /* Removemos flex-grow para usar no features list */
}

/* === NOVA FEATURE: Lista de Benefícios (Checkmarks) === */
.ekd-features-container {
    margin: 10px 0 25px 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 15px;
    flex-grow: 1; /* Ocupa o espaço disponível para alinhar botões */
}

.ekd-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 160px; /* Mostra ~3-4 itens */
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    position: relative;
}

.ekd-features-list.expanded {
    max-height: 1000px; /* Altura suficiente para mostrar tudo */
}

/* Efeito fade quando fechado */
.ekd-features-list:not(.expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0), #1a1a1a 90%);
    pointer-events: none;
}

/* Item da lista */
.ekd-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
}

.ekd-feature-icon {
    color: #32cd32; /* Verde Neon */
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Botão "Ver mais" */
.ekd-features-toggle {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    color: #ffd700;
    font-size: 0.8rem;
    cursor: pointer;
    padding-top: 10px;
    text-decoration: underline;
    opacity: 0.8;
}
.ekd-features-toggle:hover {
    opacity: 1;
    color: #fff;
}

/* === Detalhes do Pedido === */
.product-info { 
    background: rgba(0, 0, 0, 0.4); 
    border-radius: 12px; 
    padding: 15px; 
    margin-bottom: 15px; 
    border: 1px solid rgba(255, 255, 255, 0.05); 
}
.product-info-item { 
    color: rgba(255, 255, 255, 0.8); 
    font-size: 0.85rem; 
    margin-bottom: 8px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 8px;
}
.product-info-item:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.product-info-item strong { color: #ffd700; font-weight: 600; }

/* === DETALHES DA ASSINATURA === */
.subscription-details-box {
    background: rgba(23, 162, 184, 0.1);
    border: 1px solid rgba(23, 162, 184, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}
.subscription-details-box .sub-title {
    color: #17a2b8;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-size: 0.8rem;
    text-align: center;
}
.subscription-details-box .sub-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: rgba(255,255,255,0.8);
}

/* === RASTREAMENTO DO PEDIDO === */
.ekd-tracking-box {
    background: rgba(39, 174, 96, 0.08);
    border: 1px solid rgba(39, 174, 96, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}
.ekd-tracking-title {
    color: #27ae60;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-size: 0.8rem;
    text-align: center;
    letter-spacing: 0.5px;
}
.ekd-tracking-progress-wrap {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}
.ekd-tracking-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
    box-shadow: 0 0 8px currentColor;
}
.ekd-tracking-status {
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ekd-tracking-event {
    color: rgba(255,255,255,0.7);
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 4px;
}
.ekd-tracking-date {
    color: rgba(255,255,255,0.4);
    text-align: center;
    font-size: 0.75rem;
    margin-bottom: 10px;
}
.ekd-tracking-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 10px;
}
.ekd-tracking-code {
    font-family: 'Courier New', monospace;
    background: rgba(255,255,255,0.06);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
.ekd-tracking-link {
    display: block;
    text-align: center;
    color: #ffd700;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.15);
    transition: all 0.3s;
}
.ekd-tracking-link:hover {
    background: rgba(255, 215, 0, 0.15);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}

.status-badge { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.status-completed, .status-processing, .status-active { background: #28a745; color: #fff; box-shadow: 0 0 10px rgba(40, 167, 69, 0.4); }
.status-pending, .status-on-hold, .status-suspended { background: #ffc107; color: #000; }
.status-cancelled, .status-failed, .status-expired { background: #dc3545; color: #fff; }

/* === Botões de Ação === */
.product-actions { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.btn { padding: 16px; border-radius: 12px; font-weight: 700; font-size: 1rem; text-align: center; text-decoration: none; border: none; cursor: pointer; transition: 0.3s; display: block; width: 100%; text-transform: uppercase; letter-spacing: 0.5px; }

/* CORREÇÃO: Esconde o botão duplicado que o WooCommerce cria */
.product-actions .added_to_cart,
.product-actions .wc-forward { 
    display: none !important; 
}

.btn-main { background: linear-gradient(135deg, #32cd32 0%, #28a745 100%); color: #fff; box-shadow: 0 5px 20px rgba(40, 167, 69, 0.3); }
.btn-main:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5); text-decoration: none; color: #fff; }

.btn-secondary { 
    background: rgba(255, 255, 255, 0.08) !important; 
    color: rgba(255, 255, 255, 0.8) !important; 
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    font-size: 0.85rem; 
    padding: 12px; 
}
.btn-secondary:hover { 
    background: rgba(255, 255, 255, 0.15) !important; 
    color: #fff !important; 
    transform: translateY(-1px); 
    text-decoration: none; 
}
.btn-secondary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Botão Amarelo (Inscreva-se) */
.btn-purchase { background: linear-gradient(135deg, #ffd700 0%, #ffc107 100%); color: #000; box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3); }
.btn-purchase:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5); color: #000; }

/* === BOTÃO: COMPRAR AGORA (VERDE) === */
.btn-buy-now { 
    background: linear-gradient(135deg, #28a745, #218838); 
    color: #fff !important; 
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.3);
    border: 1px solid #1e7e34;
}
.btn-buy-now:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5); 
    color: #fff !important;
}

/* === RECUPERAÇÃO DE PAGAMENTO === */
.payment-recovery-title { color: #ff6b6b; font-weight: 700; margin-top: 15px; margin-bottom: 12px; font-size: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 15px; text-align: center; text-transform: uppercase; letter-spacing: 1px; }
.payment-recovery-actions { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 15px; }

.btn-smart-pay { background: #28B6A7 !important; color: #fff !important; box-shadow: 0 4px 15px rgba(40, 182, 167, 0.2); display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-smart-pay:hover { background: #239f92 !important; transform: translateY(-2px); text-decoration: none; color: #fff; }

.btn-card-pay { background: #6A69DC !important; color: #fff !important; box-shadow: 0 4px 15px rgba(106, 105, 220, 0.2); display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-card-pay:hover { background: #5857bd !important; transform: translateY(-2px); text-decoration: none; color: #fff; }

/* === Estado Vazio === */
.empty-state { text-align: center; padding: 80px 30px; background: rgba(255, 255, 255, 0.03); border-radius: 20px; border: 2px dashed rgba(255, 215, 0, 0.2); grid-column: 1 / -1; }
.empty-state-title { font-size: 1.8rem; color: #ffd700; margin-bottom: 15px; font-weight: 700; }

/* === Rodapé === */
.dashboard-footer { 
    text-align: center; 
    margin-top: 60px; 
    padding-top: 30px; 
    border-top: 1px solid rgba(255, 255, 255, 0.05); 
    display: block !important;
}
.dashboard-footer p { color: rgba(255, 255, 255, 0.3); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; }

/* === TELA DE LOGIN INTEGRADA (Opção B) === */
.ekd-restricted-access, 
.ekd-login-container {
    text-align: center;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 600px;
    margin: 0 auto 50px auto; /* Margin bottom para separar dos produtos */
    color: #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.ekd-restricted-access h2, 
.ekd-login-container h2 { color: #fff; margin-bottom: 15px; font-size: 1.6rem; font-weight: 600; }
.ekd-restricted-access p, 
.ekd-login-container p { color: rgba(255, 255, 255, 0.7); margin-bottom: 25px; font-size: 1rem; line-height: 1.5; }

.ekd-restricted-access a.ekd-login-btn, 
.ekd-login-container a.button {
    display: inline-block; padding: 15px 50px;
    background: #007bff; /* Azul padrão */
    color: #fff !important; font-weight: 700; border-radius: 50px; text-decoration: none; text-transform: uppercase; box-shadow: 0 5px 20px rgba(0, 123, 255, 0.3); transition: all 0.3s;
    font-size: 1rem; letter-spacing: 0.5px;
}

.ekd-restricted-access a.ekd-login-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0, 123, 255, 0.5); background: #0069d9; color: #fff !important; }

/* === LOGIN SOCIAL === */
.ekd-social-login-container { margin-top: 25px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.ekd-social-login-container .the_champ_login_title { color: rgba(255,255,255,0.6) !important; font-size: 0.85rem !important; margin-bottom: 15px !important; text-transform: uppercase; letter-spacing: 1px; }

/* === Responsivo === */
@media (max-width: 768px) {
    .expert-kwai-dashboard, .ekd-restricted-access { width: 95% !important; margin-left: auto !important; margin-right: auto !important; padding: 20px; }
    .header-section { margin-bottom: 30px; }
    .logo { font-size: 2rem; }
    .user-info-card { flex-direction: column; text-align: center; padding: 25px; }
    .products-grid { grid-template-columns: 1fr; }
    .payment-recovery-actions { display: flex !important; flex-direction: column !important; }
}