/*
 * WP Voting Plugin - Frontend Styles
 * Version: 1.0.0
 */

/* --- Containers e Layout Geral --- */

.wp-voting-container,
.wp-voting-login-required {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* --- Formulário de Registro e Login --- */

#wp-voting-register-form,
#loginform {
    display: flex;
    flex-direction: column;
}

#wp-voting-register-form h2,
.wp-voting-login-required h3 {
    text-align: center;
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 24px;
}

#wp-voting-register-form p,
#loginform p {
    margin-bottom: 16px;
}

#wp-voting-register-form label,
#loginform label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

#wp-voting-register-form input[type="text"],
#wp-voting-register-form input[type="email"],
#wp-voting-register-form input[type="password"],
#loginform input[type="text"],
#loginform input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#wp-voting-register-form input:focus,
#loginform input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

#wp-voting-register-form .button,
#loginform #wp-submit {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

#wp-voting-register-form .button:hover,
#loginform #wp-submit:hover {
    opacity: 0.9;
}

/* Mensagens de Status (Erro/Sucesso) */
.status-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Link para Cadastro (na página de login) */
.wp-voting-register-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.wp-voting-register-link a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.wp-voting-register-link a:hover {
    text-decoration: underline;
}

/* --- Estilos para a Interface de Votação (Futuro) --- */

.wp-voting-header {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.wp-voting-position-title {
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
}

.wp-voting-candidates {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.wp-voting-candidate {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #fff;
}

.wp-voting-candidate:hover {
    border-color: #a3bffa;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wp-voting-candidate.selected {
    border-color: #667eea;
    background-color: #f0f4ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.wp-voting-candidate-photo {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
    background-color: #f7fafc;
}

.wp-voting-candidate-name {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.wp-voting-candidate-number {
    font-size: 14px;
    color: #718096;
    margin-top: 4px;
}

/*
 * Ajustes para o Formulário de Login com Botão de Cadastro
 */

/* Envolve os botões em um container flexível */
#loginform p.login-submit {
    display: flex;
    gap: 10px; /* Espaço entre os botões */
    align-items: center;
}

/* Garante que o botão "Entrar" não ocupe a largura toda */
#loginform #wp-submit {
    width: auto;
    flex-grow: 1; /* Faz o botão "Entrar" crescer para ocupar o espaço disponível */
}

/* Estilo para o nosso novo botão "Cadastre-se" */
#loginform .button-secondary {
    width: auto;
    padding: 14px 20px;
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    line-height: 1; /* Alinha o texto verticalmente */
}

#loginform .button-secondary:hover {
    background-color: #e2e8f0;
}

