<?php
/**
 * Estilos CSS para o frontend do plugin
 * public/css/voy2ex-e-simul-public.css
 * @link       https://seusite.com
 * @since      1.0.0
 *
 * @package    Voy2ex_E_Simul
 * @subpackage Voy2ex_E_Simul/public/css
 */

/**
 * Variáveis de cores e fontes
 */
:root {
    --voy2ex-e-simul-primary: #4285F4;
    --voy2ex-e-simul-secondary: #8D00FF;
    --voy2ex-e-simul-light: #f5f7fa;
    --voy2ex-e-simul-dark: #333333;
    --voy2ex-e-simul-gray: #e0e0e0;
    --voy2ex-e-simul-success: #34a853;
    --voy2ex-e-simul-error: #ea4335;
    --voy2ex-e-simul-warning: #fbbc05;
    --voy2ex-e-simul-font-family: 'Mulish', sans-serif;
}

/**
 * Estilos gerais
 */
.voy2ex-e-simul-form-group {
    margin-bottom: 20px;
}

.voy2ex-e-simul-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--voy2ex-e-simul-dark);
}

.voy2ex-e-simul-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--voy2ex-e-simul-gray);
    border-radius: 4px;
    font-family: var(--voy2ex-e-simul-font-family);
    resize: vertical;
    transition: border-color 0.3s;
}

.voy2ex-e-simul-textarea:focus {
    border-color: var(--voy2ex-e-simul-primary);
    outline: none;
}

.voy2ex-e-simul-textarea.error {
    border-color: var(--voy2ex-e-simul-error);
}

.voy2ex-e-simul-error {
    background-color: #fdecea;
    border-left: 4px solid var(--voy2ex-e-simul-error);
    color: var(--voy2ex-e-simul-error);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.voy2ex-e-simul-error a {
    color: #4285F4 !important;
}



/**
 * Estilos para exercícios
 */
.voy2ex-e-simul-exercise {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.voy2ex-e-simul-exercise-number {
    font-weight: 700;
    color: var(--voy2ex-e-simul-secondary);
    margin-bottom: 10px;
}

.voy2ex-e-simul-exercise-question {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.voy2ex-e-simul-exercise-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.voy2ex-e-simul-exercise-option {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.voy2ex-e-simul-exercise-option:hover {
    background-color: #f5f7fa;
}

.voy2ex-e-simul-exercise-option input[type="radio"] {
    margin-right: 10px;
    margin-top: 3px;
}

/**
 * Estilos para resultados
 */
.voy2ex-e-simul-result {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.voy2ex-e-simul-result.correct {
    border-left: 4px solid var(--voy2ex-e-simul-success);
}

.voy2ex-e-simul-result.incorrect {
    border-left: 4px solid var(--voy2ex-e-simul-error);
}

.voy2ex-e-simul-result-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.voy2ex-e-simul-result-number {
    font-weight: 600;
}

.voy2ex-e-simul-result-status {
    font-weight: 600;
}

.voy2ex-e-simul-result.correct .voy2ex-e-simul-result-status {
    color: var(--voy2ex-e-simul-success);
}

.voy2ex-e-simul-result.incorrect .voy2ex-e-simul-result-status {
    color: var(--voy2ex-e-simul-error);
}

.voy2ex-e-simul-result-question {
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.voy2ex-e-simul-result-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.voy2ex-e-simul-result-option {
    padding: 10px;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
}

.voy2ex-e-simul-result-option.correct {
    background-color: rgba(52, 168, 83, 0.1);
}

.voy2ex-e-simul-result-option.incorrect {
    background-color: rgba(234, 67, 53, 0.1);
}

.voy2ex-e-simul-result-option-letter {
    font-weight: 600;
    margin-right: 10px;
}

.voy2ex-e-simul-result-explanation {
    background-color: #f5f7fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.voy2ex-e-simul-result-explanation-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--voy2ex-e-simul-secondary);
}

/**
 * Estilos para simulados
 */
.voy2ex-e-simul-timer-icon {
    font-size: 24px;
    margin-right: 10px;
}

.voy2ex-e-simul-timer-text {
    font-size: 24px;
    font-weight: 700;
}

/* Reset */
.voy2ex-e-simul-reset-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.voy2ex-e-simul-reset-section h4 {
    color: #856404;
    margin: 0 0 10px 0;
}

.voy2ex-e-simul-button.danger {
    background: #dc3545;
    color: white;
    border: 2px solid #dc3545;
}

.voy2ex-e-simul-button.danger:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Configurações */
.voy2ex-e-simul-dashboard-settings {
    margin-bottom: 30px;
}

.voy2ex-e-simul-settings-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.voy2ex-e-simul-settings-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.voy2ex-e-simul-settings-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.voy2ex-e-simul-settings-content {
    padding: 20px;
}

.voy2ex-e-simul-settings-content p {
    margin: 0 0 15px 0;
    color: #666;
}

/* Informações do perfil atual */
.voy2ex-e-simul-current-profile {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #007cba;
}

.profile-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid #e0e0e0;
}

.profile-info:last-child {
    border-bottom: none;
}

.profile-label {
    font-weight: 600;
    color: #333;
}

.profile-value {
    color: #007cba;
    font-weight: 500;
}


.voy2ex-e-simul-unified-container {
    position: relative;
    min-height: 400px;
}


/**
 * transição onboarding-nivelamento
 */
#voy2ex-onboarding-section,
#voy2ex-dashboard-section {
    width: 100%;
    transition: opacity 0.5s ease-in-out;
}

.voy2ex-e-simul-transition-fade {
    opacity: 0;
    pointer-events: none;
}


/* ===== PAINEL DE COLETA DE FRAGMENTO ===== */
.fragment-collection-panel {
    margin-top: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.fragment-collection-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
}

.fragment-panel-content {
    position: relative;
    z-index: 1;
}

.fragment-success-icon {
    margin-bottom: 20px;
    display: inline-block;
    animation: checkmark 0.8s ease-out;
}

.fragment-success-icon svg {
    width: 64px;
    height: 64px;
    color: #fff;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.fragment-panel-title {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fragment-panel-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.fragment-button-wrapper {
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* BOTÃO ORIGINAL ADAPTADO AO PAINEL */
.fragment-collection-panel .gamipress-button.botaodecoletafragexesimul {
    /* Manter o estilo do seu botão original mas adaptado ao painel */
    background: #1a202c !important;
    background-image: 
        linear-gradient(#1a202c, #1a202c), 
        linear-gradient(90deg, #00c6ff, #8d00ff, #ff00e5, #00c6ff) !important;
    background-origin: border-box !important;
    background-clip: padding-box, border-box !important;
    border: 2px solid transparent !important;
    background-size: 200% 100% !important;
    animation: borderAnimation 6s ease infinite !important;
    
    /* Ajustes para o painel */
    color: #fff !important;
    font-weight: 600 !important;
    padding: 14px 36px !important;
    font-size: 18px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    border-radius: 4px !important;
    position: relative !important;
    z-index: 2 !important;
    
    /* Manter estrutura flex original */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
}

/* Animação da borda */
@keyframes borderAnimation {
    0% { background-position: 0% 50%, 0% 50%; }
    50% { background-position: 100% 50%, 100% 50%; }
    100% { background-position: 0% 50%, 0% 50%; }
}

/* Hover adaptado para o painel */
.fragment-collection-panel .gamipress-button.botaodecoletafragexesimul:hover:not(.botao-desabilitado) {
    animation-duration: 2s !important;
    box-shadow: 0 0 20px rgba(141, 0, 255, 0.8), 0 8px 25px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-5px) !important;
    color: #e0e0e0 !important;
}

/* Ícone adaptado para o painel */
.fragment-collection-panel .gamipress-button.botaodecoletafragexesimul .botao-icone {
    color: #00c6ff !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
}

/* Ícone no hover dentro do painel */
.fragment-collection-panel .gamipress-button.botaodecoletafragexesimul:hover:not(.botao-desabilitado) .botao-icone {
    color: #ff00e5 !important;
    transform: scale(1.1) rotate(15deg) !important;
}

/* Texto do botão dentro do painel */
.fragment-collection-panel .gamipress-button.botaodecoletafragexesimul .botao-texto {
    display: inline-block !important;
    line-height: 1 !important;
}

/* Estado desabilitado dentro do painel */
.fragment-collection-panel .gamipress-button.botaodecoletafragexesimul.botao-desabilitado {
    animation: none !important;
    background: #2d3748 !important;
    background-image: 
        linear-gradient(#2d3748, #2d3748), 
        linear-gradient(90deg, #4a5568, #4a5568) !important;
    cursor: not-allowed !important;
    color: #718096 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    transform: none !important;
    opacity: 0.7 !important;
}

.fragment-collection-panel .gamipress-button.botaodecoletafragexesimul.botao-desabilitado .botao-icone {
    color: #4a5568 !important;
    transform: none !important;
}

.fragment-collected-message {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #667eea;
    font-weight: 600;
    animation: sparkle 1s ease-out;
}

@keyframes sparkle {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .fragment-collection-panel {
        padding: 30px 20px;
    }
    
    .fragment-panel-title {
        font-size: 20px;
    }
    
    .fragment-panel-subtitle {
        font-size: 14px;
    }
    
    .fragment-success-icon svg {
        width: 48px;
        height: 48px;
    }
    
    .fragment-collection-panel .gamipress-button.botaodecoletafragexesimul {
        padding: 12px 28px !important;
        font-size: 16px !important;
    }
}
